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 / Completly lost

Author
Message
KameronScott23
14
Years of Service
User Offline
Joined: 11th Jun 2010
Location:
Posted: 12th Jun 2010 00:05
I bought Dark Basic Pro about 6 months ago and i just can't learn anything the tutorials dont help me and i am starting to think that i wasted my money. I also try to buy the Hands on books but im not paying $100 in shipping for two books. Any help would be great.
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Jun 2010 04:04
http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

Read through those.

Rawwrr. Sig Fail.
Newcastle is awesome
CGray
14
Years of Service
User Offline
Joined: 28th May 2010
Location:
Posted: 12th Jun 2010 15:25
Do
<code>
loop

These commands will make the program do a complete loop until stopped - since a game is just a looping program, this is perfect.

randomize - this will initialize the random number generator.
timer() - this will return(replace itself in the code) a number, generated based on a bunch of system variables, and is perfect for seeding a random generator with.

rnd(number) - will return a number between 0 and the parameter(in this case, "number".

variable AS <type> - worry about INTEGER(whole numbers) and STRING(text) for now.
variable = <whatever> - assigns the value <whatever> to the variable. Read the tut, it'll explain them in greater detail.

print "text" - prints text to the screen.
input variable - waits for the user to enter data from the keyboard, until they hit enter, then saves it in "string". if you use a number variable, such as integer, it'll only accept those numbers, ignoring letters.

if (variable <test> value)
<code>
endif

conditional statements work by executing then <code> inside them if the (test) comes true. if (answer = 1) will check if the variable called answer has data that equals 1.

You can put that into a simple number guessing game. Try before peeking!


Now go through the tutorials linked, and see if you can change the guessing number game to include a "Too low" and "too high" hint system, then I'd suggest utilizing arrays, mouse input and a box command to make a very simple memory game. The hard part will be figuring which card was clicked, which is covered by the menu tutorial - you'll simply have to figure out how to use it all.

The hard part is your first game, once you break down the barrier and figure out the logic behind it, each game comes easier, and then you can just build upwards.

For instance, once you understand pong, you can make break out, which can be easily translated into space invaders, which can be turned into a 2d shooter, and a little more can turn that into a 2d platformer..

As a hint, if you get a random number between 0 and your card array size, you can set a for loop to run from randomNum to randomNum - 1, but make sure you have an if check at the end of a loop so if you're at the array limit, you can set it back to 0. Some what like:



Assuming I've got the syntax right, it'll loop from the random number, to the end, then back to the start and up to the number just before the start point. This will make more sense once you've done the tutorials and understand loops and arrays, so don't worry too much right now, but you can still probably read that well enough that you knew what it was doing.

Good luck!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 12th Jun 2010 18:56
Dark Basic Professional is a programming language. In order to make games using it, you have to learn how to use it. It is capable of creating fantastic games that are tremendous fun to make and play. However, the only way you will learn is to expend the time and effort to do so.

TDK's tutorials are not that hard to learn and provide invaluable info in helping you not only to learn programming using DarkBASIC Classic / DarkBASIC Pro, but also provide programming principles that you could use regardless of the computer 'language' chosen.

Programming can be very rewarding and very fun, but it also can be very frustrating at times. Many on this forum will be glad to help you along the way, but you have got to be willing to help yourself. A lazy programmer is flame-bait and will not receive the help they desire.

So, you have to ask yourself if you are willing to invest the time that it takes to learn this language. If so, the tutorials will be of great help. If not, don't bother with them or with buying any books, because you will be wasting your money.

Good luck with whatever you decide.
AJAtom
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 15th Jun 2010 06:21
Personally I find it Helpful and morale boosting to look on these forums, find some some code snippet without a whole lot of undefined variables, and try to decipher it. Once you deciphered this big block of code that looked incredibly daunting to begin with you will feel incredibly enlightened on the fact that you now know how to do what was expressed in the snippet.

I need a new Avatar

Login to post a reply

Server time is: 2024-11-23 14:02:00
Your offset time is: 2024-11-23 14:02:00