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 / My First Pong Game

Author
Message
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 24th Feb 2004 21:34
It seems quite a lot of people have done the tutorial but not said anything here.

Please post something just to bump it and to see how many people are actually doing it.


Coming Soon...
Cyberflame
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Im not sure....
Posted: 24th Feb 2004 22:18
I've done it. It was a big help... THIS NEEDS TO BE A STICKY!!!!!!!

quad 10k terrahert cpu| 9k^9k terrabyte(tb) hd|stolen military graphics card capable of rendering all of the pixar movies in 5 secs|999^9k tb of ram

15in monitor with 13in veiwable screen
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 2nd Mar 2004 00:53
Done it, great help should probably go in the tutorials section.

"fireball"
Cyberflame
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Im not sure....
Posted: 6th Mar 2004 23:57
*BUMP*
MODS, STICKY THIS

quad 10k terrahert cpu| 9k^9k terrabyte(tb) hd|stolen military graphics card capable of rendering all of the pixar movies in 5 secs|999^9k tb of ram

15in monitor with 13in veiwable screen
Jiffy
20
Years of Service
User Offline
Joined: 5th Mar 2004
Location: Hiding in the bushes in your backyard
Posted: 7th Mar 2004 03:52
Hi. I've followed your fantastic tutorial, and got a great result, but how do you color the background? I've tried a few things but it won't work (I removed the white floor if that has anything to do with it). So if you could help, that would be great!

Last night I was looking up at the stars and said "Where the hell is my roof?!"
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 7th Mar 2004 16:42



Coming Soon...
Saikoro
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 7th Mar 2004 18:11 Edited at: 18th Apr 2004 14:15
Removed post

"This world is LOVE and PEACE!" -Vash the Stampede

Jiffy
20
Years of Service
User Offline
Joined: 5th Mar 2004
Location: Hiding in the bushes in your backyard
Posted: 8th Mar 2004 04:20
Thanks Chris, I don't know much about DarkBASIC yet, so this tutorial has helped heaps, thanks.

Last night I was looking up at the stars and said "Where the hell is my roof?!"
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 8th Mar 2004 23:45
@Chris Knott why you don't make a little web site with this tutorial.

CURRENT PROJECT: RETRO PAC-MAN
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 14th Mar 2004 10:33
I can't really be bothered ......

Let's just keep shouting "STICKY!"


Coming Soon...
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 21st Mar 2004 16:54
bump


Coming Soon...
Rennekon
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location:
Posted: 24th Mar 2004 18:36
STICKY...STICKY....STICKY!!!

John "Dark Lord of Angel Destroying Destiny" Pringlebee, maybe?
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 27th Mar 2004 21:55
Heeeelllloooooooooooo?

Heeeelllllooooooooooooooooooooooooo?

Code Ninja
20
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 27th Mar 2004 22:14
Chris you should make a website. twill be much easyer than typing "STICKY" every couple of days...

PC: Pentium II, 333Mhz, 128 Mb SDRAM, 20 & 4Gb hard drives, 8Mb Videocard, Windows XP, Direct X 9, half-dead CD burner, crappy moniter (15inch), DBC 1.13
~Dragael Software
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 28th Mar 2004 13:55
Yeah but it's just so damn fun.

Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 8th Apr 2004 17:23
Just thought I'd save this before it got automatically locked.

Twisted Demon
20
Years of Service
User Offline
Joined: 4th Apr 2004
Location:
Posted: 10th Apr 2004 13:31
Chris, i really enjoyed your tutorial, are you thinking of doing any other begginers tutiorials, maybe be one for asteroids, space invaders , or snake???

I would really appreciate it, if you would do.

Thanks
Andy
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 10th Apr 2004 19:52
Maybe.

I'm a bit busy with my own games at the moment.

Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 11th Apr 2004 23:37
i cant save the pages, so i cant view it cos i cant be online for long, any chance of a pdf? (or get some1 to do it for u)

N30F15H
Co-CEO of Pulse Productions
www.pulseproductions.tk
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Apr 2004 01:34
Hey, you mods, sticky this ... oh ... er ... um ... yeah

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
McBain
20
Years of Service
User Offline
Joined: 16th Apr 2004
Location:
Posted: 16th Apr 2004 17:33 Edited at: 16th Apr 2004 17:34
Hi fellas!

