Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: AssemblyBandit on September 23, 2013, 12:14:52 am

Title: Snake TI84+C
Post by: AssemblyBandit on September 23, 2013, 12:14:52 am
Here's a mockup of my next game Snake.

I'm working on this game and PacMan which is in the TI84+C Bundle topic. I've been pretty lazy today, maybe a demo will come soon.
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on September 23, 2013, 01:10:07 am
I like it so far. :D I wonder if making the floor so it has some spots with sand or grass would slow it down too much?
Title: Re: Snake TI84+C
Post by: AssemblyBandit on September 23, 2013, 01:35:26 am
It does look a little bland, I may just make the walls be like pots and landscaping borders (and some rocks) to give the illusion your playing in a garden somewhere. I chose a brown background because white and black were used for the images. I'll do some more drawing and create a better mockup.
Title: Re: Snake TI84+C
Post by: Sorunome on September 23, 2013, 10:33:48 am
That mockup is looking awesome!
Title: Re: Snake TI84+C
Post by: AssemblyBandit on September 24, 2013, 12:49:44 am
Thanks Sorunome and thanks DJ for keeping me on point!

Here's another mockup, current idea is to have the levels randomly generated and speed increased every level.

I'm still not completely satisfied with the way it looks, if I could only draw better! I would like it to be either more realistic or more cartoonish. I'll keep working on it but if I can't draw anything better, I'll stick with this.
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on September 24, 2013, 12:57:30 am
This looks quite nice. :D
Title: Re: Snake TI84+C
Post by: Sorunome on September 24, 2013, 04:04:21 am
Well, it looks good to me!
Title: Re: Snake TI84+C
Post by: Streetwalrus on September 24, 2013, 12:38:04 pm
Yup, looking cool ! :D
Title: Re: Snake TI84+C
Post by: AssemblyBandit on September 28, 2013, 12:52:01 am
Thanks DJ, Sorunome, and Streetwalker! Here is video showing off the random level generator. The game will be in full resolution using 16 bit images.

Title: Re: Snake TI84+C
Post by: zeldaking on September 28, 2013, 01:39:35 am
Wowow. That looks really nice! Great work.
Title: Re: Snake TI84+C
Post by: Sorunome on September 28, 2013, 02:38:10 am
Looking awesome, does it always make sure they are symetrical to save calculation time?
Title: Re: Snake TI84+C
Post by: AssemblyBandit on September 28, 2013, 02:57:24 am
Thanks zeldaking!

Thanks Sorunome and yeah, it chooses symmetric templates to make sure it doesn't create an overly hard or impossible game and it saves time generating the level. The textures repeat a lot but I don't want them to be larger than 16x16. They also don't seam perfectly, I'll probably clean the noticeable ones up a little.

Here's a speed test:



Should be finished by Friday.
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on September 30, 2013, 02:05:02 am
You could maybe add moving obstacles with such speed! :O
Title: Re: Snake TI84+C
Post by: Runer112 on September 30, 2013, 02:15:34 am
Thanks DJ, Sorunome, and Streetwalker! Here is video showing off the random level generator. The game will be in full resolution using 16 bit images.



Is the camera playing tricks on me, or are those maps appearing near instantaneously? The full maps appear to pop in much faster than I thought 320x240 pixels could be pushed. (somewhere from 1/3rd to 1/6th of a second?)
Title: Re: Snake TI84+C
Post by: AssemblyBandit on September 30, 2013, 06:38:45 am
DJ: Maybe....

Runer112: I disable the base image while drawing so the user doesn't see it, the speeds you mention sound pretty accurate for normal drawing :(
Title: Re: Snake TI84+C
Post by: Sorunome on September 30, 2013, 07:04:06 am
that speed O.O
Title: Re: Snake TI84+C
Post by: Streetwalrus on September 30, 2013, 12:22:43 pm
That ^ *.*
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on September 30, 2013, 03:13:58 pm
DJ: Maybe....

Runer112: I disable the base image while drawing so the user doesn't see it, the speeds you mention sound pretty accurate for normal drawing :(
Is it in 320 mode, though? If we can disable the screen content while drawing by turning the screen white or black, it might be an handy feature for xLIB.
Title: Re: Snake TI84+C
Post by: AssemblyBandit on September 30, 2013, 04:20:42 pm
Yeah, Snake is 320x240. For 160 mode you normally disable the base image and enable partial image 0 and 1. The only color you get though is white. Remember in Buttonz how I turned off the backlight to make it 'black'? Unfortunately, that resets the contrast, so you would have to save and restore it. IViewer does the same thing so that users cant see the image loading, it would be nice if I could write some text to it!
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 03, 2013, 08:43:36 pm
Project complete.

I've uploaded the game to ticalc.org and added the download in Omnimaga, heres a video of it. Now to finish Pacman and start Scarface.

