- This topic has 3 replies, 2 voices, and was last updated 20 years, 5 months ago by Anonymous.
June 24, 2003 at 12:43 pm #2808AnonymousInactive
I’m finally jumping into the deep-end and writing my first non-trivial game. I use C++ and OpenGL stuff in my proper job writing tools for engineers.
It’s a Win32 Windows application written using Visual C++ with the standard message loop so I’m using mostly C, maybe C++ for some data, and it’s a single full-screened Window.
I’m beginning to forsee all sorts of difficulties handling the keypresses and updating everything during gameplay or the other bits using the same WM_TIMER then WM_PAINT message handlers. It’s okay writing desktop apps cos you can divide functionality between windows, controls and dialog boxes. But here it’ll be just one big window.
Would real games, say fast action games, use a method other than the usual messaging in order to get real-time response or even just to organise things better? Might each module (intro, options, gameplay, hiscores etc. ) poll for it’s own user input?
Is this the kind of thing DirectXInput solves?
June 24, 2003 at 1:34 pm #9384AnonymousInactive
Is this the kind of thing DirectXInput solves?[/quote:1dd0115a9d]
In a word, Yes.
Espcially when it comes to dealing with input from joysticks and other controllers that get plugged in by users.
You can read the normal keyboard and mouse inputs by polling the windows message queue, but it really does make things much easier if you just use DirectInput from the off.
It’s also one of the easier DirectX components to get to grips with, and so is a good place to get familiar with the DirectX architecture if you haven’t used it before.
June 24, 2003 at 1:39 pm #9385AnonymousInactive
thanks hg. off to get my directx sdk right now then.
July 7, 2003 at 10:03 am #9426AnonymousInactive
I reckon a simple platform game would be good to get started so it’s going to be a clone of Bombjack and so far I’ve just got the user moving the wee guy about the screen, nothing fancy. The response to the windows key down messages was pretty rubbish but when I added in the DirectInput the wee man was just zooming about everywhere! The difference is amazing.
Next thing I have to do is to get the platforms in place and get some realistic gravity and jumping/falling.
Hopefully I’ll post a link to it in the gallery if it goes well.
- The forum ‘Programming’ is closed to new topics and replies.