Is this tutorial for DBclassic or DBpro?
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 16th Apr 2004 20:32 Edited at: 16th Apr 2004 20:32
I think it can be for both

CURRENT PROJECT: RETRO PAC-MAN
webadpro
20
Years of Service
User Offline
Joined: 14th Mar 2004
Location:
Posted: 10th Jul 2004 07:04 Edited at: 10th Jul 2004 07:05
Big thanks for this tutorial...

BTW Christ if u want I could help u to create the site for this tutorial cuz it's a really great tut... just contact me at web_ad_pro@hotmail.com if u want me to help.

Thanks...

Cheers!
Newbie to 3d
20
Years of Service
User Offline
Joined: 20th May 2004
Location:
Posted: 12th Jul 2004 07:12
I have to say that I loved this tutorial. I've had darkbasic for a couple of months and it's the first real game I could really understand how it works. I too hope that you will do another tutorial for us newbies. Thanks
Squids Revenge
20
Years of Service
User Offline
Joined: 19th Jul 2004
Location: Washington
Posted: 19th Jul 2004 12:00
Hey,

Why don't you post the game file?

Thank you for readong my post. :o)
heretic
20
Years of Service
User Offline
Joined: 19th Jul 2004
Location: the deepest, darkest, pit of cyberspace
Posted: 20th Jul 2004 05:46
help! i followed the tut to completion, but when the ball bounces between the two paddles, even if you move paddle one out of the way for the ball to pass, it will bounce as if the paddle were still there.

what?...do'h
lokatsis
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location: greece
Posted: 29th Jul 2004 00:21
Hello everyone.i would like to present you my version of Pong.
this game that i created is based on this tutorial.
this is the link where you can download the game:
http://www.geocities.com/xalasmos_2003/pong.zip

Special thanks to Chris Knott for this helpfull tutorial.

THE AOOS
MrBlack
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: Switzerland
Posted: 31st Jul 2004 13:27 Edited at: 31st Jul 2004 13:28
I guess I'm not the first noob that this tutorial helps... Many thanx for it ! I can now start to move from 2D to 3D.

Now, don't just write a tutorial... Write a book on DBP (it would be so much better than this paper-waste named "beginner's guide to darkbasic") !

You have failed me for the last time
GICO
20
Years of Service
User Offline
Joined: 22nd Jun 2004
Location: Probably watching The Monkey Show
Posted: 6th Aug 2004 04:26 Edited at: 7th Aug 2004 03:25
That was a very nice tut!!! I really learned from it! I just had one problem... if i used 1 as the size of my sphere it wasnt displayed! it was the same with the box'es! But great tut!!
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 20th Aug 2004 11:14
I think it doesn't display cuz it's too small size.


CURRENT PROJECT: RETRO PAC-MAN
Mr Monkey Man
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location: UK
Posted: 22nd Aug 2004 03:52 Edited at: 22nd Aug 2004 03:53
Hi, excellent tutorial just one problem (not with the tutorial mind you). Im working my way through your tutorial but when I run the program I only see a black screen. It was running alright earlier except the ball was going through the paddle, what am I doing wrong please help.



*For every problem you come across you gain something from correcting it, I hope.
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 22nd Aug 2004 04:27 Edited at: 22nd Aug 2004 04:32
You just need to put sync before loop, so your code looks like this....



EDIT:: And to stop your ball from passing through the player's paddle, just change

to


Formely code2kill
To tell you the truth, I'm just glad I DON'T enjoy playng The Sims.
the play2kill fan club
Mr Monkey Man
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location: UK
Posted: 22nd Aug 2004 05:03
Thanks for that, now I have some more problems. Please help.

1.The ball bounces off the paddle on the right even when the paddle isnt there.

2.If I dont move any of the paddles the ball bounces from one to the other then when it bounces back to the green one it goes through it.

By the way I edited the code so that the ball doesnt look like it penetrates the paddles before bouncing

Thanks for you help

*For every problem you come across you gain something from correcting it, I hope.
Mr Monkey Man
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location: UK
Posted: 22nd Aug 2004 05:10
Sorted both problems out I had playerpos1 where i had playerpos2 and vice versa.

