Jump to content
  • Advertisement
Sign in to follow this  
flump9

Need some help making The Snake Game

This topic is 2494 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 am planning to make my first game, and i wanted it to be very simple,so i thought of the snake game.I am going to program in C++ using the allegro library.But I have one obstacle.I do not know how to fully code the game, especially for making the snake grow and look cubey.I do not want it to be a console application, i want it to be made with pictures i made myself,so please can someone help me or point me to a tutorial.

Share this post


Link to post
Share on other sites
Advertisement

I am planning to make my first game, and i wanted it to be very simple,so i thought of the snake game.I am going to program in C++ using the allegro library.But I have one obstacle.I do not know how to fully code the game, especially for making the snake grow and look cubey.I do not want it to be a console application, i want it to be made with pictures i made myself,so please can someone help me or point me to a tutorial.


Keep an list of snake segments, each movement tick you just add a new segment to the front of the snake and remove one at the back. (If he eats you simply set a new max length and skip the removing part until you got enough elements)

Share this post


Link to post
Share on other sites
You need to watch this:

http://www.youtube.c...h?v=4HgyStstIhw

And other videos in the series. His tutorials are awesome and the code actually compiles, unlike the other peoples tutorials.

It's for Linux but it's easily convertible to WIN32, it shows how to do the snake game.
And actually it doesn't matter: Linux or Win or Console or not.

It shows the core, that makes snake to move and eat food.Gfx is yours to do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!