input in realtime.

Started by
18 comments, last by Puneet Chandhok 9 years, 5 months ago

Every time I see a "realtime" thread, one moronic wannabe just shows up trying to make the OP feel as stupid as possible.
It is incredibly obvious that the OP is a beginner, and doesn't need actual realtime input.


Correcting misconceptions of a beginner is a very important step, especially because such misconceptions can make researching your own answer extremely difficult because the keywords you use are not the keywords which will be helpful. I did not see what tonemgub wrote as something to make someone feel stupid.
Advertisement

Every time I see a "realtime" thread, one moronic wannabe just shows up trying to make the OP feel as stupid as possible.
It is incredibly obvious that the OP is a beginner, and doesn't need actual realtime input.


Correcting misconceptions of a beginner is a very important step, especially because such misconceptions can make researching your own answer extremely difficult because the keywords you use are not the keywords which will be helpful. I did not see what tonemgub wrote as something to make someone feel stupid.

I just feel there are other ways to explain the difference.

I won't deny the fact that I'm overreacting, but it's just that I think beginners do not need to know things like this at the stage they're in.

They will probably not understand what you are talking about with the knowledge they have, so they will assume it's hard to check for input or use a timer.

You have to realise that people do not react to information the same way you do. Just because you understand what a post means, does not mean the relevant OP will understand.


so they will assume it's hard to check for input or use a timer.

I was going to provide more info about that once he specified what type of program he is writing:


Since you haven't specified what sort of program you are writing (console or GUI), the question still remains too broad for us to give you a straight answer.

what is the easiest way to take input from keyboard, in realtime , in c++ ??

GetAsyncKeyState(VK_CODE)

http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx

a standard widows call. bypasses messaging and all that junk. returns true if key is down at time of query.

i think there's also a call to get all 256 keystates, to take a "snapshot" of the state of all keys at the time of query.

windows message pump for mouse, and getasync for keyboard, works great.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

so they will assume it's hard to check for input or use a timer.


I was going to provide more info about that once he specified what type of program he is writing:

Since you haven't specified what sort of program you are writing (console or GUI), the question still remains too broad for us to give you a straight answer.


its a GUI program..
CEO of the future gaming industry

Using Keyboard Input: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646268%28v=vs.85%29.aspx


"omg but realtime is not possible on Windows"

Sorry if it came out sounding that way... I admit that I'm also not very sociable IRL, and I'm really not at all good at teaching others. I didn't mean to drive anyone away. And if it matters, English is also not my primary language, so I don't immediately recognize the effect my phrasing has on others.


"omg but realtime is not possible on Windows"

Sorry if it came out sounding that way... I admit that I'm also not very sociable IRL, and I'm really not at all good at teaching others. I didn't mean to drive anyone away. And if it matters, English is also not my primary language, so I don't immediately recognize the effect my phrasing has on others.

Why do you feel the need to apologise when everyone agrees with you?

My post was not meant to be taken personally. I was speaking to anyone who writes posts like that.

I apologise for calling you what I did, but I have seen so many of these threads that I couldn't help it.


Why do you feel the need to apologise when everyone agrees with you?

Because I don't handle (verbal) violence very well, so I try do avoid confrontations whenever I can by apologizing. :D And I hate politics, so I don't care about everybody else's opinion more than yours.


I apologise for calling you what I did, but I have seen so many of these threads that I couldn't help it.

You don't have to, but thanks.

If you want to use i/o function with graphics try using freeglut library, its very easy to use. I don't recommend using windows winproc funtion initially because you have to bind graphics library such as directx/opengl with windows api. In freeglut just initialise glut library in main() and start using glut commands. And "realtime" is a relative term not absolute. For some apps 1ms delay seems realtime, for others 0.01 is not enough. If your cpu usage is low on windows. Basic i/o functions will work in realtime.

This topic is closed to new replies.

Advertisement