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.

Code Snippets / Kinda embarassed, but here's a pong game [DBC/DBPRO]

Author
Message
dlefik 2008
21
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Spencerville, OH
Posted: 3rd May 2005 17:37 Edited at: 3rd May 2005 17:39
Hope I don't get bashed for this I'm still really new to darkbasic pro and this is pretty much my real first game I've been doing. Actually I've done some work with DarkBasic in the past but nothing serious as I never thought I'd be much of a coder, but lately I've purchased my copy of DBPro and it's been quite addicting. Anyhow, everyone knows Pong is the great starter of the Noobs, so I set to work on it, and let me say, I've learned ALOT from this alone. Learn to think for myself for starters. So I thought I would post this up as a way for people in my situation to learn from. It's not exactly a tutorial as I suck at things like that, but if one who had no clue were to sit and actually think about this, it makes sense. Take it from me, don't expect everyone i nthe world to hand you code. It takes away the whole purpose of programming and it gets boring when you do that. So here it is, a simple player vs. computer pong. This was my first attempt at an AI system, and lemme tell you, it sucks, well, for me it was a huge accomplishment to see the computer actually circling around and trying for the ball lol. I have soo many cool ideas on where to take this but as of right now, this is what I have. It even includes a pretty nifty pause function which the idea for that was floating around the forums I had to search for. I just had to modify it to my needs. So hope someone on my level finds this helpful, and remember, this is all a learning experience for me still so it may not be the best way to approach it.
By the way, I've tested this in both DBC 1.13 and Pro but it was originally programmed on pro. The only major issue I had in DBC was the speed, it ran quite slow but still seemed functional. Might be the way I had to program it because how DBPro handles sprites now.
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 3rd May 2005 18:26
hey, thats quite good for your first game , well done

"Well, if he dies, it'll teach him not to do it again." - Me
dlefik 2008
21
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Spencerville, OH
Posted: 6th May 2005 14:38
Thank you Zotoaster, glad you liked it, considering it was my first contribution. Most would probably see the word pong and just overlook it, so glad someone liked it.
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 7th May 2005 04:46
Nice...
LordoFire
22
Years of Service
User Offline
Joined: 14th Feb 2004
Location: United States
Posted: 7th May 2005 14:00
I actually scored a point on the NEARLY impossible computer!!! Me win!!! Thats a pretty good game for your first. Congrats.

When it comes to programing, I'm on fire!
Formerly known as flame master...Changed name because I do not flame
Ianhfar
21
Years of Service
User Offline
Joined: 8th Jul 2004
Location: UK
Posted: 11th May 2005 18:51
Clickable SMiley

Keep up with this quality and you'll go far.

Ian
David R
22
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 14th May 2005 07:01
Ha ha! 5-4 to me!

[url=www.lightningstudios.co.uk][/url]
dlefik 2008
21
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Spencerville, OH
Posted: 14th May 2005 16:28
Thank you everyone for the replies.

Quote: "That is a lot of source, for experiance, you may want to see if you can clean it up a bit, use for's, it is always good to practice simplifying things"
I'll definitely take that and burn it in my head for future reference. I gotta agree, it tends to make things kinda confusing when you got alot of source and come back to it after being away for a bit. But thanks everyone again.

Login to post a reply

Server time is: 2026-07-03 05:01:52
Your offset time is: 2026-07-03 05:01:52