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 / 1 question!

Author
Message
OneShot
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location:
Posted: 19th Jan 2007 06:03
I literally just started programming, so im trying to learn the basics and their really aren't any tutorials out there that really describe how to do pong. I have Dark Basic Professional. So I was reading one of the tutorials and one of the had a cool guessing game code. So im trying to work off of that and make my own little guessing game cause it's the only thing out there that I can really do. But im kinda stuck...if I do SET TEXT SIZE how do I stop that from going to all the text under it, isn't there a command to stop that code and let me put a seperate SET TEXT SIZE code. Heres what I have so far any help would be appreciated ^^


Thx

Just started! Help!!!!
OneShot
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location:
Posted: 19th Jan 2007 12:05
Scratch that top post...even though answering that question would be helpfull. I have another question. Im creating that pong game, and for some reason I can't get my buttons working. If you could point out why it would be much appreciated. Heres my 3d pong code




Just started! Help!!!!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Jan 2007 18:57
Well to start with, there's this:

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

Quote: "I literally just started programming, so im trying to learn the basics"


Well for goodness sake stop using 3D right away and learn how to do it in 2D first!!

Also, read some of the tutorials for beginners in the stickies at the top of this forum. Believe me, if you continue as you are, you will very quickly get bogged down and give up.

It's vitally important to learn the basics before you try the more advanced stuff. Essentially you are trying to write a book before you have learnt the alphabet!

As for the text size problem, use the Text Size command, use the Text command to print your text, then use the Text Size command again to set it back to the smaller size before putting more text on the screen.

TDK_Man

OneShot
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location:
Posted: 19th Jan 2007 21:26
Thanks a lot TDK...but thats the thing..I wanted to do 2d but I there aren't any tutorials that walk you through a 2d PONG. I wish there was. Thanks again! About the link you posted, i've read all of those a million times. Im spending a LOT of a hours trying to learn this stuff. But jumping into this 3D pong like I did helped a lot.

Just started! Help!!!!
OneShot
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location:
Posted: 19th Jan 2007 22:02
Sorry for double posting again, this is my last time. But if you could tell me why my buttons don't work. The color will not change when I hover anywhere on the screen so it's something with the if mousey and mousex codes...idk..anyone ?

Just started! Help!!!!
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 20th Jan 2007 13:03
You've defined x4 as width of quit$ before quit$ has been declared. So when x4 defined quit$ is "" so x4 is 0.

So If mousex()>x3 and mousex()<x3+x4
translates to:
If mousex()>400 and mousex()<400+0

Similiar problems with the other varibles.


The word "Gullible" cannot be found in any English Dictionary.
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 20th Jan 2007 15:55
erm to really get me started I used this wikibook thingy, It takes you through pong:

http://en.wikibooks.org/wiki/DarkBASIC_Programming
OneShot
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location:
Posted: 21st Jan 2007 05:23
So what exactly are you saying...how do I go about defining Quit$ before it is declared and how do I set text size and color without setting the text size for the entire do loop. And if I do
Do
Set text size 30
Print "Testing"
Set text size 20
Loop
The game slows down to a point where it is nearly unplayable.
Heres my current pong code atm.



Another problem is...when the ball comes in from an Angle it goes right through my paddle. Omg so many problems.
But first things first I gotta get my menu working!!
Thx for the help guys I really appreciate it

Just started! Help!!!!

Login to post a reply

Server time is: 2024-09-25 15:24:08
Your offset time is: 2024-09-25 15:24:08