Title: Re: Snake TI84+C
Post by: Sorunome on October 04, 2013, 01:49:30 am
So awesome :o
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on October 05, 2013, 04:44:14 pm
I downloaded this but didn't have time to try it because I am pretty sick (I slept through most of it), but I might do so later. :)
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 05, 2013, 05:51:12 pm
Even though its a simple game, overall I'm proud of it. It's pretty hard at the later levels and I haven't beat level 10 yet! Graphically, its nice, there probably aren't going to be too many games that use 16bit images at full resolution. Not one byte is left to add anything. I had to remove 3 textures and optimize it for size to get all the necessary stuff in. The title itself is pretty small and it has a bug. I wrote the wrong length of the image in the drawing routine but it looked better than the normal image, so I kept it in! Originally you got a point for every time you moved. To keep players from looping infinitely collecting those points, I had planned to add in a hawk that appeared after a while and follow the player around to keep them dodging and moving. It would be nice to dim and set the screen to low color on pause, but there just wasn't any room, so I left it out. After Pacman, I will probably start doing multi-page games. 16k isn't enough for me :)
Title: Re: Snake TI84+C
Post by: Sorunome on October 05, 2013, 05:53:11 pm
wha, that sounds like you surley used your space well! :D
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 06, 2013, 08:38:58 pm
When I start off I code more towards speed and then towards the end if necessary, I'll go back and optimize for speed. There is still a few things I could do like move routines around so jr works everywhere. I think that is probably my biggest code space saver, because I always use jp. Optimizing code doesn't really free up that much space though, I'd say about 100-200 bytes. It's good enough to fit in a small feature, but when I need lots of space, I can remove graphics, which I hate doing! The graphics are what this calc is good at. Oh, and from mockup to finish, it only took me about 10 days! Not too bad!
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on October 06, 2013, 11:21:23 pm
I just tried this and this is really great! I like the features. However how did you manage to get 2500+ points?? O.O
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 06, 2013, 11:34:00 pm
Thanks DJ! Start from level 0 and every time a bug shows up eat as many spiders as you can! They're worth 50 points and can rack up points faster than eating the mice and frogs.

*Going to play it right now!
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on October 07, 2013, 12:09:58 pm
One suggestion I have would be to make the game so that when you lose a life, your score doesn't reset back to zero. It kinda sucks if I have an amazing run, only to see the score of my last remaining life be saved. D:

Also speed modes would be cool.
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 07, 2013, 04:39:36 pm
That will definitely be changed! Its enough to lose a life not lose the points too! And its hard enough just to get through the level alone, and when you're doing really good, thats when you die! I will probably remove the skip level, and add options for length and speed.
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on October 07, 2013, 10:39:50 pm
Actually after posting that last comment, I just realized that we could already finish levels. I thought we couldn't at first because they were so long lol. XD
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 12, 2013, 09:58:00 pm
@DJ: Originally I had it set to advance levels after reaching a length of 160! It was impossible, so I lowered it to 60. In v1.2, when short is selected the length is 40 and for long its 80.

Snake has been updated to v1.2 and in my opinion, is a lot better. I have also created a DCSE version for anyone using the shell.



Title: Re: Snake TI84+C
Post by: DJ Omnimaga on October 13, 2013, 01:14:38 am
Awesome update :D
Title: Re: Snake TI84+C
Post by: Sorunome on October 13, 2013, 05:18:41 am
Looking awesome! :D
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 14, 2013, 01:29:58 am
Thanks DJ and Sorunome!
Title: Re: Snake TI84+C
Post by: Adriweb on October 14, 2013, 11:18:07 am
Yep, very nice, congratz :)
Title: Re: Snake TI84+C
Post by: Streetwalrus on October 14, 2013, 04:16:20 pm
/me expects a ticalg.org feature :D
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 14, 2013, 04:31:37 pm
Thanks adriweb and Streetwalker! I shouldn't have put it out so quick. I did have to remove another texture to fit in the code, but I can always optimize the textures. Pacman should be released soon, trying to fix a bug with the ghosts that is getting really annoying to find. And wait till you see what I'm working on next, a demo will be out soon!
Title: Re: Snake TI84+C
Post by: DJ Omnimaga on October 15, 2013, 03:32:03 pm
That reminds me, have you ever gotten issues with sprites flickering when making 84+CSE games? I know with Frogger it's not a big problem due to sprites moving on plain colors, but what about Pacman where they walk over dots?
Title: Re: Snake TI84+C
Post by: AssemblyBandit on October 15, 2013, 04:54:46 pm
Yeah, in Buttonz there is no flicker but you can tell its not synched with the refresh when a partial line is only visible. In Pacman, I redraw the whole sprite regardless of whether it needs it or not which amplifies the problem. Because its in interlace mode, you can see the individual vertical lines going through the sprite. The lcd screen is actually pretty slow, I have to add pauses after telling it to hide the screen, invert it, and scroll. In Tunnel, after telling it to scroll, it gets around to scrolling the screen halfway through drawing the sprite which causes ghosting. I haven't really tested it out yet, but I have found some interesting registers. I'm hoping that one is for refresh and maybe one to let me know when a command such as scroll has executed.
Title: Re: Re: Snake TI84+C
Post by: DJ Omnimaga on October 16, 2013, 12:41:05 pm
Thankfully we got used to flickering on the Atari 2600 so unless the Pacman ghosts flickers as bad as the crappy Atari port from 1982 it should probably be fine.