Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: JamesV on September 13, 2013, 09:18:15 am

Title: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 13, 2013, 09:18:15 am
I've finally started work on my first 84+CSE project! Seeing as Spaze Invaders (by Hannes "Movax" Edfeldt) was the first TI calculator assembly game I ever saw 15 years ago, I figured it's only fitting that my first 84+CSE project should be to port the classic TI-83 game over and colourise it!

The current plan is to make as much use of Movax's original code as practical, but I'll obviously be re-writing all of the sprite & LCD routines, as well as adding colour to the sprites (and doubling them in size to suit the larger LCD). The sprites themselves will still have the same retro look. The LCD will be run in 160x240 mode to optimise speed and sprite data, seeing as the graphics won't be high resolution.

This image is simply a mock up at this stage, but I should have some on-calc progress to show in the next week or two!

(http://img21.imageshack.us/img21/2448/6ej.png)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: Sorunome on September 13, 2013, 10:12:46 am
Isn't space invaders a classic Atari game? ^^


anyways, nice idea, hope you'll succeed! :D
Title: Re: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 13, 2013, 11:58:20 am
Win. There is also Calcuzap for the CSE by Patrick Davidson but this one seems very promising too :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 14, 2013, 09:52:10 am
Isn't space invaders a classic Atari game? ^^

anyways, nice idea, hope you'll succeed! :D
Correct :) Movax's TI-83 version was pretty much a clone of the old Atari 2600 / arcade game.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 14, 2013, 11:54:23 am
By the way, will the game be full screen? (as in, take the entire screen height and 160 pixels area, unlike in the mockup above)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: TIfanx1999 on September 14, 2013, 03:44:30 pm
I've finally started work on my first 84+CSE project! Seeing as Spaze Invaders (by Hannes "Movax" Edfeldt) was the first TI calculator assembly game I ever saw 15 years ago, I figured it's only fitting that my first 84+CSE project should be to port the classic TI-83 game over and colourise it!

The current plan is to make as much use of Movax's original code as practical, but I'll obviously be re-writing all of the sprite & LCD routines, as well as adding colour to the sprites (and doubling them in size to suit the larger LCD). The sprites themselves will still have the same retro look. The LCD will be run in 160x240 mode to optimise speed and sprite data, seeing as the graphics won't be high resolution.

This image is simply a mock up at this stage, but I should have some on-calc progress to show in the next week or two!

(http://img21.imageshack.us/img21/2448/6ej.png)

Very nice James. I thought a Space Invaders game would be a perfect fit for this calc. I'm happy to see this old game getting some new life (and colour) breathed into it. :D
Title: Re: Spaze Invaders for TI-84+CSE
Post by: AssemblyBandit on September 15, 2013, 12:06:17 am
Looks nice! I haven't played that game in forever!

Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 15, 2013, 08:49:20 pm
By the way, will the game be full screen? (as in, take the entire screen height and 160 pixels area, unlike in the mockup above)
At this stage, the gameplay field itself is 192x128 (exactly 2x the TI-83 version) to maintain even scaling for the sprites, then plus the score at the top and status bar at the bottom.

So far it's looking good on calc; the shields, player, status bars, etc. all the render, and the player can move from side to side. I'll work on shooting next, and then get started on the enemies :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: tr1p1ea on September 16, 2013, 01:25:33 am
Interested in how you are handling drawing, are you buffering at all?
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 16, 2013, 03:02:00 am
By the way, will the game be full screen? (as in, take the entire screen height and 160 pixels area, unlike in the mockup above)
At this stage, the gameplay field itself is 192x128 (exactly 2x the TI-83 version) to maintain even scaling for the sprites, then plus the score at the top and status bar at the bottom.

So far it's looking good on calc; the shields, player, status bars, etc. all the render, and the player can move from side to side. I'll work on shooting next, and then get started on the enemies :)
Have you thought about making it 3x then using 240x160 mode instead or would it be too slow? It would still fit on the screen, although the score text would look a little small in comparison to ships. You could maybe use the Atari 2600 text, though. It looks nice as it is now, though, but since the calc screen is small, I fear that a bunch of people will complain about how the game view is too small and that it hurts their eyes. Remember the many complaints about Gemini 3D and Wolfeinstein 83+ regarding that issue. D:

