Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Deep Toaster on March 22, 2012, 07:39:01 pm

Title: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 22, 2012, 07:39:01 pm
When I saw that the topic for the Axe section of TI-Concours 2012 was "Snake," I thought how common of a game that was and how many essentially identical versions have already been made, so I decided to go overkill. Enjoy :)

(http://img.removedfromgame.com/imgs/0-snake.gif)
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: aeTIos on March 22, 2012, 07:40:41 pm
OH MY GOD
I hoped my game was  good enough to win. <.<
WHY do you need 2 nspire cxs?
lol
Erm, screenie?
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Yeong on March 22, 2012, 07:42:21 pm
lol that looks EPIC!/me thanks god that he didn't join axe part of the competition
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 22, 2012, 07:42:28 pm
OH MY GOD
I hoped my game was  good enough to win. <.<
Yay, that's the reaction I was aiming for ;D The contest is far from over yet. Don't panic.
WHY do you need 2 nspire cxs?
I don't have one yet <_<
Erm, screenie?
Already edited in. You beat me to the post.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: aeTIos on March 22, 2012, 07:44:20 pm
Hm I thought you won a cx with simul 2? O.o
Also meh it doesnt look as epic as I thought :P
But still very nice.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 22, 2012, 08:08:53 pm
lol that looks EPIC!
Thanks!
Hm I thought you won a cx with simul 2? O.o
Nope, that goes to Xeda.
Also meh it doesnt look as epic as I thought :P
Darn. Maybe that's because it renders two columns at a time—that's the sacrifice I had to make to make it run at 6 MHz.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: aeTIos on March 22, 2012, 08:34:00 pm
Dafuq? I thought you was first in zContest. <_<
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: DJ Omnimaga on March 22, 2012, 08:50:01 pm
That is awesome. You gotta add images (that zooms in) of the apples, though. :P

Btw I just noticed you even generate diagonal walls O.O
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: LincolnB on March 22, 2012, 09:31:51 pm
PROGRAM ALL THE RAYCASTERS! hehe looking good.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 22, 2012, 10:11:30 pm
PROGRAM ALL THE RAYCASTERS! hehe looking good.
That just gave me an idea for a vertically raycasted quadratic solver O.O/me goes off to make
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Yeong on March 22, 2012, 10:12:01 pm
i'm still glad that I didn't join axe contest. :P
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 22, 2012, 10:15:12 pm
You know, I could make the graphics twice as detailed for 15 MHz calculators with almost no effort on my part. Should I do that?
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Yeong on March 22, 2012, 10:16:20 pm
yesz. I would love to see the screenshot of it. :D
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: LincolnB on March 22, 2012, 10:17:54 pm
Detailed in what way?
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 22, 2012, 10:47:51 pm
Detailed in what way?
It would look like this:

(http://img.removedfromgame.com/imgs/1-snake.gif)

As you can see, angles are rendered slightly better. (It's also a bit faster, but that's an easy fix.)
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: zeldaking on March 23, 2012, 12:08:54 am
I will quote:
Oh my God!!!
That is epic!! I tried making a raycaster but failed, kudos to you. Dang...
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 23, 2012, 12:39:09 am
Thanks! This is my first time playing with raycasting. I learned it from http://www.permadi.com/tutorial/raycast/index.html (top Google search result, anyway) and I really recommend it if you want to learn.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: TIfanx1999 on March 23, 2012, 08:14:34 am
Wow Deep Thought, this looks pretty awesome! :O You should add fruit to collect. When all the fruit is collected you move to the next level. Hmm.... now I'm getting ideas.. XD
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 23, 2012, 06:37:03 pm
Wow Deep Thought, this looks pretty awesome! :O You should add fruit to collect. When all the fruit is collected you move to the next level. Hmm.... now I'm getting ideas.. XD
The fruit is a single flashing dot, and when you get six of them you go on to the next level :)
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: LincolnB on March 23, 2012, 10:23:27 pm
Thanks! This is my first time playing with raycasting. I learned it from http://www.permadi.com/tutorial/raycast/index.html (top Google search result, anyway) and I really recommend it if you want to learn.

Exactly how I learned, too. I think this is a magic tutorial.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Runer112 on March 23, 2012, 10:24:59 pm
Thanks! This is my first time playing with raycasting. I learned it from http://www.permadi.com/tutorial/raycast/index.html (top Google search result, anyway) and I really recommend it if you want to learn.

Exactly how I learned, too. I think this is a magic tutorial.

Take a guess where my knowledge for YAAR came from. :P
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on March 23, 2012, 11:49:25 pm
I guess it's first on Google for a reason, eh?
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: TIfanx1999 on March 24, 2012, 08:39:12 am
Wow Deep Thought, this looks pretty awesome! :O You should add fruit to collect. When all the fruit is collected you move to the next level. Hmm.... now I'm getting ideas.. XD
The fruit is a single flashing dot, and when you get six of them you go on to the next level :)

