Author Topic: Casio Prizm: Snake Game  (Read 17035 times)

0 Members and 1 Guest are viewing this topic.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Casio Prizm: Snake Game
« on: January 19, 2011, 08:03:05 pm »
---Updated With Newer Version---
As many know the Casio Prizm recently came out. Unfortunatley the BASIC drawing commands can be quite slow. Last week I experimented with a simple snake game, but it was really slow and took forever to play. Working on some optimization I found a new way to draw with lines instead of pixels to allow the game to run much faster. Attached you will find the program. Please comment on what you like, what you don't like and any glitches.




« Last Edit: September 19, 2011, 09:05:31 pm by z80man »

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Casio Prizm: Snake Game
« Reply #1 on: January 19, 2011, 08:10:06 pm »
Just tried it. Pretty nice!

Now I just have to examine your source.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm: Snake Game
« Reply #2 on: January 19, 2011, 08:26:03 pm »
For anyone who wants to view the source for optimizations and glitches I'm posting it here in txt format using the OS's handy program to txt function.  ;)

Edit: the program is uncommented so a few commands might seem a little strange.
« Last Edit: January 19, 2011, 08:27:39 pm by z80man »

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio Prizm: Snake Game
« Reply #3 on: January 19, 2011, 11:02:33 pm »
Cool, gonna try it on my calc now.

EDIT: That looks nice actually. I think it definitively needs to have stuff you must eat on your way or a goal, though, so you don't just move around. Nice start, though. :)
« Last Edit: January 19, 2011, 11:07:36 pm by DJ Omnimaga »

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm: Snake Game
« Reply #4 on: January 19, 2011, 11:36:11 pm »
I'll try to expand on this game as much as I can without slowing it down. I already have an idea to add goals without slowing down the game. I wish though I could make the menu faster. Of course I could just use the default menu, but that wouldn't look as nice.




New update: Right now I'm at school, but once I get home I will post the new version which features targets to hit for points.
« Last Edit: January 20, 2011, 10:46:30 am by z80man »

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm: Snake Game
« Reply #5 on: January 20, 2011, 06:32:36 pm »
Here it is the new version of Prizm Snake. Right now I'm working on a couple of small basic games for the Prizm which I will later compile into a game pack. For snake though the game is mostly complete. I'm still going to work on trying to optimize more for size. Speed probaly won't get a whole lot faster. There were many other basic games I wanted to port to the Prizm, but they would just be to slow. Instructions are posted below

Menu: arrow keys to select difficulty, shift key to begin game
In game rules: arrow keys to change direction
Top left of screen shows how many lives you have left (max of 9)
You start with zero, but gain one for every black dot you hit.
Everytime you hit a wall or yourself you will lose one life and pass through
The first black dot is worth 50 points, second 100, third 150 ...
You gain one point for every space you go
You immediately lose when you hit a border wall regarless of how many lives you have left.
In medium your final score is x2, hard x3, and very hard x4

I could not find any bugs, but do tell me if you find any. Any comments would be much appreciated.  :)

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio Prizm: Snake Game
« Reply #6 on: January 20, 2011, 09:27:28 pm »
Cool, I'll give it a try soon :)

Are you planning to eventually add them to the downloads section? (When I actually add a Prizm section) Also you should try making an home screen version of Snake just to show the speed difference.

EDIT: Tried it and it's nice, but collision detection seems a bit bugged. Sometimes I go through the snake or lines. ???
« Last Edit: January 20, 2011, 10:45:51 pm by DJ Omnimaga »

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Casio Prizm: Snake Game
« Reply #7 on: January 20, 2011, 11:07:22 pm »
With the collision detection that was an experiment I was trying with adding life to the game. The number in the top left shows how many walls you can hit before gameover. I don't think I'm going to keep that in the final version. I'm also going to try a slightly different version of the engine where coodinates are stored in a matrix instead of doing the slow pixel test. This would allow the back end of the snake to disapear over time.
« Last Edit: January 20, 2011, 11:07:52 pm by z80man »

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio Prizm: Snake Game
« Reply #8 on: January 21, 2011, 01:18:25 am »
Oh ok I didn't think about that, and wow I didn't realize pixel test would be that slow. On the 83+ it's like the fastest way to do collision detection in BASIC. O.O

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Casio Prizm: Snake Game
« Reply #9 on: October 24, 2012, 04:11:55 pm »
Oh ok I didn't think about that, and wow I didn't realize pixel test would be that slow. On the 83+ it's like the fastest way to do collision detection in BASIC. O.O

Really? It seems to have always been popular wisdom not to use pixeltest in the casio communities.



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Casio Prizm: Snake Game
« Reply #10 on: November 03, 2012, 01:13:15 pm »
Holy necropost batman flyingfisch! :O

But yeah in the TI community that's one of the fastest collision detection method and in certain cases can be the most accurate (if for example all your solid tiles have black outlines and you some aren't rectangular). String collision detection is kinda slow when you need to check many elements and lists/matrices are just prohibitive in terms of memory usage (at least 9 bytes per list element, so a 16x8 map takes 1152 bytes of RAM. (the string counterpart takes between 128 and 256 bytes and pictures that works with pxl-test takes 16)

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Casio Prizm: Snake Game
« Reply #11 on: November 03, 2012, 02:05:17 pm »
Woah, i didn't even realize I necroposted... O.O

I thought this topic was more recent than Jan 2011. Sorry. :-\


« Last Edit: November 03, 2012, 02:05:58 pm by flyingfisch »



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0