Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

foofightr

amount of Win32 interaction in game

This topic is 5543 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How much use of Win32 [message loop] is generally acceptable in a robust game? I am doing a game with some friends from school, and the guy doing the GUI says he wants to rely on win32 messages like WM_CHAR, WM_LBUTTONDOWN, etc to drive his GUI, among other things. Also by his design, the framework also has MsgProc''s inherited all the way down, it''s proliferated in pretty much all the game code. Every game state gets win32 messages passed down to it... basically the win32 message proc is present all through the game code. Now I don''t have much experience in using win32 in actual games, but instinct (and the fact that win32 is not made for games) tells me it''s slow and not really suitable for the task. Is that a correct assumption? What are really the pros and cons? Thanks..

Share this post


Link to post
Share on other sites
Advertisement
u could try to do the GUI with crappy windows messages and the game with DInput or GetKeyState() for the input.

i prefer using GetKeyState() for everythin although i when doing input (like getting a string form keyboard ) i have a harder job
also u have to translate key codes to key names (ex VK_UP - UP KEY)

and with GetKeyState() or DPlay u have to check urself for KeyDown (just key is down) or KeyPress (key was down but released) and it''s much harder to make input boxes and stuff.
key repeat delay and key repeat rate is another prob.

but i''d stick with GetKeyState()

Share this post


Link to post
Share on other sites
I''m talking about in-game GUI for a fullscreen game. For example, the options screens in Unreal Tournament 2003. Not just some windowed "generic application"

The point of hesitation is Unicode. WM_CHAR apparently gives you info relating to unicode stuffs, whereas DirectInput doesn''t (not unless you do it yourself). Since we''re pressed for time, I rather work on other more important stuff than supporting Unicode... unless it''s completely trivial?

Question is, is Unicode support worth the performance hit of using win32 messages? How big of a hit is it compared to an efficient DirectInput wrapper?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!