Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / command view - how best to do it?

Author
Message
Sardines Lover
17
Years of Service
User Offline
Joined: 8th Mar 2009
Location:
Posted: 9th May 2011 12:41
Im creating an FPS game. However I want to be able to pull up a command view where the player can give his squad orders.

Am I best having one plain and drawing all icons to it through the 2d commands...
or should I go for a small plain per icon which are then simply moved over one big plain? Which would be more economical on the CPU?
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th May 2011 13:08
Personally, I like Battlefield P4F's method of showing the menu while a certain key is pressed. Like if I spot an enemy, I hold Q and click 'Enemy Spotted'. It's really quick and straightforward - the danger is that anything more complex than that will just be ignored.

I would try for some sprites around the centre of the screen, like if you had 4 different squad commands, I'd have a quarter circle for each, around the crosshair - then let the player select one with just the region. So, I'd work out the angle of the mouse pointer from the centre of the screen, so it's in 1 of 4 quadrants - even if this has to be broken down into sub-menu's, it would still be pretty neat and straightforward I think. The beauty of using sprites is that you can get all those GUI functions in place quite easily, because you can fade, rotate, colour and scale sprites. Maybe make a pure white icon set for your squad commands, then set the colour to cyan, except for the selected command which you could make white. I would also make the commands translucent when not selected as well. People would remember where the command is quite easily, they would be right in the players field of view, and if you bind onto a natural key (like Q) then there would be no excuse for people not using the squad commands.

Health, Ammo, and bacon and eggs!
Sardines Lover
17
Years of Service
User Offline
Joined: 8th Mar 2009
Location:
Posted: 9th May 2011 14:13
Thanks for the reply. However I may not have been clear enough.

The game is FPS with an overhead tacticle view. The player uses this to plan and execute the mission but also gets to play in the fps mode.

The overhead view is crucial for the commander and the player has to accuratly tell the NPC where he needs him.
Agent
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 11th May 2011 07:41
Hi Sardines,

Just so you're aware, DBPro handles sprites in the 3D engine anyway. Sprites are actually 3D objects (a plane textured with the specified image) so there's not a great deal of difference between creating planes yourself, or drawing things in '2D'. The advantage of using the sprite commands, however, is that it's easier to manipulate them with rotation, fades, scales, diffuses and so on, as Van mentioned.

When your player brings up the command overview, stop drawing your regular 3D FPS environment and draw your map to the screen using the 2D sprite commands. The CPU usage will be exactly the same as drawing the planes yourself (because DBPro does the same thing internally in both cases anyway), but by doing it in '2D' you'll have more flexibility with image manipulation.

Login to post a reply

Server time is: 2026-07-11 04:23:05
Your offset time is: 2026-07-11 04:23:05