*For every problem you come across you gain something from correcting it, I hope.
Mr Monkey Man
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location: UK
Posted: 22nd Aug 2004 05:22
Now when I place a new object for the floor I cant see the other objects when I run the program . I think its got something to do with where Im positioning it. Im putting the position as 0,-3,0
is this right. If not please point out where I have to place it.
Thanks

*For every problem you come across you gain something from correcting it, I hope.
soapyfish
21
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 22nd Aug 2004 05:26
It could just be that it's a little too high, put a big number in like 0,-20,0 then if you can see the other objects you know it was just too high, you can then make this number smaller and smaller until its at the right height. Hope I helped

Formely code2kill
To tell you the truth, I'm just glad I DON'T enjoy playng The Sims.
the play2kill fan club
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 16th Sep 2004 04:24 Edited at: 16th Sep 2004 04:24
Glad you guys like the tutorial.

I'm thinking about making a "My Second Pong Game" tutorial that would just take it further with sounds, textures, menus etc.

Some of you should try and do stuff like that yourself though.

If you want to load a texture (which is a picture that you can wrap around an object to make it look better) use this code:

LOAD IMAGE *FILENAME*, *IMAGE NUMBER*

For example -


The image number is just like the object number (an number so the computer can tell between them)

Make sure the picture file is in your project folder (Crogram FilesDark BasicMy ProjectsPong or something) then put the load code at the top

Then put this code before the main loop but after you've made the objects:

TEXTURE OBJECT *OBJECT NUMBER*, *IMAGE NUMBER*


That will texture Object 1 with Image 1

Here are some textures you can use (Right Click, Save Target As...):-


ShadowDragon
21
Years of Service
User Offline
Joined: 26th Oct 2003
Location:
Posted: 18th Oct 2004 11:53
Great tutorial. I liked reading it and learning from it. Yet, I get a black screen when I try to run it. Now it could be cuase I have the demo ver of dbpro till my copy gets here. I even thought, hmmm maybe I mistyped stuff in, so did cut/paste from the authors "code snippet" section at the end. My copy as it stands in dbpro is here any thoughts What I did wrong?


Thanks

Do not let your past be who you are but rather a part of who you will become.
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 19th Oct 2004 03:30
Sync is sooooooo important it needs its own line:



Can you believe it?
That's the only thing that's wrong.

Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 13th Nov 2004 02:41
Woot.

Thread hits 8500 views. One of the most viewed threads on the forums.
Basic brain
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location:
Posted: 1st Dec 2004 00:14
Hi, great tutorial - better than the official ones.
I'm new to db, but spent 2 years learning vb as part of a computer science course at school. However 3 years of working a 9to5 has turned my brain to mush...I tried to use vb again last month...wanted to have a couple of buttons on a form, press one, another becomes visable, press that and a message box appears. Took me 4 hours!

I started off with the db help files - which introduced me to the command syntax but that's about it. Then read the offical tutorials on the web (alot of the code in them didn't run when I tried to copy into DB)...but the descriptions made me feel a bit more comfotable with what I was trying to do.

but the real problem for me as a newbie is when I open up db, start a new project, then sit staring at the blank screen wondering what the hell do I do first - and how do I get from that blank screen to something that will actually run?

Anyways, great tutorial - more please...one of the things I'd like to see is how to create a basic 3d world, put a camera in it, and be able to move the camera around....then move that on to putting other stuff...
Dylnuge
20
Years of Service
User Offline
Joined: 4th Dec 2003
Location: In a dark room in front of a glowing LCD
Posted: 6th Dec 2004 04:05
Amazing, its still going after a year. About one year ago, this was the greatest thing I ever read! Thanks for helping me reach where I am today (still almost nowhere, but much better at programming ).

