CodeWalrus Games
Pages: 12
[TI-84+CE] GalagACE, a shoot-em-up written in hybrid BASIC By: DJ Omnimaga Date: June 09, 2016, 06:05:07 AM
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]

Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: Cumred_Snektron Date: June 09, 2016, 08:58:52 AM
Looks pretty good :) It would be cool if there was a space like background, with a few stars and such.
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: DJ Omnimaga Date: June 09, 2016, 05:26:36 PM
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?
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: grosged Date: June 09, 2016, 07:38:45 PM
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)

Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: DJ Omnimaga Date: June 09, 2016, 08:14:16 PM
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
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: TheMachine02 Date: June 09, 2016, 08:26:20 PM
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 ?
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: grosged Date: June 09, 2016, 08:33:19 PM
I wanted SETTINGS to make a black screen (because going into 8bpp mode) and as fast as possible :

Code Select
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)
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: DJ Omnimaga Date: June 09, 2016, 08:34:00 PM
Yeah I don't get any static on the real calculator. It only happens on CEmu.
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: Cumred_Snektron Date: 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

Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: Unicorn Date: June 09, 2016, 11:44:59 PM
Great job on this, it's much better than caterite :P
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: DJ Omnimaga Date: June 10, 2016, 12:14:17 AM
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?

Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: DJ Omnimaga Date: June 10, 2016, 08:50:21 AM
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:
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: aeTIos Date: June 10, 2016, 08:55:38 AM
Looks really really nice. I'm looking forward to see how this turns out.
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: tr1p1ea Date: June 10, 2016, 09:51:10 AM
Love the graphics, looks awesome :).
Re: GalagACE, a TI-84 Plus CE shoot-em-up written in hybrid BASIC By: TheMachine02 Date: June 10, 2016, 10:06:42 AM
Yeah, I agree ! It seems pretty fast. That boss look cool too :D
Pages: 12