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 / I Don't get the code!!

Author
Message
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 15th Jun 2004 00:06
i dont know how to use code and anything thats code all i know is make object box 1,1,1,1 and a cube pops up, please help me (plz give me an anser like)make a box means etc,etc


help will be much appreciated
Hoss
20
Years of Service
User Offline
Joined: 7th Jun 2004
Location: Someplace with a PC
Posted: 15th Jun 2004 00:43
Well, the code that you do have would be a start. so we can have an idea of what you are TRYING to do. Post again and I will try to help

There's no problem so large it can't be solved by killing the user off, deleting their files, closing their account and reporting their REAL earnings to the IRS.
Dgamer
21
Years of Service
User Offline
Joined: 30th Sep 2002
Location:
Posted: 15th Jun 2004 00:48
There are many tutorials about DBC and DBP. If they aren't enough you can always get the book.

Putang ina mo
Skier Demon
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 15th Jun 2004 02:38 Edited at: 15th Jun 2004 02:38
Ok... I'll post a tutoiral in a sec
Skier Demon
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 15th Jun 2004 02:41
Print "Hello!"

This prints a string of text of the screen.
Print (Then in "", what you want printed)

Now try running the program. You will see a flicker on the screen, and then it will end the program. Why? You need to put in a Do Loop statment to loop a part of the program. So, here it is:

Do
Print "Hello!"
Loop

"Do" starts the loop
And "Loop" Ends it
Skier Demon
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 15th Jun 2004 02:43
Make obejct Cube 1,1 ... WHat this does is make a cube. The first number is the obejct #. You can't have 2 objects with the same #. THe second number is teh size. So, its like this:

Make Obejct Cube (Number),(SIze)
Skier Demon
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 15th Jun 2004 02:44 Edited at: 15th Jun 2004 02:50
Do
If UpKey()=1 then print "You pressed the up button!"
Loop

This makes it so if UpKey (the up key) = 1 (=1 means if it is pressed) then print text. So it basicly means if the upkey = 1(If it is pressed_ then print the text "You pressed the up button!"

Input "Hello! Type something in: "

If your fimliar with DOS, then this will be easy. If not, what this does is makes it so the user can type in something.

Input (Text to be displayed in "")
Rennekon
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 15th Jun 2004 04:49
this is good if you were to put it together in a bunch of tutorials, and then add some more, and make a small game and explain all the code this would be worth of a sticky!

John "Dark Lord of Angel Destroying Destiny" Pringlebee, maybe?
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 15th Jun 2004 19:05
Thanks very much skier demon I'm going to try out what you said
JamesR
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location:
Posted: 15th Jun 2004 19:07 Edited at: 15th Jun 2004 19:08
If Then statements

Its like if I spend my money then I will have less else I will have the same amount(yeah I suck at examples

Now in DB Code

x=1
y=2

input "Enter Number:";a
if a=x then print "you picked X!"
if a=y then print "you picked Y!"
else print "you didn't pick a correct number"
--------------------------
I think thats right, I'm just starting but I wanted to contribute
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 15th Jun 2004 19:27
ok thank you
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 19:32
I've been checking out the My First Pong Game and i get most of it.
It's just the Keystate(number) bit i dont get Why is the number 31 or 17 ??????
Dgamer
21
Years of Service
User Offline
Joined: 30th Sep 2002
Location:
Posted: 16th Jun 2004 19:39
31 is the scancode for the S key and 17 is for the W key.

Putang ina mo
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 20:01
what about the rest a,b,c,d,e,f,g etc
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 20:01
thanks for help
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 16th Jun 2004 20:35
Here are all the scancodes:

hope it helps. use them with the Keystate function

ex: if keystate(scancode)=1 then do something
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 20:55
Thank you..

Im trying pong but with a difference im doing it with the pong bats turning left and right !!!
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 16th Jun 2004 22:29
Well if you have any problems feel free to post them and I shall help as best I can.
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 22:37
ok
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 22:42
the game i work on before pong is this: a rectangle hitting a ball like football but the rectangle is just going straight thru ball why? (my coding is messed up 2)
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 16th Jun 2004 23:09
any help ????
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 16th Jun 2004 23:37
Quote: "any help ???? "

hey calm down i'm working on it . Got an exam 2morrow you know.
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 17th Jun 2004 00:33
ok dokey there take your time
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 17th Jun 2004 16:14
I'm sorry my computer is banned . I can't help till monday
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 17th Jun 2004 19:25
ok but: from dgamer
"There are many tutorials about DBC and DBP. If they aren't enough you can always get the book." where tuts please tell me....
Static
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location: United Kingdom
Posted: 17th Jun 2004 20:55
Tutorials, Guides & Advice for Newcomers:
http://www.thegamecreators.com/?m=forum_view&t=21133&b=7
Curved Basic [Resource for Newcomers]:
http://www.thegamecreators.com/?m=forum_view&t=27053&b=7
The Basics of DBPro Tutorial:
http://www.thegamecreators.com/?m=forum_view&t=25076&b=7
My First Pong Game:
http://www.thegamecreators.com/?m=forum_view&t=22030&b=7
The Game Programming Kit For Beginners:
http://www.thegamecreators.com/?m=forum_view&t=30080&b=10
DarkBASIC Professional From the Ground Up:
http://www.thegamecreators.com/?m=forum_view&t=32413&b=8

There are list of useful posts. I advice starting by looking at the first one then if any others intrest you just have a look.
Richard the_young
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location: Uk
Posted: 17th Jun 2004 21:03
OK DOKEY THANK YOU julianep

Login to post a reply

Server time is: 2024-09-22 13:25:05
Your offset time is: 2024-09-22 13:25:05