Do's And Don'ts ?

Started by
34 comments, last by Olona 23 years, 8 months ago
wow Sly, we should team up
that are true words you wrote !

Could you explain why Peekmessage is better than GetMessage ?
I can imagine why, but I wouldn''t mind an explanation

[ Ampaze | www.crazyentertainment.net ]
[ Ampaze | www.crazyentertainment.net ]
Advertisement
Yeah, right. Unreal Tournament was EXACTLY the game I was talking about. You see, I''m having P3 733Mhz, 133Mhz bus, 256Mb RAM, NVIDIA TNT2 32Mb and 522 drivers from nvidia. The game gives me great "mouse lagg" (mouse is redrawn every 2 seconds) and very low responce to menus (although the game runs smooth). On their web page I read - "we hope Nvidia works on the problem". Why the @^$% do they blame Nvidia?! I got shitload of other Direct3D games which work fine and I don''t see a reason to blame NVidia for the drivers. Unreal Tournament menus - a good example of what I was talking about.

This is gonna be my last message in this thread as there''s almost no use of our discussion here



- Arcane Lifepower -

"Although the world would call me free
Each day the more her slave am I
For in her very way to be
There''s I don''t know what, I don''t know why"
quote:Original post by Ampaze

wow Sly, we should team up
that are true words you wrote !

Could you explain why Peekmessage is better than GetMessage ?
I can imagine why, but I wouldn''t mind an explanation

[ Ampaze | www.crazyentertainment.net ]


PeekMessage returns immediately. GetMessage waits indefinitely for the next message to arrive. By using PeekMessage, we can check the queue for any waiting messages. If there messages, the PM_REMOVE flag extracts them from the queue and we can process them. If there are no messages, lets do some of our own processing (AI, physics, rendering, etc), then start the loop again.
Steve 'Sly' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers
I know you probably will not reply to this, but I''ll post it anyway. I like a good discussion.

quote:Original post by Lifepower

Yeah, right. Unreal Tournament was EXACTLY the game I was talking about. You see, I''m having P3 733Mhz, 133Mhz bus, 256Mb RAM, NVIDIA TNT2 32Mb and 522 drivers from nvidia. The game gives me great "mouse lagg" (mouse is redrawn every 2 seconds) and very low responce to menus (although the game runs smooth). On their web page I read - "we hope Nvidia works on the problem". Why the @^$% do they blame Nvidia?! I got shitload of other Direct3D games which work fine and I don''t see a reason to blame NVidia for the drivers. Unreal Tournament menus - a good example of what I was talking about.



And nVidia have indeed worked on the problem. Detonator 5.22 drivers are well known to be quite shocking. nVidia is to blame for that one. Try the 5.30 drivers and I believe you will see a fantastic improvement. I have a GeForce in my home machine and a TNT2 in my work machine and neither give me any trouble if I do not use the 5.22 drivers. I recently wrote a configuration utility for a game studio and the only setup it didn''t work on was with 5.22 drivers.

But I go off on a tangent. The GUI in UT cannot use standard Windows controls because the interface is drawn using Direct3D. Games using D3D or OpenGL draw their interfaces using textured polygons aligned to face the camera. This is called billboarding or overlaying. Even the mouse pointer is drawn using polygons. Think of the possibilities of drawing UI elements with polygons. What can you do? Wobble them side to side. Zoom in and out. Rotate a bit. Flex, skew, shrink, lighten, darken, cast shadows. The list goes on. Try doing that with standard Windows controls.

To draw a standard Windows control requires getting a device context, drawing the control, and releasing the context. To get the device context of a DirectDrawSurface you call the GetDC() function. This places a lock on the surface that is not released until you release the context. Locks are very costly in terms of time. As an example, last night I implemented my bitmapped font object. I replaced my frames per second display that used the Windows GDI DrawText() function (get the DC, draw the text, release the DC) with my bitmapped font routine and the frame rate jumped from 228fps to 380fps. That shows conclusively that using anything from the GDI is a no-no if you want fast graphics.

UT''s interface did go over the top. Game UI''s should be simple to understand and use.
Steve 'Sly' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers
That''s a little off-topic, but since you mentioned NVidia drivers 5.30, I''d like to ask - where the hell did u get them? They''re not released on their official site yet.
quote:Original post by Lifepower

That''s a little off-topic, but since you mentioned NVidia drivers 5.30, I''d like to ask - where the hell did u get them? They''re not released on their official site yet.


http://www.3dchipset.com

And no, they''re not officially released yet, but new versions seem to leak out of NVidia like it''s intentional.
Steve 'Sly' Williams  Monkey Wrangler  Krome Studios
turbo game development with Borland compilers

This topic is closed to new replies.

Advertisement