Thread: Snake Attack! my game

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    22

    Snake Attack! my game

    Hello. I'm just a beginner C++ programmer, and this is one of my first games. It's just a Tron clone. Tell me what you think! The source code is included, and it's fairly messy, but it's also commented on a fair amount.

    The only real problem I'm having with it is this:

    When I first made it, I couldn't get the snakes to do a 180 degree turn (if you're moving right, go up and then left really fast) extremely quickly. The best I could do was the snake being one space away from itself when it turned around instead of right next to itself (you'll see when you run the program.)

    The thing is, when I restructured some stuff (or something like that, I can't even remember.) Suddenly, the snake on the left was able to turn around and be going right next to itself, yet the other snake still has a space between it's head and the rest of itself! I just can't figure out why. Not too much of a problem, but if anyone could figure out why I wouldn't mind knowing how that happens =D.

    Oh! Also, if the snakes come at eachother at a 90 degree angle and their head run right by eachother, the game will not end. I know how to fix that, but since it's so rare and so hard to do on purpose, I thought it would be neat to keep in. =)

    PLEASE! Download and tell me what you think!

    Oh yeah, I made this in Borland.

    -Joe

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    1

    Red face cool

    cool

  3. #3
    Bios Raider biosninja's Avatar
    Join Date
    Jul 2002
    Location
    South Africa
    Posts
    765
    Very good. try to make an option for one or two players, where on one player you play against the pc
    The knack of flying is learning to throw yourself at the ground and miss.

  4. #4
    lahdedah
    Guest

    Lightbulb

    thank you for your snake game. I was wracking my brain for the posxy() function, and your code helped me remeber it. Hope to post a wikked game up here myself soon! Cheers,

    LAZ

  5. #5
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Wahhh

    When I tried playing it said I was missing A DLL!
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  6. #6
    napKINfolk.com napkin111's Avatar
    Join Date
    Apr 2002
    Posts
    310
    I tried to run it but I'm missing "cm3230.dll" Could you post that?

    **edit** I typed the wrong dll name

    //napKIN
    "The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
    -John Carmack

  7. #7
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753

    cw3230.dll

    Here you go, although I'm not the original poster, I'm just putting the DLL on for you.

  8. #8
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    nice game

    Cool game, but could you make 2 player mode an option instead of a standard? I'd like a computer opponent. Kinda like what biosninja said.
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  9. #9
    napKINfolk.com napkin111's Avatar
    Join Date
    Apr 2002
    Posts
    310

    Thumbs up

    cool game. AI would be a plus tho. Good Job

    //napKIN
    "The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
    -John Carmack

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Engine <=> DX/OGL | c++ ?
    By darkcloud in forum Game Programming
    Replies: 6
    Last Post: 05-13-2005, 12:19 AM
  2. Game Designer vs Game Programmer
    By the dead tree in forum Game Programming
    Replies: 8
    Last Post: 04-28-2005, 09:17 PM
  3. u got me wrong fellas
    By clover in forum Game Programming
    Replies: 4
    Last Post: 10-18-2003, 04:23 PM
  4. My Snake Game
    By ()Q() in forum Game Programming
    Replies: 2
    Last Post: 07-23-2002, 03:03 PM
  5. ASCII Snake Game
    By ()Q() in forum C++ Programming
    Replies: 4
    Last Post: 07-23-2002, 03:53 AM