android
  #1  
Old 04-06-2010, 04:23 AM
Zaffo Zaffo is offline
Junior Member
 
Join Date: Mar 2010
Location: Holland
Posts: 21
Default Snake - Dev Thread [version April 14th]

Hey,

As my first app for the Zen and first app written in Lua I made Snake. At the moment there is some more code in it than needed, but I made some preparations for thinks I want to add.

Version 0.9.3
NEW:
Pause using the power button
3 play modes
Multiple collectables
CHANGED: Bounds for touch
FIXED: Turning issue
TO DO: Create levels, independent user-set settings
(Un)known issues:
-

Version 0.9
Coming:

New menu with settings for different block size and snake speeds.
Support for levels.
More collectables.
Known Issues:
No sharp corners possible. After a turn there is always a straight part. Solved


The controls are at the moment done by touching the screen. Touching the top half or bottom half will change the direction to up or down and touching the left or right half will change the direction to left and right. Almost like that. But the boundary is now dynamic, between the middle of the screen and the snake it's its head.

Please let me know what you think.

Remarks version 0.9.3:
I still need to restyle the menu; ideas; suggestions and code is welcome.
Delete the 4 lines of code at line 371 to remove the hardcoded background now in place as a test for levels. Uncomment some of the lines above that code to get more walls.
In the menuMain() function you can change the speed of the snake if it too fast for you.
Have fun.

Update: Recently I (re)started playing games on my Zen. Ending up with playing snake for hours (in total...) But that's in the train, where I cannot edit the code. But maybe I will pick that up again soon.
Attached Images
File Type: png Snake v0.9.3 Menu.png (41.6 KB, 58 views)
File Type: png Snake v0.9.3 Game2.png (28.2 KB, 70 views)
File Type: png Snake v0.9.3 Game3.png (28.2 KB, 74 views)
Attached Files
File Type: zip Snake 0.9.zip (11.1 KB, 89 views)
File Type: zip Snake 0.9.3.zip (4.7 KB, 158 views)

Last edited by Zaffo; 03-27-2011 at 10:46 AM. Reason: Update added
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 04-06-2010, 04:45 AM
Diddykong13's Avatar
Diddykong13 Diddykong13 is offline
Junior Member
 
Join Date: Jan 2010
Location: England
Posts: 43
Default

Very nice app, works perfectly, and i love the fact that the top 10 highscores are displayed rather than just 1 or 3
__________________
Current Languages:
-English
-ActionScript 2.0
-Lua (almost)
Reply With Quote

  #3  
Old 04-06-2010, 05:13 AM
Zaffo Zaffo is offline
Junior Member
 
Join Date: Mar 2010
Location: Holland
Posts: 21
Default

The code for saving and loading more than 1 highscore stays the same. When you add some more zeros to the highscores.lua file, more highscores are saved. But at the moment that only works if your score is in the top 10.
Reply With Quote

  #4  
Old 04-06-2010, 05:29 AM
keirien keirien is offline
Junior Member
 
Join Date: Feb 2010
Posts: 39
Default

Quote:
Originally Posted by Zaffo View Post
The code for saving and loading more than 1 highscore stays the same. When you add some more zeros to the highscores.lua file, more highscores are saved. But at the moment that only works if your score is in the top 10.
yeah i could use it
Reply With Quote

  #5  
Old 04-06-2010, 01:23 PM
G.Ri G.Ri is offline
Junior Member
 
Join Date: Jan 2010
Posts: 37
Default

The contents of your .zip file are kind of a mess. But besides that, this is awesome!
Reply With Quote

  #6  
Old 04-07-2010, 06:13 AM
Zaffo Zaffo is offline
Junior Member
 
Join Date: Mar 2010
Location: Holland
Posts: 21
Default

Quote:
Originally Posted by G.Ri View Post
The contents of your .zip file are kind of a mess. But besides that, this is awesome!
There are probably some backup files in the .zip, which are hidden on my system so I forgot about them. You can delete all files ending with ~, you only need a main lua file and png image and the snakemenu.txt file.
Reply With Quote

  #7  
Old 04-13-2010, 05:24 PM
Zaffo Zaffo is offline
Junior Member
 
Join Date: Mar 2010
Location: Holland
Posts: 21
Default

The latest version - 0.9.3 - should be without backup files.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:30 PM.