Problem with RPG

I would like make my game "keep" acting without having I to press a button. How can I do it?
With a loop, a recursive function or a timing function.
What do you specifically need?
The console is a poor medium for a game (in modern times anyway) for this very reason, among others.

I suggest picking up a lib such as SDL or Allegro (you can google them). They are both pretty easy to pick up and use.
A timing function...
At this point it sounds like you need low-level access to the keyboard microcontroller so that you can receive make and break codes.

Or, you just let the keyboard auto-repeat feature work to your benefit.

It depends on the level of accuracy you need. The former is required for fine-grained control such as in first person shooters. The latter is fine for text-based games like the old Rogue game.

But I'd have to second Disch's suggestion.
just to reiterate...

It will actually be harder and more work to figure out how to make this work on a console than it would be to just use a lib specifically aimed at making games (such as SDL). Plus sticking with the console has other detrements (text only, no graphics, a hassle to do other things that are relatively basic, your code becomes less portable as you step outside of standard lib stuff to do "fancy" things, etc).

Again my advice is don't waste your time. Console is fine for just starting out, or for quick one-off programs, or for things which actually are commandline driven... but there comes a point where you have to move on. You might be at that point. Consider it.
Last edited on
:P Exactly, how I install Allegro? It says to change to the Allegro directory and type make in the command prompt, but how I go to the Allegro directory?
What OS, compiler, IDE are you using?
Windows XP, GNU GCC, CodeBlocks 8.02.
I never used Allegro personally -- I had used SDL (plus I'm on Linux currently)

but I found this wiki page which seems to be like a walkthrough.

http://wiki.allegro.cc/index.php?title=Code::Blocks#STEP_2_-_Installing_The_Allegro_Library

Sucks that you have to compile it. Would be nice if there was a pre-built binary available -- I didn't bother looking.
Well, becausae I found more info about SDL, I installed it. However, thanks Disch!
Topic archived. No new replies allowed.