Join us on Discord!
You can help CodeWalrus stay online by donating here.

[TI-84+CE] GalagACE, a shoot-em-up written in hybrid BASIC

Started by Dream of Omnimaga, June 09, 2016, 06:05:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dream of Omnimaga

I know that @JamesV and Patrick Davidson already made much better TI-84 Plus CE shoot-em-ups in ASM, but for a long while I wanted to jump in the 2D space shooter bandwagon and decided to make one written in hybrid TI-BASIC: GalagACE:




Arrows: Move left and right
2nd: Shoot
CLEAR: Quit (never quit with the ON button!)


[spoiler="original post"]
https://img.ourl.ca/galagace1.gif
Basically, this game is a remake of the crappy Space Invaders clone I made in early 2002, which could be found in Omnimaga Pack 25 games in 1. I decided to rename it to GalagACE, which is a play with the words Galaga, Ace and CE. I am now using sprites rather than the home screen. However, the code is ancient so I'm gonna rewrite most of it to attempt increasing the game speed.[/spoiler]
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Looks pretty good :) It would be cool if there was a space like background, with a few stars and such.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Thanks Cumred. The star background was actually an idea I had, but I was unsure how I would do it at the time, since Sprites don't support clipping. However I was considering just making multiple frames with the star background offset to simulate scrolling. Star pixels would be 7x7, though.

Another thing to note is that the Sprites library lacks transparency support in order to keep speed as high as possible (probably why it lacks clipping too?). Right now I erase the entire screen with two black sprites zoomed out so that I don't have to use a separate rectangle call. So I could easily replace those plain black sprites with actual stars.


Which color should the star pixels be @Cumred_Snektron to avoid making it hard to distinguish foreground elements?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

unregistered

nice, DJ Omnimaga :)

One detail : SETTINGS also clear screen in black (faster way than CLSCREEN) ;)

I optimised a bit GALACACE (just for help ;) ), You can take a look at it (renamed GALAGAC to avoid confusion)

Dream of Omnimaga

The issue with SETTINGS though is that in CEmu it doesn't erase the screen with just black, but also some green static.

Also I'll take a look at your code :) . Most of the game code was written in March or April 2002 and when I looked at my code yesterday I was shocked at how long the main loop was compared to my more recent games o.o
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

TheMachine02

Nice. It look really good  :D It is strange that cemu put green static though - the emulation core is almost perfect from what I could see. How does SETTINGS clear the screen @grosged ?

unregistered

I wanted SETTINGS to make a black screen (because going into 8bpp mode) and as fast as possible :

ld hl,$e40000
ld de,$d40000
ld bc,153600/2

$e40000 is a memory-area where we can't write, only read...And it only read zeros (with less Wait-States than usual)

Dream of Omnimaga

Yeah I don't get any static on the real calculator. It only happens on CEmu.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Quote from: DJ Omnimaga on June 09, 2016, 05:26:36 PM
Which color should the star pixels be @Cumred_Snektron to avoid making it hard to distinguish foreground elements?

The enemies are blue, so i think light yellow / orange on a dark blue background would fit nicely
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Unicorn

  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Quote from: Cumred_Snektron on June 09, 2016, 11:25:47 PM
Quote from: DJ Omnimaga on June 09, 2016, 05:26:36 PM
Which color should the star pixels be @Cumred_Snektron to avoid making it hard to distinguish foreground elements?

The enemies are blue, so i think light yellow / orange on a dark blue background would fit nicely

Hm what about teal or magenta stars?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Dream of Omnimaga

By the way I tried your program @grosged and this is what I meant about the static:



This only happens in CEmu, not on the real calculator. This is why I always add a 0:Asm(prgmCLSCREEN after using Asm(prgmSETTINGS.

Also I didn't know we could zoom sprites bigger than 7x? O.O (I noticed the G0 thing) (EDIT: Nevermind, it seems like a typo or something because it seems to act like 7)


EDIT: Also here are some updates:

-Boss fights (basically they're just a set of enemy but with an extra sprite that is larger displayed under them so that it looks like you're putting holes in the boss ship). Once all targets on the ship are destroyed, the boss disappears and the next enemy wave arrives.

-You can now shoot multiple bullets at once! (4 maximum). However, collision detection have slowed down things quite a bit, so I'll need to find  a better way to check if each bullet has hit the enemy one by one. Shooting the bullets themselves isn't slowing things down because it doesn't require much code, but collision check is a different story >.<



On the other hand, the speed is now on-par with the original game, so that's a start. I need to make boss and late enemy bullets move faster, though.


Also @Cumred_Snektron the star background idea won't work, because I don't have enough sprite memory to fit all frames in D:
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

aetios

Looks really really nice. I'm looking forward to see how this turns out.
ceci n'est pas une signature

tr1p1ea


TheMachine02

Yeah, I agree ! It seems pretty fast. That boss look cool too :D

Powered by EzPortal