Query about laggy

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

geniephics
Just popping in
Just popping in
Posts: 8
Joined: Wed Nov 05, 2008 08:38

Query about laggy

Postby geniephics » Wed Nov 12, 2008 16:25

Hi,

Currently my HUD is using a whole screen transparent windows and then attach all the menu into the transparent windows.
for example:

--------------------------
| OO |
| OO |
| |
| |
| |
| OO |
--------------------------

My whole screen is a transparent window. then the 'O' is my menu.
My question, will this actually cause lagness to my game?
And when i hide the whole screen, will it lag too?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Wed Nov 12, 2008 19:41

Hi,

I think it's an impossible question to answer.

Technically a transparent window should cost you nothing (although a recent thread here seems to indicate otherwise - I still have to look into that a bit closer). How much time everything else will cost you will depend upon the make-up of the items that you're rendering and how often you cause them to be invalidated and require a full redraw; a button / menu item consisting of a single image will be much cheaper than the same built up of nine images with text. Then you also have the question of the hardware it's running on; it could be fine on some systems and run like a dog on lower-end systems.

IMO there is no simple answer to the question "will it cause lag" :)

CE

earthsruler
Quite a regular
Quite a regular
Posts: 74
Joined: Mon Apr 28, 2008 23:21
Location: Australia

Postby earthsruler » Thu Nov 13, 2008 00:11

More code executing = more processing time = more "lag"

So by some accounts yes it will lag.

However there is a simple solution; Don't run any code! I get such great FPS in my blank screen game ;).

If you want an interface and want to limit lag, simply do as CE said and carefully manage how much is on the screen at once and use simple widgets.

ER.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sat Nov 15, 2008 21:56

It will lag if the "transparent background" of your transparent windows is something like one transparent pixel tiled all over the screen. This would cause for example 1280x1024 single quads which is slow.

If instead of this, if the background is something like one transparent pixel stretched all over the screen, this will not cause lagg.

So my hint: in your looknfeel tiles, prefer using "stretched" then "tiled" propreties


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 12 guests