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.

Author
Message
Assassingradge
16
Years of Service
User Offline
Joined: 11th Nov 2009
Location:
Posted: 11th Nov 2009 18:30
Hello..^^
So I am new here and i came to learn from you how i make my one game.
OK i am goin to enter to the subject..Ammm
me and some frd we try to devlope a FPS ONLINE GAME i came at laste and they ask me to make a "SETTING MENUso the player can change the controle buttons and also the desplay and i wonder how to do it with dark basic so I start to think what if i use the *.ini files
Need help please...and thinks
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Nov 2009 19:32
Search the code base.
Searching for menu brought up many samples, including but not limited to this one.
http://www.thegamecreators.com/?m=codebase_view&i=d549d9811ef691de41c94b7593497644

Your signature has been erased by a mod because we're sadistic losers with nothing better to do. (joke)
Assassingradge
16
Years of Service
User Offline
Joined: 11th Nov 2009
Location:
Posted: 11th Nov 2009 21:46
Ammm...
I dont understend u sir can you be more clr
Assassingradge
16
Years of Service
User Offline
Joined: 11th Nov 2009
Location:
Posted: 12th Nov 2009 17:16
[href]http://img694.imageshack.us/img694/1791/4684d.jpg [/href]
Hi guys...
so there it is what I wanna do ..just to change what in the red box
so plz help
Assassingradge
16
Years of Service
User Offline
Joined: 11th Nov 2009
Location:
Posted: 14th Nov 2009 08:41
come on need more help
Vues3d on Kalimee
22
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 18th Nov 2009 13:20
Ok..
I think that the main question is:

Q1:
Have you ever made any code yet?

Q2:
Have you had a look in the hundreds of Menu, change key value codes which are quite everywhere on the site?

Q3:
Have you seen that at the bottom of this page there is a "Search" engine which works quite well?

Q4:
Would you like to have us coding the menu for you?

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Nov 2009 13:43
Assassin, if you really need a menu right now, then make it really simple. Just text, and a bitmap background - because there's no point investing time on a front end when the game itself is just smoke.

As the game develops, you'll have to learn any skill you would need to make a nice front end, so you shouldn't be worrying about that now.

Most front ends however work in a seperate loop or function from the main loop, so you might have a MENU() function that sets up the visuals then goes into a loop until the menu is no longer needed, the game starts, or whatever.

So to start out with a simple menu, you should get a backdrip image, you might want to spend some time on it then use it on the final menu as well. So to load an image and stick it onto the backdrop:

Load image "back.bmp",1,1
texture backdrop 1

Now until you change the backdrop, your back.bmp image will be displayed, and text, even 3D objects will render on top of it.

For the menu system itself, well I'm assuming that you want to use the cursor keys to move between options, and have different nests of options:

menu_sel=0
menu_page=0
Do

lmv=mv
mv=downkey()-upkey()
if lmv=0 and mv<>0 then inc menu_sel,mv

ty=100
text 75,ty+(menu_sel*20),">"
lsel=sel
sel=spacekey()

if menu_page=0

text 100,ty,"Start Game" : inc ty,20
text 100,ty,"Options" : inc ty,20
text 100,ty,"Exit" : inc ty,20

if lsel=0 and sel=1
if menu_sel<0 then menu_sel=0
if menu_sel=0 then start()
if menu_sel=1 then menu_page=1
if menu_sel=2 then end
if menu_sel>2 then menu_sel=2
endif
endif

if menu_page=1

text 100,ty,"Display Mode" : inc ty,20
text 100,ty,"Sound Volume" : inc ty,20
text 100,ty,"Back" : inc ty,20

if lsel=0 and sel=1
if menu_sel<0 then menu_sel=0
if menu_sel=0 then setdisplay()
if menu_sel=1 then soundvolume()
if menu_sel=2 then menu_page=0
if menu_sel>2 then menu_sel=2
endif
endif

Sync
Loop

Untested, ramble-code of course, but it might give you an idea on how to quickly tackle a menu. For more complex front ends, like with drop down menus and stuff, using arrays to track the options etc is much neater - like having an array for your main menu. It's best to start very simple, and add things as and when you understand them enough.


Health, Ammo, and bacon and eggs!
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 19th Nov 2009 08:33
I already gave you the link for button code which can make nice menus. If you couldn't figure that out then you need to start smaller.

Your signature has been erased by a mod because we're sadistic losers with nothing better to do. (joke)

Login to post a reply

Server time is: 2026-06-12 05:09:39
Your offset time is: 2026-06-12 05:09:39