4x is out of the question, though, since it would require removing some ships and making them closer, which would alter the gameplay. Scaling them 2x horizontally and 3x vertically could be ok if you don't mind stretching things up a bit, although it would still leaves an empty space on each side.

Else, if you stick to the smaller view, you could maybe add a green border surrounding the game area instead of just the line below?
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 16, 2013, 06:32:31 pm
Interested in how you are handling drawing, are you buffering at all?
No buffering at this stage. I'm only drawing sprites when required (ie. during initialisation and then only when they move after that). The sprites are drawn on the black background. If the sprite moves, the following steps are taken:
Although it's a little more painful, this avoids the flickering that occurs when erasing the whole sprite before re-draw each time. I'm already anticipating what this means in future games that I may make that would have a background behind the sprites, ie. having to store the background before drawing the sprite, then erase a side of the sprite with the right row or column of background data, shift the background data, get the new row / column of background and then re-draw the sprite. Having said that, there are probably easier ways to do this that you've already discovered perhaps? :)

Have you thought about making it 3x then using 240x160 mode instead or would it be too slow? It would still fit on the screen, although the score text would look a little small in comparison to ships. You could maybe use the Atari 2600 text, though. It looks nice as it is now, though, but since the calc screen is small, I fear that a bunch of people will complain about how the game view is too small and that it hurts their eyes. Remember the many complaints about Gemini 3D and Wolfeinstein 83+ regarding that issue. D:

4x is out of the question, though, since it would require removing some ships and making them closer, which would alter the gameplay. Scaling them 2x horizontally and 3x vertically could be ok if you don't mind stretching things up a bit, although it would still leaves an empty space on each side.

Else, if you stick to the smaller view, you could maybe add a green border surrounding the game area instead of just the line below?
The first concept drawings and first couple of builds I made actually did have 3x sprites (24x24 for normal enemies), but it just looked a little clunky to me. I'm actually running in 160x240 resolution at the moment; if I were to go back to 3x scaled sprites, I'd need to return to standard 320x160 resolution, which would mean a lot more reading & writing going on with the lcd. It also means either having more sprite data, or writing a more complex (slower) sprite routine that automatically scales up 8x8 sprite data. I'm already using a 4-bit (16 colour) format for sprites to keep their size down. Mind you, as I'm typing this, I've just thought of another way where I could use a 2-bit format for sprites to slice their data in half again.

Anyhow, for the time being, I'm preferring the 2x scaled look, but it's not set in stone :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: tr1p1ea on September 16, 2013, 07:16:09 pm
Will the enemies be more than 1 colour? If so then you could possibly even use 1-bit sprites if need be?
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 16, 2013, 07:25:59 pm
All the sprites are 1 colour only, but some of them have transparency near their right edges, eg. the player laser beam is only 1 pixel wide (stretched to 2 pixels in 160x240 res), but the sprite data is (currently) stored as 2 pixels per byte, so the right pixel (least significant nibble) is transparent, so that it doesn't draw black over the edge of another sprite as it moves past.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: tr1p1ea on September 16, 2013, 08:50:37 pm
In xLIB i have my font data stored as 1-bit and simply have any bits that are 0 as transparent. But i do see what you mean with the above. It doesnt really matter how it works, as long as it works :).
Title: Re: Spaze Invaders for TI-84+CSE
Post by: XiiDraco on September 16, 2013, 09:02:11 pm
I remember the last time I played space invaders, it was back at a retro convention. The place was so cool.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 16, 2013, 09:11:37 pm
In xLIB i have my font data stored as 1-bit and simply have any bits that are 0 as transparent. But i do see what you mean with the above. It doesnt really matter how it works, as long as it works :).
Hehe, I also have my font data stored as 1-bit :) The catch with the sprites is that sometimes I need it to draw a black pixel, to erase part of the old copy of the sprite drawn behind it, because I'm not erasing the whole sprite before drawing, due the flickering effect :/
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 19, 2013, 07:56:50 am
Here's the first screenshot of Spaze Invaders on-calc. Apologies for the quality, the colours don't show up very vibrantly as it's just a photo taken on my iPhone :P Currently the game loads up and initialises the game play screen as shown. The player can move from side to side and shoot the laser. Aliens don't do anything as of yet, but the shields/barriers function properly.

