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 / Main Menu Help

Author
Message
JRARS Games Studio
13
Years of Service
User Offline
Joined: 25th Jun 2011
Location: United States
Posted: 14th Jul 2011 06:34
I making a main menu for my game, but don't know how to get the buttons to take a player to a selected screen the code is as follows



Any help will do just need to know how to link screens together and another code I'm having trouble with is the side scrolling code I found a code on the forums to make it scroll from top to bottom, but I have no idea how to make it scroll right to left.


Here is the top to bottom code I'm still in the process of editing it for my game


The reason I want both Right 2 Left and Top 2 Bottom is because I'm doing two types of games one is a side scrolling shooter and the other is a music game like RB and GH. But the first game is the shooter.

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Jul 2011 08:10
Copying code is not going to help you very much if you don't know the concepts of the computer or what each command is suppose to do.

It's great that you want to make your dream game right away but you really need to learn more about code. Check out TDK's Tutorials to learn the basics of Darkbasic.

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


One way to go to another section of code is GOSUB. What GOSUB does it allows you to go to a label and go back to the line after the GOSUB when it hits a RETURN. This allows you to organize your code in sections. Of course you would learn this if you check out TDK's Tutorials.



I'm too tired to go into detail about the screen coordinates and how to scroll vertically. Check out lesson 3 of TDK's Tutorials for the answer but don't look at 3 till you understand lessons 1 and 2.

JRARS Games Studio
13
Years of Service
User Offline
Joined: 25th Jun 2011
Location: United States
Posted: 14th Jul 2011 08:42
I have TDK's Tutorials, but I'm still reading through it I found a version on the forums that has all the DBPRO Tutorials in one PDF file which I will include in the download link. It is really long and when I printed it out I forgot to have my printer number the pages so I have to use some kind place holder every time read it so when I put it down I won't lose my place I already started over because I missed something in the guide itself. I am going to have it printed at a Staples store and turned into a book for myself to make it easier to read.

Attachments

Login to view attachments
JRARS Games Studio
13
Years of Service
User Offline
Joined: 25th Jun 2011
Location: United States
Posted: 14th Jul 2011 15:31 Edited at: 14th Jul 2011 15:42
Alright now I'm trying to make a sub menu for the main menu to go to when the player selects a mode the code is as follows



I read the tutorial and saw this and thought it would work good with my game and decided to edit it to fit my game just even after reading the tutorial which reads like stereo instructions I understand it it's just now I what do I put in the labeled areas in the code snippet

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Jul 2011 21:20 Edited at: 14th Jul 2011 21:48
You're having problems 'cause you're not really reading the tutorials... or you're reading them way too fast to understand the concepts. When you have an error in your program and you want help don't copy code that you're not using. When you said that "GOSUB Setup" produced an error that the label didn't exist I saw in that code snip "Setup:" which is a label so I automatically assumed you were crazy because that's the label. Always post your exact code so we can help you better.

You might want to reread the tutorial that'll teach you about labels:
http://forum.thegamecreators.com/?m=forum_view&t=96075&b=7


Here's the gist of it... labels are words with a colon at the end.


To fix your code all you need is a "Setup:" and a "ThatRoutine:" somewhere in your code.

Now I'm glad you're speeding along to functions but again without learning the concepts it's a bad idea to "learn" this fast because you'll only get confused. Here's why you'll be confused. X, Y, Z, at the function call "K=ReadKeyboard(x,Y,Z)" is fine because the function is created with "Function ReadKeyboard(X,Y,Z)". If you don't use X,Y,Z in the function then yes you can get rid of X,Y,Z in the function call. They are only variables so you can replace X,Y,Z with different variables on the function call but make sure you have 3 variables (no matter what their called) otherwise it'll produce an error.

Read Sixty Squares tutorial on functions:
http://forum.thegamecreators.com/?m=forum_view&t=87472&b=7

And if you're wanting more tutorials check out Zotoasters list of tutorials:
http://forum.thegamecreators.com/?m=forum_view&t=115633&b=7

Your quest for your dream game is hindering your ability to learn. Just stick to the basics like printing your name till you carefully and slowly read the tutorials and try the code within them as you go.

JRARS Games Studio
13
Years of Service
User Offline
Joined: 25th Jun 2011
Location: United States
Posted: 15th Jul 2011 06:09
I know it just I want to get the small stuff out of the way and then work on a the other game I'm creating witch is a 2D side scrolling game, and mainly study the guild I Downloaded from one of the links you left and I will study that one and the one I have already.


I'm not trying to be the "annoying noob" I just believe the best way to learn something is through trial and error and asking questions, not just reading the guild and when I have at least five years of doing this under my belt I'm writing a guild that will be free to download because the only other one I've seen is $50 in the US, I just hope when I buy the full version it has one included in the download. Thanks for all your help, be sure to check my other posts out too...

Piano Hero Ideas

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Jul 2011 08:18
It's ok. Trial and error programming is a decent way to learn. Most of us that started programming when we were kids learned that way too but thankfully new programmers have the internet and the Darkbasic forums.

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 15th Jul 2011 09:40
Quote: "I know it just I want to get the small stuff out of the way"

The small stuff can be quite important though. I had a go a ignoring some of the small things in c++ and tried to create a using the windows form creator, didn't get very far. So now I'm learning the basics.

Quote: "I'm not trying to be the "annoying noob" I just believe the best way to learn something is through trial and error and asking questions"

As Grog said, this is an excellent way the learn. Remember, learning a programming language is like learning a speech language, you won't master it in a week, it takes time and patience to develop programming skills.

Quote: "when I have at least five years of doing this under my belt I'm writing a guild that will be free to download"

Don't feel as though you have to set a time frame before you can start on this project. Everyone learns at a different pace. You will know when you are ready to tackle something like this when you see it forming in your head and you automatically create theories on how each aspect of the game can be coded. Atleast this is what happens to me before I start coding a game.

Login to post a reply

Server time is: 2024-11-22 18:58:36
Your offset time is: 2024-11-22 18:58:36