ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: News :: Lots and Lots of Slithery, Twisted Fun

Lots and Lots of Slithery, Twisted Fun
Posted by Michael on 26 January 2004, 23:45 GMT

[Snake 2]For those of you in an chordate mood, Reggie Tucker has updated Snake 2, intended to be a 83+ clone of the nibbles game found on many cell phones. It's still under development, and only the "New Game" feature is working in this v0.8 release.

[Mr. Worm]But, if you have a 89, there's Mr Worm by Jean-Francois Geyelin, an expanded version of nibbles where your annelid friend can move in forty directions instead of the usual four. May the apple consuming commence!

  Reply to this article


The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.


Re: Lots and Lots of Slithery, Twisted Fun
Brigham Diaz  Account Info

Sweet game. Just as addicting as UncleWorm.

Reply to this comment    26 January 2004, 23:51 GMT

Re: Lots and Lots of Slithery, Twisted Fun
Konrad Meyer  Account Info
(Web Page)

fun fun fun... i lov snake games

Reply to this comment    27 January 2004, 00:30 GMT


¤
burntfuse  Account Info

I do too. It's amazing how many there are in the archives. (Not that that's a bad thing!!!)

Reply to this comment    27 January 2004, 22:00 GMT


¤
burntfuse  Account Info

I tried out snake 2-it's great!!!

Reply to this comment    28 January 2004, 23:23 GMT

Re: Lots and Lots of Slithery, Twisted Fun
Konrad Meyer  Account Info
(Web Page)

programming-wise... how would you find out where to erase the snake if it moves in 40 directions?

Reply to this comment    27 January 2004, 00:31 GMT

Re: Re: Lots and Lots of Slithery, Twisted Fun
stickboy  Account Info
(Web Page)

You store where it has been and check it later to erase.

Reply to this comment    27 January 2004, 00:37 GMT


Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Konrad Meyer  Account Info
(Web Page)

wouldnt that take loads of space for a long snake though?

Reply to this comment    27 January 2004, 01:44 GMT


Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
stickboy  Account Info
(Web Page)

Thats how I did it in my Snake 2...but I'm going to change it to use an array...the max size for the array in any Snake game would be 768 bytes.

Reply to this comment    27 January 2004, 01:56 GMT

Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
-Gerhalt-  Account Info
(Web Page)

Yeah, Reggie! You got your game featured! This will give me a motive to work on Broken Paradise more! And this is an idea I thought would be cool: Make a scrolling snake game. Anyway, just a thought!

Reply to this comment    27 January 2004, 02:19 GMT


Re: Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Ben Cherry  Account Info
(Web Page)

what is the standard procedure for getting something featured. Do you upload it, and then in the "notes to archiver" section you say: "This game is awesome, you should feature it?" Or do you send someone an email and say, "I've got this great game, you wanna feature it?"

Reply to this comment    27 January 2004, 02:24 GMT


Re: Re: Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Morgan Davies  Account Info
(Web Page)

That's the number 1 question in all ticalc.org history besides "I have a lot of time to help you guys out, can I become an admin?"

If you write in the "comments to filearchive" box that probably won't do you much good. I usually forget to look back over those after I finish a uploading session. There are two things that can help you out in my mind:

1. When I process the screenshots I usually take note of which programs look cool, so PROVIDING SCREENSHOTS HELPS, becasue I then send my sugestions to Michael.

2. Secondly, send an e-mail to news@ticalc.org if you think your file or any recently updated file is featurable. The file will be reviewed at the least.

Reply to this comment    27 January 2004, 03:59 GMT


Re: Re: Re: Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
nyall Account Info
(Web Page)

>>Secondly, send an e-mail to news@ticalc.org if you think your file or any recently updated file is featurable. The file will be reviewed at the least.


I have to ask others to consider me a good programmer?

Reminds me of something I once did to bug a sister. I stood behind her and started yelling "Give me attention." Note to self: I need to buy a mega-phone.



The one and only Cheerio:
-Samuel S

Reply to this comment    28 January 2004, 04:17 GMT


Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Memwaster  Account Info

... only on a 96x64pxl screen.

2000 bytes on a TI89

1024 bytes on a TI85/86

more on a TI92+/Voyage 200

Reply to this comment    27 January 2004, 12:03 GMT


Re: Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
BlackThunder  Account Info
(Web Page)