I'll be sure to post more shots as I make progress :)

(http://img600.imageshack.us/img600/9563/xzdw.jpg)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: TIfanx1999 on September 19, 2013, 08:01:09 am
It's looking beautiful on calc. James. :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: Sorunome on September 19, 2013, 10:45:10 am
Agreed, looking awesome :D
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 20, 2013, 11:35:32 pm
Looking at this picture makes me want to dig up my Atari 2600 Space Invaders cart and play some :P
Title: Re: Spaze Invaders for TI-84+CSE
Post by: AssemblyBandit on September 21, 2013, 04:10:09 pm
Its coming along quickly! With the sprite updating, I feel your pain! In Frogger I use one line to erase the game sprites, with Tunnel, I chose to leave in the 'artifact' to keep the speed up. I think speed is probably the most important aspect because there's so many people hating on the TI84+C assuming its slow (including me before I got it!). The game screen size is fine, you could fill up the border with stars or alien pics or match the graphics like the side panels on the arcade!
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 22, 2013, 09:57:54 am
Thanks everyone!

AssemblyBandit: Good ideas about the border space on the screen, I've added it to my to-do list :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 26, 2013, 06:32:06 pm
Just a quick update: I took a break from AB5 last night and jumped back over to this to make some progress. Aliens now do their side-to-side dance and make their way down the screen, and you can shoot them out of the sky with your trusty laser. Next up I'll implement the alien lasers, then loading a new level once all aliens are dead.

Seeing as it's hard for me to post any decent screenshots at this stage, I'll upload a demo version in the next few days for those that want to see how it looks on the calculator :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: AssemblyBandit on September 28, 2013, 01:27:57 am
Awesome! Sounds like it will be out soon!
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 29, 2013, 09:09:53 am
A very simple demo can be downloaded here (http://www.jvti.org/files/downloads/spazedemo.zip). Controls are the same as the original TI-83 version: arrows to move left and right, [2nd] to fire and [CLEAR] to quit.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 29, 2013, 11:46:34 am
Oh nice to see this updated. :D I might give this a try when I have time.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: Streetwalrus on September 29, 2013, 02:53:16 pm
It does sound pretty cool even though I have no CSE to try it. :(
Title: Re: Spaze Invaders for TI-84+CSE
Post by: AssemblyBandit on September 29, 2013, 04:21:27 pm
Its perfect!!! The game runs fast and the animations look good! Its nice to see another game on the +C!
Title: Re: Spaze Invaders for TI-84+CSE
Post by: Sorunome on September 29, 2013, 04:37:38 pm
yeah, too bad i don't have a CSE to try it out, would be too awesome :P
Title: Re: Spaze Invaders for TI-84+CSE
Post by: AssemblyBandit on September 29, 2013, 04:51:41 pm
I don't know if James would mind, but here's a video:




Its set to unlisted so you may have to click on the link:
http://www.youtube.com/watch?v=8TS2EqN_ALY (http://www.youtube.com/watch?v=8TS2EqN_ALY)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: Sorunome on September 29, 2013, 05:09:10 pm
Unlistedworks for embedded vids just fine. Also, that is looking nice, thanks for making the vid assembly, and great job on that game james!
Title: Re: Spaze Invaders for TI-84+CSE
Post by: tr1p1ea on September 29, 2013, 05:39:30 pm
omg ... that looks amazing!
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 29, 2013, 07:41:23 pm
By the way I just tried it on a real calc and it looks pretty nice. It doesn't run from DCSE menu, though D:
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on September 29, 2013, 07:43:47 pm
Thanks for posting that video AssemblyBandit, much appreciated :)

That's strange DJ_O, it's working for me. Have you tried doing a full reset?
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on September 29, 2013, 07:47:14 pm
Yes, but I had forgotten to also delete the DCS8 appvars afterward. Now I tried, however, and I still have the same problem.

(btw don't ever delete DCS8 appvars BEFORE doing a reset. Your calc will go crazy! O.O)

EDIT By the way, my hardware revision is K-0113.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on October 02, 2013, 08:16:20 am
This has had a little more progress made. Some basic scoring has now been implemented, along with progressing to the next level once all aliens are killed. Boss levels aren't implemented yet, so it only goes to level 6, and then the game finishes. The player ship still can't die - I haven't bothered implement this yet as the game is easier to test without having to dodge alien lasers!

I've updated the demo download to the current build, which can be found here (http://www.jvti.org/files/downloads/spazedemo.zip).
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on October 02, 2013, 09:52:53 am
Cool to hear. I downloaded it and will install it on my calc soon :)

And yeah I noticed that aliens will constantly tries to shoot you rather than randomly. In some cases, like when you hide behind a block, it almost looks like they are using chainguns. O.O
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on October 17, 2013, 06:05:52 am
It's only been moving slowly, but Spaze Invaders has seen some more progress. Boss levels are now implemented, and the program has been slightly adjusted to now be a Doors CSE 8.0 program. The game can now be played through all 9 levels, however player collision detection still hasn't been implemented, so it's quite boring. However you can still get an idea of the feel of the game.

I've again updated the demo download to the current build, which you can download here (http://www.jvti.org/files/downloads/spazedemo.zip). You will need Doors CSE 8.0 (http://www.cemetech.net/programs/index.php?mode=file&id=960) to run this demo.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on October 17, 2013, 01:25:19 pm
Cool to hear. :) I was wondering when there would actually be an update. I sometimes play this on my calc, but being able to lose lives and die, along with removing the display glitches when switching levels would be nice :P
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on March 27, 2014, 05:32:47 am
It's been quite sometime since an update - the game has recently seen some more progression. The title animation & menu, difficulty levels and a few other small things have been implemented/fixed up.

(http://imageshack.com/a/img594/523/7y59.png)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on March 27, 2014, 02:46:35 pm
Ooh that looks nice. I wondered if you were done with everything calc-related or just took a break. Glad this is still alive :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on March 27, 2014, 06:29:06 pm
Hehe no not done with calc-coding, just been keeping busy with other things over the summer. Now that the Melbourne weather is cooling off again, I'm spending more time indoors again.

Spaze Invaders CSE is not too far from being finished now! :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: rw24 on March 27, 2014, 07:34:25 pm
Looks really cool? But I'm wondering... have you put in, like, effects of being hit by the badguy rays? And I just tried this once... if you completely lose, and it gets to the bottom of the screen, you have to reset your calculator. And do you have a new version to download?
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on March 27, 2014, 11:02:22 pm
Looks really cool? But I'm wondering... have you put in, like, effects of being hit by the badguy rays? And I just tried this once... if you completely lose, and it gets to the bottom of the screen, you have to reset your calculator. And do you have a new version to download?
There are only a few things left to add in - player/laser hit detection and enemies reaching the bottom of the screen still need to be done, but are next on my list. The final version should be ready in the next 1-2 weeks, although I hate breaking promises, so to be on the safe side I'll just say that it will be finished SoonTM hehe :)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: JamesV on March 30, 2014, 09:29:19 pm
This is now finished - you can find it for download either on my site, or ticalc.org or Cemetech :) >B)
Title: Re: Spaze Invaders for TI-84+CSE
Post by: TIfanx1999 on March 30, 2014, 09:48:24 pm
Very nice. :) You can attach a download in your topic here as well if you like.
Title: Re: Spaze Invaders for TI-84+CSE
Post by: chickendude on March 31, 2014, 08:10:56 pm
Wow, great work! Is there a more recent screenshot available anywhere (for those of us without a CSE)?
Title: Re: Spaze Invaders for TI-84+CSE
Post by: DJ Omnimaga on April 02, 2014, 11:08:22 pm
Nice to hear it's ready! I'll try to find the download :D

(But yeah you can also attach files to posts if you want too)