Thread: Creating a game

  1. #1
    Registered User
    Join Date
    May 2011

    Smile Creating a game

    I have written the majority of the game - just having huge problems with the enemies movements.

    Lets say i have two circles at different positions on the screen, and I want them to move in the yaxis between two points (at the same time (they have different x coordinates)) I want this to happen automatically without any keys being pressed.
    I have a stick man whos position can change via keyboard inputs on the x axis as well as being able to jump so I think i need to use kbhit != 0 but I keep trying code without any sucess, an example of how to do this would be really helpful.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    This rather depends on how your main loop is running. If you have blocking input, then naturally the program will block there waiting for input. If you are using a more normal main loop where you process input via messages, then you can move the enemies as part of that main loop.

  3. #3
    Join Date
    Aug 2010
    Ontario Canada
    Post your code, maybe we can help....

    Announcements - General Programming Boards

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help needed in creating a game using c
    By caprigirl in forum C Programming
    Replies: 1
    Last Post: 10-10-2010, 12:53 AM
  2. creating chess game...
    By jamort in forum C++ Programming
    Replies: 19
    Last Post: 07-01-2009, 03:30 AM
  3. Need help creating game with Turbo C
    By Trafalgar Law in forum Game Programming
    Replies: 10
    Last Post: 09-17-2008, 06:54 AM
  4. Creating a Game
    By RazzTheKid in forum Game Programming
    Replies: 12
    Last Post: 03-13-2008, 06:27 PM
  5. Creating a blackjack game
    By JoshR in forum Game Programming
    Replies: 4
    Last Post: 04-29-2005, 11:27 PM

Tags for this Thread