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.

Newcomers DBPro Corner / need advice on making in-game menus

Author
Message
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 26th Dec 2002 16:31
I need some advice on making in-game menus where i could select like new game, load game and quit
thank you and goodbye
hmm-my head is completely empty
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 26th Dec 2002 17:39
My advice

1 Use Sprites
2 Make a mouse over function (x and y coorinates)
3 Learn Gosubs

You really gave no where near a good amount of information. Heres an ingame menu for you

Print "(N)ew Game"

if inkey$()="n" then gosub new game

new game:
cls
print "this is a new game!"
return


There ya go.....

Im on the instant messengers below. I can help you if you clerify your needs and problems.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 26th Dec 2002 20:00
thanks, but how can i get the coordinates of the mouse and how can i select larger areas of the screen but one certain coordinate? i know i have a lot of questions, but i'm still new


hmm-my head is completely empty
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 27th Dec 2002 01:51
You need to write a mouseclick function like by using < > symbols. You need to make a box out of the coordinates. Find the four coordinates of the box you want to make
x1 y1
----------------
| |
----------------
x2 y2

Then use < > symbols to determine if the mouse is greater than x1, but less then x2, and greater that y1, but less then y2 etc.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 28th Dec 2002 02:37
Well, it's not easy on the novice coder (probably not on the average coder, either) but I'm using several 3D planes for the bulk of my latest menu, with a function that creates the text contained within each. It's quite hard, but it gives a lot of flexibility.

"I am a living, thinking entity who was created in the sea of information."
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 28th Dec 2002 04:37
Good plan I can see where that would be a good idea. Im a 2d menu man, so I just stick with that

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
ChronicFear
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 28th Dec 2002 06:01
Dr Doomer, what did you mean by that?

Your suffering cause of me its divine
-Korn-
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 28th Dec 2002 16:55
You make lots of plains, lock them to the camera movement and them align them into the right places.

Or, as I've done, makes lots of plains, write a function that behaves just like the 'lock object on' command, then align them into the right places but with the added benefit of extra speed and even more flexibility.

You'll need a bit of trigonometry experience to do it the way I have!

"I am a living, thinking entity who was created in the sea of information."
Epidemicz
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 30th Dec 2002 21:32
Is it just me or is it really funky when you try to lock plains to the screen and position them, when I tried, I could get it to work but I couldn't understand why I had to use really weird values to position it in the right spots.

I am the very disease you pretend to be.
soap_shoes
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United States
Posted: 31st Dec 2002 02:40
dunno.

noobie game designer
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 31st Dec 2002 03:05
Perhaps; it does take a little bit of experimentation, but I think I'm used to it now as I don't really notice that much.

"I am a living, thinking entity who was created in the sea of information."
Krastor
21
Years of Service
User Offline
Joined: 27th Oct 2002
Location: United Kingdom
Posted: 1st Jan 2003 15:44
I know what you mean, at school, i sat down and started progrtamming, then another programmer, just as experienced came along and goes 'what the <insert naughty word> is that!' and i didn't even know it was complicatd, i just wrote it.

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 1st Jan 2003 18:00
lol

But anyways- on in game menus.

I guess for your need its quite easy.

To make a new game, simply, go to your game
To load a new game, simply search for a file, and if it exists, load the code
To quit, well, thats pretty self explanitory

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Yskonyn
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: Netherlands
Posted: 3rd Jan 2003 15:52
OK, here is some basic coding in which I have defined an area on screen, in this case the "Start Game" area.
The code checks if the position of the cursor is within the limits of this area AND if the user clicks with the mouse, if all is true then the program goes on to the Start label.
The numbers for a and b in the IF line are the numbers representing X and Y coordinates, which will be shown in the topleft of your screen as a debugging feature.



Hope this helps?

Yskonyn -
"It's better to wish down here you were up, then to wish up there you were down."
"The ONLY time you have too much fuel on board is when you are on fire."

Login to post a reply

Server time is: 2024-05-03 00:12:42
Your offset time is: 2024-05-03 00:12:42