My First Game!!!

This is a discussion on My First Game!!! within the A Brief History of Cprogramming.com forums, part of the Community Boards category; This game took me like over a month to make, and every time I think I'm almost done, I find ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    132

    My First Game!!!

    This game took me like over a month to make, and every time I think I'm almost done, I find more bugs. But now I think I really am done. So try it out, and tell me what you think!

    I must warn you though, it does use BGI graphics, so it is quite ugly and slow.
    Attached Files Attached Files

  2. #2
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    wow... really nice for a first game.

    I want to make a break out type game but I couldnt figure out how to make th ball move right.. how did you do it?
    What is C++?

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    132
    Basically, I just added the difference between the current X and Y values and the old x and y values to the current values, ie

    Code:
    int x=1, y=1;
    int xold=0, yold=0;
    
    do{
    x+=x-xold
    y+=y-yold
    }while(1);

    Then to make it bounce back you just change the old value for example, to make it bounce left, you'd say

    Code:
    xold=x+1
    My friend told me to give the ball a velocity variable, but i thought that was too complicated, so I did this instead.

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