Oh... lol. Well, you're awesome Deep! :thumbsup:
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: kindermoumoute on March 24, 2012, 10:11:33 am
{°X+1}r.E00FF=V and ({°Y+1}r.E00FF=W)

This line is exactly the same than :

{°X+1}=V and ({°Y+1}=W)

Show-off.  :P
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: noelthebest on March 24, 2012, 11:45:29 am
You said you wouldn't tell anything before the end of round 2... :P
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: kindermoumoute on March 24, 2012, 01:04:06 pm
It has no link with TI-Concours, that's just funny. ;)
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Xeda112358 on March 29, 2012, 03:28:29 pm
O.O This is the most awesome snake game I have seen ever o.o I cannot believe I had not seen this before now o.o
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on July 30, 2012, 06:47:51 pm
New version (in the original post) fixes a bug with high-score saving that could potentially corrupt a byte of RAM (http://ourl.ca/13884/254783/) under certain conditions.

I also took the opportunity to implement a feature someone suggested—you can now navigate by "turning" left and right (rather than just pressing the arrow key in the direction you want to go). Use Y= to turn left and GRAPH to turn right. You could use this to play the game like a true raycaster game, watching only the 3D panel and turning left and right when you need to, but the view isn't too great and hitting the wall incurs significantly more damage than in, say, DOOM :P
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: kindermoumoute on July 30, 2012, 06:49:04 pm
YYYaay, this is exactly what was missing!
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on July 30, 2012, 06:50:24 pm
Yeah, I reread your notes (that you made while grading Snakecaster for the contest) this morning :D And it took all of four lines of code, so why not?
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: squidgetx on July 30, 2012, 08:44:53 pm
Is your raycasting pixel-based? (Did you use the 2d map as the data for the rays cast?)
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: DJ Omnimaga on July 30, 2012, 08:47:09 pm
Glad you resumed this. :D
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on July 31, 2012, 12:02:12 am
Is your raycasting pixel-based? (Did you use the 2d map as the data for the rays cast?)
Yeah, I did. It cut out the need for another block of memory to hold map data, and since the map was block-based rather than wall-based, the program does only half as much parsing as it normally would. There was no need to make it wall-based anyway since all "textures" were just black :P
Glad you resumed this. :D
Thanks, but I think this is all I'm going to do. I've uploaded the ZIP to ticalc.org already, so I'll put it on Omni too as soon as I get the chance. I came up with this idea partly as a joke anyway. Turned out better than I expected.
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: DJ Omnimaga on August 01, 2012, 04:29:05 am
Aaaw ok. One suggestion I had was to make the snake height lower in the 3D view to distinguish it from walls. D:

Maybe you could do a 3D version of this as sequel? O.O http://www.ticalc.org/archives/files/fileinfo/96/9683.html (assuming that's even possible in Axe)
Title: Re: Snakecaster: a 3D Nibbles game, sort of
Post by: Deep Toaster on August 01, 2012, 07:26:18 pm
That's actually not far at all from what I'm already doing. All I would need to do is in the 2D part—allowing the snake to go in any direction and changing the controls and stuff. The raycaster should already be able to handle it.

In fact, I changed the 3D view to turn in two steps (giving you a 45-degree view for a split second while turning) after I'd already pretty much finished the program. I could have just as easily have made it turn at other rates, such as 30 degrees a frame for three frames.
Title: Snakecaster: A 3D Nibbles Game
Post by: Deep Toaster on August 09, 2012, 03:47:56 pm
Snakecaster: A 3D Nibbles Game



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=818

http://www.ticalc.org/archives/files/fileinfo/449/44963.html