Well, I hope that the snake isn't going to be one pixel wide, and that no one would ever survive that far.

Reply to this comment    30 January 2004, 22:03 GMT


Re: Re: Lots and Lots of Slithery, Twisted Fun
no_one_2000_  Account Info
(Web Page)

Well, this may be really inneficient, but here's my guess at all of this.
Store the coordinates of each dot (which could be represented by a pixel, of a 2x2 block of pixels) of the snake in an array. When you move, every array element moves down one and you add the coordinate of the new position. You can also detect if you hit yourself or a wall easier, this way, because you can just search through the whole array to see if the "head" of the snake touches any of the other points on the snake.

That's sort of how I did it in the snake games that I wrote in this fashion. I'm sure there's a much better way to do this, though.

Reply to this comment    27 January 2004, 15:42 GMT

¤
burntfuse  Account Info

That's the only (good) way I can think of...the other way would be to analyze each new coordinate, and create a sort of vector table with the line end coordinates, shortening the length of each line....wait, that might be a good way to do it :-) ....*opens Assembly Studio and starts coding*.

Reply to this comment    27 January 2004, 22:05 GMT


Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Eugene Talagrand Account Info
(Web Page)

Why move every element in the array down one? Create a cyclic buffer - keep a variable that says which position in the buffer is the 'head', which overwrites the previous tail. If there is a maximum snake length, this is all constant-time, if not, computation is needed only when resizing.
As for collision detection -- a copy of this data can be stored in a hash table or balanced binary search tree indexed off of the coordinates of the point to allow for log(n) access.

Another idea I had which could have the potential to be much much faster is not to keep track of anything except the head and tail positions. Video memory is used to determine if the head has moved into an 'on' pixel. No need to test for edges or anything. Of course, in this case, the hard part is erasing the tail of the snake. This can be done by searching for lit pixels near the tail. (doesn't work it the snake can 'touch' without crashing -- ie no border around snake).

Reply to this comment    28 January 2004, 18:17 GMT


Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Ben Cherry  Account Info
(Web Page)

I had an idea a few months ago that i never tried out for a nibbles game. This would have to be done in C, because of pointers (unless ASM has pointers too). You make a 1D array, a list, out of characters, and it is twice the worm's length, an x and y value for each point. As the worm moves, you erase the last point, draw the new point, and then add the size of a character (1 byte?) to the pointer and then write the head's coordinates into the new spot. So in effect, your worm is a list, and that list actually snakes through the memory. Here's a visual, if it comes out right when i post:
______Block of memory______
|___|___|___| ___|___|___|___|
^the pointer to the start of the array points here

then the pointer is increased by one, so the viewing window of our 6 element array, for a 3-long worm, is shifted. Thus the old head becomes a part of the body, and the old tail is shifted away. The big problem if this would actually work at all is that this would be snaking its way through memory and probably start messing up protected memory. I doubt this would ever work, but its just an idea i had...

Reply to this comment    28 January 2004, 23:54 GMT

Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Konrad Meyer  Account Info
(Web Page)

ya... i did something like that in basic a long time ago, and used lists, but there were problems cause the max list size is 999 values

Reply to this comment    29 January 2004, 01:18 GMT


Re: Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Ben Cherry  Account Info
(Web Page)

well, the thing is, the list stays at a size of 6 elements in my example. But the actual memory the list points to shifts. If you dont know C and how pointers and arrays work this probably wont make any sense. And even if you do know C, it still might not make any sense because i dont think it will work...

Reply to this comment    29 January 2004, 06:04 GMT


Re: Re: Re: Re: Re: Lots and Lots of Slithery, Twisted Fun
Chivo  Account Info

Well, you can store four pointers instead of one to get a circular buffer: head and tail (heh, literally), and begin and end. head and tail are pretty obvious, I think. The begin and end pointers are the upper and lower bounds of the buffer.

When you put in a new coordinate for the head, store the (x,y) at head and increment it; if head matches end, then set head to begin. Similarly, do the same for tail, but get the (x,y) from tail instead of storing it.

By the way, ASM doesn't have pointers, exactly ("pointers" is a C concept). In ASM, a variable can hold the address of another variable or object, so you could call that variable a "pointer".

Reply to this comment    30 January 2004, 03:06 GMT

1  2  3  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2012, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer