The need to press enter...

Is there a way, when making a game for example in the console, that you don't have to put enter every time?

Like, I use
5
321

as my setup to move for dungeon crawler. But every time again I have to push enter.
Is it possible, when i type 3, I don't have to hit enter anymore?

Thank you!
Doesn't work :(
You should Google "unbuffered input".
IIRC, there is no way to do this using standard C/C++; you would want some sort of third party library like curses to do this.
Or better yet...

Don't use the console to make games because it's a terrible medium for games.

Get a library that is made for games, like SFML and use that. Working with the console will just make things extremely difficult for yourself.
Oh ok :(
But I don't know WINAPI etc yet :p
you don't need to know WinAPI.

Get SFML. Having a window, drawing graphics, playing sound, and having sane input is much easier than you think with the right library.

SFML makes it very simple.

The hardest part is downloading/installing/setting up SFML, but you only have to do that once and then you're good forever.

http://sfml-dev.org/
I have a question about that.... If I want to try using this SFML library and I am using Dev-C++ (which compiles using gcc, I believe), which version of it should I be downloading? gcc is listed as Linux, which I don't have, and the Windows versions are all Visual C++ or Code::Blocks. Am I just supposed to use one of them?
Download Code::Blocks. Its free. Easy. AND Its just awesome!! I love it :D
Hmmm.... The screenshots of C::B look quite...busy, but I suppose I can resize the panes however so I can see what I'm doing. It's not like the info displayed isn't useful, I'm just not used to seeing it ALL at once, hehe. I'll give it a shot. Thanks!
What did you use? dev-c++?
I don't quite understand you. C::B is praised for the fact it's minimalistc.
In the first screenshot there are eight panes open, with the code itself squished into a little pane in the middle where I can't even see the right margin of it. Not saying that it looks bad, just that there's a lot of info that I won't need all the time taking up space. Again, I'm sure I can resize everything to my own taste.
WAit, I'll post a picture of the default look.

http://i35.tinypic.com/14y73m0.jpg
Last edited on
Thanks, but it's okay, I'm already downloading it. ^_^

By the way, yes, I was using Dev-C++.
Already posted it :p
Haha, that's what I get for not refreshing first! :-P Besides, no harm in having it posted for the next guy who reads this! ;-)
Last edited on
Topic archived. No new replies allowed.