• Advertisement

Archived

This topic is now archived and is closed to further replies.

Snake

This topic is 6441 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just woundering about how difficult it would be to make a snake game like the good old ones. I've done programming for several years, but not that many games, and most of it was in VB and Delphi. So I was think about mabe doing snake as a way to learn C++. So if any of u guys have any comments, inputs or tips about the subject, I'd be happy to hear them. Cheers Mavster Edited by - Mavster on 6/27/00 10:13:33 AM

Share this post


Link to post
Share on other sites
Advertisement
boy, i have to tell you, that''s what i did for my final in C.S. and i spent so much time on it i''ve practically MEMORIZED the code... i could write it in my sleep, almost... so if you have any questions, like, "what''s a good method for keeping track of the postitions of things and stuff", or just about anything, e-mail me, or post them here.
farmersckn

Sometimes even chickens need to eat... Don't bang your head against a wall just to enjoy the good feeling when you stop.

Share this post


Link to post
Share on other sites
Just get a good documentation of C++, read it and then start coding

Your game should be very simple (hey...it is SNAKE! Snake IS simple ) so don''t spend too much time on music and such stuff.
You don''t need map routines, you don''t need a menu, you don''t really need a GUI...so don''t waste the time on coding useless stuff!

The first thing you have to get running is the snake moving around properly. Then you could implement a simple "collision-detection" system, that means that the game ends as soon as the snake bites in its own tail ...
The next step to do is to implement apples, mice, or whatever you want your snake to eat
Randomly spread that food over the screen and let the snake collect them.
The last thing to do is make the screen look nice and implement the scoring system.

But you can add some "new" features:

* Detect the "value" of the food. The snake doesn''t grow as much on eating an apple than on eating a mouse (for example)
* If you implement a mouse, what about letting it run around the screen? It sure is very funny to try to catch that mouse!

That''s all I can think of at the moment. I hope you can need that stuff anyway

Yours,

Indeterminatus

--consuetudo est quasi altera natura hominum...

Share this post


Link to post
Share on other sites
Snake was my first game ever and it took me less than an hour to write... And when I started game programming (2 months ago?!?) I had been programming for like 2 years or so in variety of languages... and I was just starting off with C/C++... So hey.. grab a few tuts from the net and buckle up... you''ll have your snake in no time... if you''re a fast learner.. If you need help with anything, we''ll be around.. so just drop us a line and you''re gonna get an answer.. most likely

..-=ViKtOr=-..

Share this post


Link to post
Share on other sites
I wish you good luck! You''ll see: You''ll have the game very fast!

Yours,

Indeterminatus

--consuetudo est quasi altera natura hominum...

Share this post


Link to post
Share on other sites
Thanx for your response guys. Will get started on the game in one of the comming days. Have a book on C++ which looks good.

I''ll post a msg up here if I run into any trouble. Might even post a link where u guys can get it when it is finished, if any of u should be bored enough to want to play it.

Cheers

Mavster

Share this post


Link to post
Share on other sites
Sup! I''m looking forward to seeing what you''ve actually done!
It sure is fun to play, and I can compare "your" Snake with "mine"...

Yours,

Indeterminatus

--si tacuisses, philosophus mansisses--

Share this post


Link to post
Share on other sites
How does your snake move. Does it "only" 4 directions in that case I won´t see much trouble.
But does anyone make game where snake does round curves i´ve seen one and believe that´s harder to make.
Btw check game named Boabite3d(Im not sure is it available anywhere else than Finland)

Share this post


Link to post
Share on other sites
Now that sounds like fun. I suddenly feel moved to have a go at writing Snake myself. *laughs*

It will be interesting to see the differences between our approaches.




--== Rapier ==--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Save the whales, feed the hungry, free the mallocs!

Share this post


Link to post
Share on other sites
well if everyone else is writing one, i am too!

/me falls into a trance remembering the good ''ole days

Share this post


Link to post
Share on other sites
GameDev should do a ''Who can write the best snake game'' Competition

Share this post


Link to post
Share on other sites
Heh, I remember writting one in 7th grade. Probably 2 pages of code MAX.

In HS I helped write a Tron type game. That''s fun to. We even had robot players.

E:cb woof!

Share this post


Link to post
Share on other sites
Well, Mavster... Seems you have given us all something to do with our copious free time. *lol*

