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.

Code Snippets / [DBP]Menu System

Author
Message
SH4773R
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 6th Nov 2010 21:40 Edited at: 7th Nov 2010 03:27
while working on my game engine i coded this menu system, and thought id share it w/ u guys

press esc to bring up menu
use number keys or up/down arrow keys to navagate
exit and resume are working.
you have to code save and load



please include me in credits if used,
comment below if you need help

(thanks 2 Madscientist for help on this thread http://forum.thegamecreators.com/?m=forum_view&t=177491&b=1)
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 7th Nov 2010 12:29
You should test your code for it's performance whenever you make something. Why? Because you'd find that though it works, it completely kills your FPS. Where?

Here:


Set Text To Normal and Set Text To Bold are unbelievably demanding when used within the main loop. Just using it once will kill 80 percent of your FPS. And for anything 2D, especially text, DBP sucks. I would suggest using Cloggy's D3D Plugin for your 2D needs from now on: D3DFunc V3.0

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
SH4773R
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 7th Nov 2010 16:43
i have changed it to run outside of main loop will update code soon
CSL
15
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: USA
Posted: 16th Nov 2010 17:58 Edited at: 17th Nov 2010 02:28
Thanks for sharing this code. I will try it out with my game .

CSL
SH4773R
14
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 18th Nov 2010 06:28
Its a honor!

Login to post a reply

Server time is: 2024-11-21 20:19:38
Your offset time is: 2024-11-21 20:19:38