RE: [GD-General] Vector GUIs
Brought to you by:
vexxed72
From: <phi...@pl...> - 2003-04-05 03:06:03
|
We use flash for our HUD's and menus. IIRC The Star Wars Starfighter guys did as well. I think you can get a flash renderer as middleware now, but we rolled our own from the specs (which are publicly available somewhere). Cheers, Phil "Greg Seegert" <greg@stainlessst eelstudios.com> To Sent by: <gam...@li...urcef gamedevlists-gene orge.net> ral-admin@lists.s cc ourceforge.net Subject RE: [GD-General] Vector GUIs 04/04/2003 04:56 PM Please respond to gamedevlists-gene ra...@li...urcef orge.net Performance wise, I think you hit the nail on the head with the problems you described. You could forbid the use of alpha or varying levels of opacity on your UI elements, which could obviously help fill rate if you z-test. I'd design the UI for one resolution - say, 1024x768 - and if you're rendering a background, split the texture up into 12 256x256 textures. Then let the gfx hardware handle the scaling for different resolutions. Results are pretty good. And this may not be too practical, but the more ui elements that shared the same texture the better. You could batch em all up and avoid doing much texture swapping on the hardware. That method would obviously work better for ui elements which have a small piece of a texture tiled over them rather than a full background for example, but it looks way better than an untextured quad =) As an aside: I'm not sure if it was here or on the algorithms list, but I think I recall someone mentioning something about a SWF renderer. SWF is the flash file format, which basically means you'll have a layout tool pretty much written for you already. -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Brian Hook Sent: Friday, April 04, 2003 7:26 PM To: gam...@li... Subject: [GD-General] Vector GUIs So I've been thinking about this whole scalable GUI thing some more, and the "obvious" solution is to do something like make the GUI in some kind of vector language so that it can scale. This has a large number of advantages, and the biggest disadvantage is that you can't do real nice pixel/raster effects such as the various filters available for Photoshop. Instead they'd have to be described procedurally, which might be considered fairly limiting. A combination of FreeType fonts coupled with vector GUI descriptions would seem to allow a great degree of scalability while keeping things relatively sane for the artist. To develop the GUI you could use a standard vector drawing package that exports to a parseable file format such as AI, EPS or SVG. Then you either load the file directly or run it through a filter to some local file format such as a Lua script. Since SVG is XML-based, you can easily allow the artist to tag functions for the GUI components by embedding a key, or you could simply cheese out and tag it as part of the object ID. The most difficult part of the process that I can think of is actually rendering the GUI on modern hardware. Obviously pixel plotting is straight out, so you'd probably construct the GUI elements into textures and use those. My biggest concern is that this can eat up a ton of texture space, especially if you have alpha (precluding the use of 16-bit texture information). Take a situation where you have a 1280x1024 fullscreen application, and your total GUI elements come up to an overdraw of 4x (a lot of the GUI elemenst would presumably be in the form of dialog boxes, etc. that are temporal). Assuming you wanted the entire GUI cached, this could easily add up to a lot of texture memory consumed for a high-res display. Obviously you could rasterize into temporary bitmaps and use liberal amounts of texture destruction, but that still seems like a lot of overhead just for a GUI. The problem, of course, being that since this is scalable, the higher your screen resolution the more texture memory is consumed by your GUI elements. Thoughts, comments and "you're smoking crack" comments appreciated. Brian ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU7 ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=557 |