Skip to main content
GameDev.net gamedev.net
🔒 Locked

creating an user interface

Started by beetle Nov 15, 2000 at 6:20 AM 4 replies 550+ views
Original Post
beetle
beetle
I am working on a tile base engine right now and i like to run the game in a fullscreen mode. For the controll of the game i need a kind of user interface, somethink, like in Diablo2 on the bottom of the screen. So i am wondering, how to achieve it. Do i have to draw the actual surface (terrain) first and lay the menue over it ??? Or is it possible to use the resources (like menue or dialog) in fullscreen mode? I plan to develop the game under visual C+-+-.
LilBudyWizer
LilBudyWizer
I could be wrong since I haven''t gotten this far yet, but I don''t believe a dialog or control has to look like a "windows" dialog or control. I''ve always assumed that in games the buttons and such are owner drawn windows controls. It seems a waste to recreate the logic for all these controls just because they look differant, but funtion exactly the same. Logically it seems that if you can use a Dialog box in a DirectX app, then do the same things you can do outside of DirectX to make it look any way you please.
Keys to success: Ability, ambition and opportunity.
voodoo
voodoo
Blit all your game elements on the the surface first...

And then the last should be the image of your interface or your elements ro what you have....

If your interface is going to cover most part of the screen like diablo does, make sure you dont blit anything there this way you will save up on over draw. Since you are putting a interface there why render more tiles and go through the logic to do so, when they will be covered. This willalso most like up your frame rate a little.
Hardcore Until The End.
Sly
Sly
Diablo II renders the tiles in a (0,0)-(640x400) area. In the area (0,400)-(640,480) it renders the interface. The interface is rendered in a number of distinct sections. These sections are:

- life meter
- left hand action
- experience
- stamina
- show/hide minibar button
- belt
- right hand action
- mana meter
- minibar (if shown)
- extra belt rows (if shown)
- available left hand actions (if shown)
- available right hand actions (if shown)

All these would be blitted separately because they are distinct from each other. The life and mana meters are blitted separately because they extend above the interface and overlap the tiles. The life and mana meters are built from two images - a full meter and an empty meter. Blit part of the full meter showing the current level and then blit part of the empty meter to show the rest of the meter. For example, if your character had 150 of a maximum 200 life, then blit the top quarter of the empty life meter and blit the bottom three quarters of the full life meter.

Windows dialogs and controls? No game in its right mind would use these. Overlays? Not all cards support overlays. Blit your interface to the back buffer after you blit the tiles.



Steve 'Sly' Williams
Tools Developer
Krome Studios

Edited by - Sly on November 21, 2000 5:36:38 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.