Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am programming a lot of turn based game, all text, but how do you program real time combat in games, like an rts, or a shooter, where everything is not input based

share|improve this question

closed as not a real question by Noctrine Jul 18 '12 at 22:46

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

With a big loop... you should be more specific in your question. – Valkea Apr 4 '12 at 16:50
Do some research. This is a VERY broad topic. – stephelton Apr 4 '12 at 17:15

Real Time games are just Turn Based games where the turns go by really fast. Also a "turn" doesn't pause to wait for input, instead either polling keyboard/gamepad/mouse states or getting the information via events.

The game loop is your friend. Here is a more detailed explanation of some of the basic concepts and techniques involved.

As a side note, making a real time text based game is going to be difficult due to the nature of the console window. I'd recommend reading up on some basic graphics/input handling so you have a good platform to work from. SDL is a good choice if you want to dive in and Lazy Foo' has some excellent tutorials on the matter. As a bonus, the game loop structure is used in a number of the tutorials so you'll have some actual implementation to experiment with.

share|improve this answer
+1 for the first sentence :) – Alex Jan 24 '13 at 10:30

Event handling in OOP or a loop if you're using a more traditional language.

share|improve this answer
Well even an event handling system needs a loop as far as I know ;) – Valkea Apr 4 '12 at 17:15
yes, that's correct, I guess I was trying to add a tiny bit of detail to the generality here.... – Philip Apr 4 '12 at 17:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.