Tranzerk Technologies Current Project: Action Bum (credit to Raffael Coronelli)
StevetS
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 7th Dec 2004 21:23
Just coming back to DB (finally deciding I've got some time with Christmas Hols coming up) and I'm back looking at this post again.

Still a Cracking thread, really well explained and needs to be stickied with superglue.

To BasiclyDark I'd recommend planning EVERYTHING out on paper first (Flowcharts can also be a help). Also with your comment on a basic 3D world - the printed starter tutorials with the DB package give a good basic understanding of how to put together a 3D world. Use this as a basis and add to it/tweak the code. Its the best way to learn what you can do with the commands.
Basic brain
20
Years of Service
User Offline
Joined: 3rd Dec 2003
Location:
Posted: 8th Dec 2004 02:03
Hi - changed my forum name to something less lame, and more honest.
I've got DBpro & tried the tutorials included with it....they made no sense whatsoever to me, and all the code it gives doesn't acutally run - I hit F5 and it comes back with an error (telling me which line is at fault but giving no indication as to what the problem is) - and I don't understand what that line is or what it's doing.....
It's a bit like when I learnt to play the guitar...I tried to learn - I bought books, I paid for someone to teach me, but both start with learning the notes and chords - I just couldn't get the hanf of it and gave up. But my cousin who is 5 years younger than me tought me a few nirvana tracks, and I picked them up no worries. I can now play comae as you are and mr moutsache - and I'm buying her a mettalica song book for xmas!
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 12th Dec 2004 01:39
This tutorial -- as many have said already -- is excellent! I have progresses to DBP from my old Gaming Engine, BYOND, anyways I love this tutorial and from what I've read it's been around for a year...sheesh a year and it's still being viewed thats awesome. I was just wondering how to add waiting.. When I programmed with BYOND I would use the sleep command, if I wanted the computer to wait 5 seconds I'd use sleep(50) and sometimes wait(50) (different purposes), is this similar to DB language? I just want to know because I need a waiting command in my jumping I'm working on and I want to have the game wait a bit before resetting the ball.

Causin' RUCCUS whereva' I go.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 17th Dec 2004 01:32
Your tutorial rocks! I used it a while ago to make a breakout game - one thing though - how do I change the glitch where it gets stuck inside the paddle or block sometimes? I know why (because it hits it from the side and it only reflects up or down in my adaptation thing) but I can't figure out how to solve it.

Am I the only one here who's really confused?
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 17th Dec 2004 05:07 Edited at: 17th Dec 2004 05:07
You'd probably need to add a variable called BeenBounced.

This would be set to 1 if the ball has bounced once.
The ball will only bounce again when it has been set back to 0, you could do this when it crosses the middle of the court or something.

That would stop it bouncing frantically because it could only bounce once.

------

I can't believe it's been a year either.
Blimey. Back then I was pretty much a newbie myself, I hadn't even entered my game for my first competition.

I remember, I coded it in DBC and I came 8th and won a copy of DBPro. I was ecstatic.

Then this compo, I came 2nd!!!
Wow. I've come a long way. My compo entry for this year was like 1500 lines.

When I wrote that tut I would have never been able to code something that long without losing direction.
eek
19
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 26th Dec 2004 15:47
Hi,

I've been following the tutorial for a while now and I've been trying to modify it myself. The first thing I wanted to do was change the ball to go a bit more randomly because when it starts out all you have to do is leave it there and it will go strait back and forth. What I did was just modify when it hits either paddle, it will go not 360 degrees but around 345 or some number like that. It seems to work ok.

I also tried to add a You Win! message win you get to 5 points. I tried the code by commando but it was wrong. I decided to just try myself and I tried to add after the scoring code:



It works, but the game keeps going. Also, since it keeps going if the player 2 gets to 5 then it says you lose also even if it has already said you've won. I need help on ending the game, I don't know the correct code for that.

The last thing I tried but couldn't do is lengthen the board for more time to prepare to hit the ball. I made object 4 longer to 15 and placed both paddles in the correct position, but I couldn't correct the ball bouncing code to make it hit the paddles correctly once they moved.

Here is the game code of the modified board/paddle:



I tried adding 2.5 to both sides of ball movement and I got the ball to go the correct distance but it wouldn't make contact with the paddle. It would go through it and count it as a point every single time the ball was played.

Something I have no idea how to do is how to make the ball respawn slower so there's more time in between each round.

Any help is appreciated.

insert cool signature here
kairi990
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: USA
Posted: 18th Mar 2005 07:43
thanks the tut. I learned a lot from it

Slow and Steady Wins the Race GRASSHOPPA!
noslenfl
19
Years of Service
User Offline
Joined: 21st Mar 2005
Location:
Posted: 21st Mar 2005 09:13
im a noob and im working on breakout(amazing tut by the way) my problem is i can get the ball to turn when i hit it while moving

here is what i have


if you are reading this notic you'll notice its not worth noticing

Login to post a reply

Server time is: 2024-11-27 05:35:16
Your offset time is: 2024-11-27 05:35:16