Point: Damned fine idea. *grins*

Coin: Indeed they should, but there is nothing stopping us doing it anyway, is there? What say we upload our versions to the showcase when we are done?

Magicdude: Why do I get the feeling that it isnt going to be as easy as we all think it is? *Laughs*



--== Rapier ==--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Save the whales, feed the hungry, free the mallocs!

Share this post


Link to post
Share on other sites
Well Now,

I once found Snake, Worms or as I like to call it
Nibbles coded in Turbo Pascal. It ran great. You
could choose your color, name or even choose
form exisiting characters. It had many colorful
and interseting levels to choose from and was actually
quite simply written. It was only about 330 to 590 lines.
I''ll ahve to find it for you when I have time.
You would probably find it a good resource anyway.

STVOY

Mega Moh Mine!!

Share this post


Link to post
Share on other sites
quote:

I once found Snake, Worms or as I like to call it
Nibbles



worms, nibbles? am i thinking of the right game here? Worms was more like Scorched Tanks (absolute classic amiga game - which i did 90% of a remake of a few months back...), and i never heard of nibbles before...

i am thinking of the game where you control a snake on a 2d grid and collect targets which make your tail longer, the aim is to get the biggest tail.

if this aint the game you guys are thinking of, well, this rules too!

Share this post


Link to post
Share on other sites
Point: Yeah, thats the game I am thinking of. The version I originally saw was on the C64, and as well as collecting targets, you could try nipping off your opponents tail (it was a 2 player game), but only if you got the bottom half of it. If you bit the upper half of your opponent, well, it was kinda like Tron Light Cycles.

STVOY: I would be intrested in seeing that version, if you could find it. For inspiration, dontcha know. *s*



--== Rapier ==--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Save the whales, feed the hungry, free the mallocs!

Share this post


Link to post
Share on other sites
Come on, who doesn''t know what Nibbles is???
I think Nibbles comes with every version of DOS, but maybe they dont ship it out anymore I''m not sure. Either way, it is the same Snake game that you guys are talking about. Nibbles comes with DOS as a basic file, Nibbles.BAS and you run it by running it through the BASIC compiler DOS comes with if im not mistaken.

Worms on the other hand is absolutely nothing like snake or nibbles, but the worms im thinking of is with groups of 4 fighting each other in a turn-based style using all kinds of weapons (Grenades, bazooka, missles, etc...)

Hope I cleared things up a bit

Share this post


Link to post
Share on other sites
nibbles.... *shudder*

old, horrible monochrome flashbacks...


Im in on making one to...




========================
Game project(s):
www.fiend.cjb.net

Share this post


Link to post
Share on other sites
POINT: Don''t feel forced to make your own "Snake" clone just because many people do! "Snake" is created that often because it is easy to code and therefor exactly what some people need for learning purposes...
Well, I don''t want to persuade you into making NO "Snake" clone, why should I? I just wanted to say that you don''t have to do what most people do...

Yours,

Indeterminatus

--si tacuisses, philosophus mansisses--

Share this post


Link to post
Share on other sites
Hey, i like the idea of having a "Snake" competition. i''d like to see all the different "spins" different ones would put on it. and i don''t know how many of you have played the snake game w/ curves, but i did on a ti-83 calculator and it was *really* fun. prob''ly a bit harder to code, though.
i''ve always wondered what it would be like to make a 3d version, where you could "spit" at your opponent or breath fire or somethin. anyways...
farmersckn

Sometimes even chickens need to eat... Don't bang your head against a wall just to enjoy the good feeling when you stop.

Share this post


Link to post
Share on other sites
When you get bored in school, snake on your mobile phone can be a real life saver!
The best thing about programming a snake clone is, that you can make it as hard to program as you like. You can either implement curves, to openGl graphics, make it 3d… or you can just have the basic 2d blocks.

BTW, I’m really in for a snake competition! it’d be an excuse to take a break from coding my 3d engine )


Pascalix;

Share this post


Link to post
Share on other sites
Pascalix: I presume u play on a Nokia phone, whats ur highscore?

========================
Game project(s):
www.fiend.cjb.net

Edited by - JonatanHedborg on July 1, 2000 12:44:54 PM

Share this post


Link to post
Share on other sites

  • Advertisement