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 / Menu During Play

Author
Message
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 28th Feb 2007 02:13
I'm still new to this WHOLE THING

ok, here's my thing, i've looked a little for anything that could help with making a menu during game play, and found some helpful stuff. Anyways, what i'm trying to accomplish is that during game play pressing the shift key will make a menu appear much as in the begining of my game, and pause the game, allowing you to resume on the shift key again.

I have used functions a bit, and use it for this, and plan to use the button function in it as well. Another problem is that the $ and # do not appear, but just show 0.

heres a small portion of the code.



If anyone can help with that, or my other post on .x polygon collisions PLEASE help... thanx

www.soundclick.com/octoberscry ---> My Doom Metal Band
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Feb 2007 12:27
Quote: "Another problem is that the $ and # do not appear, but just show 0."


You've just discovered the 'downside' of functions - variables in a function are local. Admittedly, in some situations this can be an advantage.

Had you created a procedure and used Gosub, you wouldn't have had the problem.

As for your main problem with the menu, if you've structured your program correctly it should be a simple case of creating a menu procedure which contains a main loop which traps the program until you select continue - at which point it exits the proc and drops back to the main game loop.

Only because you said "I'm still new to this WHOLE THING", I have to suggest that you read some tutorials to bring you up to speed. If you haven't seen them, there's one which covers program layout here:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=7

Check out tutorial number 2 in particular. You might find some of the others useful too - like the one on functions!

TDK_Man

Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 3rd Mar 2007 22:56
thanks man... i was hoping to use functions in particular because i am making a fairly large rpg. But, the gosubs seem to be an easier way to get all the valuable info out of it i need. I have gotten a menu to appear although the button functions seem to not work in game play, and it seems like in order for the menu image to appear, you must use key press the up button twice as apposed to once.... which is a major pain... but, i'll figure it out more eventually.

If anyone can help with collision... Which is a killer being new, I HAVE read all the stuff in the massive collision resource, and sparky's crashes my program...

i'm using an .x based world, and .x based character... falling though the ground isn't that fun... lol...

here's my little move character snipit...



PS... I know there is probably 100 things you could rip me apart for this code.

I did try TDK's collision... and like all of them... which all worked fine when just run with thier snipits, but.... i'm using .x characters now... anyways... here goes nothing

www.soundclick.com/octoberscry ---> My Doom Metal Band

Login to post a reply

Server time is: 2024-09-25 17:33:39
Your offset time is: 2024-09-25 17:33:39