My first game C++ game

This is a discussion on My first game C++ game within the Game Programming forums, part of the General Programming Boards category; Well really its my first VC++ program but whats the diffrence between friends? Its a simple game like the snake ...

  1. #1
    Unregistered
    Guest

    Cool My first game C++ game

    Well really its my first VC++ program but whats the diffrence between friends?

    Its a simple game like the snake game you find on mobile phones its quite fun for all of 5 seconds. It reads each level from a file (#.dat) and places the walls from the position of the 'X's in the file. The number after it is the timer interval i.e. smaller for faster.
    In the game use arrow keys to change direction, press P to pause and Esc to exit.

    I would have put the sorce up but im not sure which files are needed.

    Please post a comment if you download it.

    God that sounds very dull doesn't it? But give it a try and tell me if you like it. The 3rd level is interesting.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Forgot the link?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175

    Unhappy Im a dumb ****

    That was a bit stupid
    Attached Files Attached Files

  4. #4
    Unregistered
    Guest

    Hey, why no comments??

    Please post a reply, i like to see what others think about my programs.

  5. #5
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    891
    Whew; fast. Awsesome job, though.
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  6. #6
    I'm Back
    Join Date
    Dec 2001
    Posts
    556

    Thumbs up

    very nice, level 3 is GOOD. had fun

  7. #7
    Unregistered
    Guest
    Thanks for the comments!

    CodeMonkey if you think its too fast edit the files like #.dat in notpad, change the timer interval at the bottom.

  8. #8
    Registered User
    Join Date
    Mar 2002
    Posts
    2

    Talking sweet

    that game was pretty sweet!

  9. #9
    Satan valar_king's Avatar
    Join Date
    Aug 2001
    Posts
    288

    Thumbs up Err... I died. ;)

    Wow, excellent game man! What did ya use to make it? Allegro? That might be a good idea for me to try.


    Keep it up!
    Valar_King

  10. #10
    Registered User
    Join Date
    Feb 2002
    Posts
    114
    Jupp to fast... you should time the movement of the snake so that it is eaqual fast on all computers. Its fairly simple to do, and its used in all major games.

    something like this:

    Code:
    PosX += SquaresPerSecond * frameTime;
    I see that your snake move one square each time, so you would have to do something like this:

    Code:
    float RealPosX;
    int SquarePosX;
    
    .
    .
    .
    
    RealPosX += SquaresPerSecond * frameTime;
    SquarePosX = RealPosX - (RealPosX % SquarePosX);
    Ah... eh.. well you get the idea I hope.

    Nice to see someone finish a game though! good work!

  11. #11
    Registered User GreenCherry's Avatar
    Join Date
    Mar 2002
    Posts
    65

    Post

    COuld you post your game again with the new code, i would like to see move not so extremely fast.

  12. #12
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Can u post source code? What did u use to make all the graphics?

    thnx

  13. #13
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175

    Talking

    Ok, due to not so popular demand here's the source.

    As i said already if you feel the game is to fast just change the number at the bottom of the level file i.e. 1.dat, 2.dat ect. This will change the timer interval.

    I think i have included all the files that you need but i wouldn't bet on it. Also please note this is my first VC++ program and i havent tided up the code yet.

    Thanks again for the responces.
    Attached Files Attached Files

  14. #14
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175

    Lightbulb

    Oh and the graphics where just drawn in photoshop

  15. #15
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Did u use any graphics library?

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

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  3. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM

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