scene.org File Archive

File download

<root>­/­demos­/­compos­/­oldschool_palmos_2003­/­contest1_os_3_5/tinysnake.zip

File size:
4 892 bytes (4.78K)
File date:
2024-12-30 05:45:01
Download count:
all-time: 2

Preview

  • readme.txt 3.18K
  • Source/Snake.c 5.29K
  • Source/Snake.h 915B
  • TinySnake.PRC 912B

file_id.diz

TinySnake Readme

Benjamin Strahs
bstrahs@optonline.net
12/29/03 8:45 AM

=======================
Files in Distribution
=======================
	-TinySnake.prc
	-Source
		-Snake.c
		-Snake.h
	-Readme.txt (this file)

=======================
License
=======================
	TinySnake is freeware and may be distributed without charge. Any commercial distribution
	must first obtain written approval. The same terms apply to the source code. 
	Share and enjoy!

=======================
Installation
=======================
	-Minimum requirements: In order to run TinySnake needs 1k of memory (940 bytes) and 
	Palm OS 1.0 or above.
	-Copy TinySnake.prc to your Palm using your favorite install tool. To run, simply tap 
	on the TinySnake icon. To uninstall delete TinySnake.prc.

=======================
Game Instructions
=======================
	TinySnake is a rendition of the venerable game Snake. The goal is to eat the apples 
	(small circles) while avoiding crashing into yourself and the walls. The Datebook and 
	Address buttons turn the snake left, the Todo and Memo buttons turn the snake right, 
	while the up and down buttons move the snake up and down. Good luck and have fun!

=======================
Game Details
=======================
	TinySnake was written on a plane ride to Egypt and was a creation of many hours of 
	sitting in the same small seat with only my trusty Palm IIIx for entertainment. 
	I chose Snake because my first attempts at animation and movement were at a simple 
	clone of Snake. TinySnake, as the name suggests is currently the smallest game 
	for the Palm OS platform weighing in at only 940 bytes (the actual code is only 740 
	bytes however the icon takes up the rest of the space). It is compatible with ALL 
	versions of the Palm OS, from 1.0 to 5.2. The original framework was written completely
	on a Palm IIIx using the OnboardC toolset. Once I got home, I ported it to PRC Tools
	for better compiler optimization. 

=======================
Technical Details
=======================
	In order to make TinySnake as small as possible I used two strategies. First I removed 
	the default startup code provided by PRC Tools and the PilotMain routine. I replaced 
	this with a custom optimized version. The second strategy was to store all of the game 
	data in the screen. While most Snake games store an array of the board and test each 
	element for a crash or an eaten apple, I merely drew the Snake to the screen, and used 
	WinGetPixel() to test for crashes or an apple. Another advantage was that WinGetPixel() 
	will return a constant if the points passed to it are not on the screen so it was easy 
	to test if the Snake left the bounds of the board. By polling the screen I avoided large 
	arrays.

=======================
About Me
=======================
	I am a 16 year old resident of New Jersey whose hobby is programming. I have worked with
	many different platforms and systems, including the Palm. I started programming for the
	Palm when I was 12 and have since branched out into shareware and freelanced for 
	companies around the globe. If you have any questions or comments, please send them to 
	bstrahs@optonline.net.