PDA

View Full Version : Snake Game



Yakman
01-11-2008, 11:52 PM
Snake game, like the ones that come with some mobile phones.

while i was making this, i got a little hooked on it, i really didnt know it was possible to be hooked on
a game you created yourself :p

A long time ago, i tried to make a game like this in SCAR, however i did not think out the
structure very well, and there were some very annoying bugs which my bad structure was not able
to fix, so i scrapped the project.

a few days ago, i got some inspiration on a good structure, i wrote some pseudocode and managed to
create this system, i feel it is well made, the only failing of it is that i did not remember
about LinkedList's throwing of a ConcurrentModificationException when it was edited during iteration,
so i had to make a messy fix and have a field to store the new segment until iteration was finished.

i made next to nothing effort for the graphics, it was only to try to see if my idea for the structure
would work, however, there are many polymorphic methods which are used for rendering and drawing, and if
anyone wants to try to improve the graphics, the structure will allow them without too many difficulties.

this project uses Apache ANT (google it) to compile, if you program in java, i highly recommend you get
this open-sourced tool.

speaking of which, open sourcing is the best thing since the stream engine, its only those evil capitalists
at microsoft who are only intrested in money who hold back open sourcing and human development.

http://img174.imageshack.us/img174/9895/screenshotrk7.png

R0b0t1
01-12-2008, 12:47 AM
Yeah, I like programming communism too. :p

Nice game! And you taught me, master.

Wizzup?
01-12-2008, 10:34 AM
Ah. I see you posted it. Nice. ;)

Harry
01-12-2008, 10:52 AM
Woah, nice! I don't have this on my mobile though.

HayHay89
01-12-2008, 11:01 AM
this is awesome i max was 52 im gonna try and get highest
wats the record ?

Yakman
01-12-2008, 12:36 PM
I got 85 or so when I was playing with it

Sumilion
01-12-2008, 12:51 PM
I got 85 or so when I was playing with it

I got around 50, hehe, anyone want to make a scar script for this ? x)

Great job yakkerdieyak (I didn't use that one in a long, long time :))

n3ss3s
01-12-2008, 01:26 PM
I got around 50, hehe, anyone want to make a scar script for this ? x)
On it.


Very nice Yak, and yes, addicting :)

EDIT: 59


Some possible improvements:

add the bugs, I mean the ones that give you more points.

Then maybe also different speed levels :)

Good job.

Dan Cardin
01-12-2008, 01:55 PM
smartzkid already made a scar this :)
at sp0rk-eh.com

and nice yakman :)

GoF
01-12-2008, 03:25 PM
Used to have this on my Nokia 3310 or something.. Got like 3000 score in it as in the end the worm didnt grow and there was like 1 "square" of space in between where all food spawned... But seems kewl.

1700th post btw.

Smartzkid
01-12-2008, 03:32 PM
Main problem I had making this on SCAR was how slow it got when it had to repaint all the sections.

For a few seconds, I was curious how you got around that problem, then I remembered it was java, so it shouldn't have affected you too badly :p

Sounds intriguing, Ima take a look. Good job.

codx1
01-12-2008, 03:46 PM
Nice game, I used to play this on my mobile phone

my score: 110

n3ss3s
01-12-2008, 04:48 PM
I wish SRL Members could buy them matrix machine things that teach you kung fu and hopefully Java too =/

R0b0t1
01-14-2008, 12:22 AM
Java-Fu?

Nah, I took my omnipotence disk first.

HyperSecret
01-15-2008, 06:03 AM
thanks yakman ive been looking for something like this to learn off of, will definitely help me

Rs-Gp-4U
01-26-2008, 09:57 AM
I know this post is 11 days after last one :S,
But the games good (Y)!
But when you die it just stays there and you have to close and re-open program, can you make it to have option to restart? :D