My new advanced Snake

This is a discussion on My new advanced Snake within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Ok guys here is my latest version.. In this i have corrected some of the bugs you had reported though ...

  1. #1
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683

    My new advanced Snake

    Ok guys here is my latest version.. In this i have corrected some of the bugs you had reported though not all. And here you can use the num pad keys to move around and also you can use the num pad keys 1,3,7 and 9 to move crosswards.. this is fast.. And now instead of the food being static.. it disappears and reappears some where else.. So you will have to grab it fast before it disappears.. And now the food is bigger and is more visible..

    So please post you reviews


    ps:- Extract all the files before running snake.exe or you will get a error...

    Thanx
    Bye
    Attached Files Attached Files

  2. #2
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    Even Better!

    I like the score move...

    And cant you make it whre you cant reverse directions?

    ok one more... I think you should make the time until the fruit disapears random...

    between 5-15 secs....

    What is C++?

  3. #3
    Registered User Invincible's Avatar
    Join Date
    Feb 2002
    Posts
    210
    Hey Vasanth, what compiler and OS did you use to compile this thing. I like the old style DOS graphics. I downloaded Borland thinking the graphics.h header was in there, but no luck. I also couldn't find any switch to compile in DOS. I'm using windows. Will it be possible for me to use the BGI?
    "The mind, like a parachute, only functions when open."

  4. #4
    back? dbaryl's Avatar
    Join Date
    Oct 2001
    Posts
    597
    Hey, one thing I noticed... it seems that when the snake speeds up, the rate at which the apples change location speeds up as well. I think one should not depend one the other, so that if you want to get tot he apples you can just speed up the snake... is that possible?
    This is my signature. Remind me to change it.

  5. #5
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    Thats a good sugestion budy.. i will implement it...

    And no one seen the new cross moves.. Try moving the snake with the num pad keys 1, 3 ,7 and 8.. the snake moves cross.. And it is faster and the apples remain in the position....


    And for the fellows who want to compile my code download the old turbo c++ 3.0 compiler from

    http://fenix.uam.mx/romy/prog/tc30.zip

  6. #6
    Christian
    Join Date
    Mar 2002
    Posts
    618
    cool game

    one suggestion though put a limit on the snakes speed. I tapped the 'I' key and the snake flew across the screen.
    I shall call egypt the harmless dragon

    -Isaiah 30.7

  7. #7
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    Well there is a limt on speed.. it is 200 and it zooms... Well if you press I after it attains 200.. it still remains 200.. but thanx for the sugestion i think i will dcrease it to 180......

    So have any of you guys tried using the numpad 7,9,1 and 3 keys to move the snake...

  8. #8
    Registered User Invincible's Avatar
    Join Date
    Feb 2002
    Posts
    210
    Hey Vasanth, my screen-name is Invincible not Invisible...
    "The mind, like a parachute, only functions when open."

  9. #9
    back? dbaryl's Avatar
    Join Date
    Oct 2001
    Posts
    597

    snake speed

    Since it is possible to slow the snake down, I don' think that there should be a restriction for the maximum speed... just think of those with slower computers

  10. #10
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    I tried it.
    First i just got an empty DOS window for about 10 secs.
    Then there was a funny beep combo and then it said i had lost w ith 0 points and exited

  11. #11
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    im using XP btw

  12. #12
    Registered User Invincible's Avatar
    Join Date
    Feb 2002
    Posts
    210
    Well Erion, I'm using XP as well and the same thing happened to me. The problem is that the snake cannot be seen in the game area when the game begins. I'm assuming this a compatibility issue with DOS and Windows. If you reallly must play the game, immediately move to the right and the snake will appear on the screen.

    Still waiting for you to explain this graphics library to me Vasanth.

    Invincible
    "The mind, like a parachute, only functions when open."

  13. #13
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    ok pal here i am... Everything you want to know about graphics.h


    Well what info do you want on this...

    I initilized the graphics and used simple functions like line to create the snake and rectangle to create the border and so on.. Do you want me to explain the entire graphics process of the game or anything else.. Please post it.. i would be glad to asist you

    Based on your sugestions i am now building a still better snake game with obstacles inbetween.. like 2 bar in the middle of the screen etc etc...

    bye
    Vasanth

  14. #14
    Registered User Invincible's Avatar
    Join Date
    Feb 2002
    Posts
    210

    Doh...

    I don't care about the functions... all I want to know is where to get the BGI library, what compiler you're using, and what operating system you're using. In addition, I'd like to know what operating systems and compilers this library is compatible with.

    It's a Borland Library isn't it? I downloaded Borland 5++ and there was no graphics.h or BGI Library to be found. I couldn't find any options for compiling in DOS either.

    If you wouldn't mind explaining how this thing compiles.
    Last edited by Invincible; 05-28-2002 at 03:31 AM.
    "The mind, like a parachute, only functions when open."

  15. #15
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    ok i use the BGI graphics library.. And it works only on DOS... and nothing else.. So it cannot be used on other platforms.. it works on Windows because Windows supports DOS programs... And i use Windows XP and my compiler is Turbo c++ 3.0.. It is a very old compiler and i use it only to do these stuff... And it supports this library and it is built in...

    And this is quite outdated so no compiler now supportrs it.. And borland 5 definetly does not support it... Well if you want to compile this download the turbo c++ 3 or 3.5 compiler from the link i gave above.. And it will work properly.. THis is a dos based compiler and has a built in IDE.. it looks like the edit command it DOS...

    the lik is http://fenix.uam.mx/romy/prog/tc30.zip if you dint get it..

    And any more doubts... I will be glad to clarify...

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A snake game - Memory problem
    By gavra in forum C Programming
    Replies: 29
    Last Post: 11-23-2008, 12:58 PM
  2. Need help with a snake game (ncurses)
    By Adam4444 in forum C Programming
    Replies: 11
    Last Post: 01-17-2007, 03:41 PM
  3. Contest - Snake Numbers
    By pianorain in forum Contests Board
    Replies: 46
    Last Post: 06-15-2006, 08:52 AM
  4. Snake
    By Grantyt3 in forum Game Programming
    Replies: 2
    Last Post: 05-24-2006, 02:35 PM
  5. linked list problem
    By kzar in forum C Programming
    Replies: 8
    Last Post: 02-05-2005, 04:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21