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 / A newbies first prog - yes!! Pong again!

Author
Message
iannai
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location:
Posted: 11th Jul 2003 21:52 Edited at: 11th Jul 2003 22:08
OK, here is my first effort at programming Dark Basic classic (which I picked up from Amazon for £17.99 - bargain!)

If all goes well, I will upgrade to DBPro

In the mean time, I would be grateful if some of you more experienced programmers would cast a critical eye over this one and let me know what you think.

The AI works on a simple random number, as does the ball speed and angle change. Oh you need a "beep.wav" as well - any sound will do!

iannai
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location:
Posted: 11th Jul 2003 22:08
oops!

Must get used to this forum

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Jul 2003 22:57
thats very good for a first game, the computer bat could have had the position smoothed a bit with curvevalue so it wasn`t so "jittery" and the title screen needs a sync after the printing cos I couldn`t see it, I had to guess you needed to press a key.
now I challenge you to enhance it, give the background a tiled grass texture and make the court markings ghosted plains (so it looks like the grass has been painted), allow the player to select their colour and the opponent skill, make a high score table and change the ball to a small sphere, then make it bounce off the bat at different angles according to how close to the edge of the bat it was when the ball hit.
then add some verbal taunts and ....oops!, getting carried away there, but it is worth seeing how much you can add to the basic concept, games can tend to grow into something far more elaborate than you imagined at the start, sometimes bad, sometimes they just get bloated, but it`s good practice to see what is and isn`t a good idea, it can save you a lot of grief when you get onto more elaborate titles, cheers.

Mentor.

iannai
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location:
Posted: 12th Jul 2003 00:22
Thanks for the feedback, much appreciated! You have given me some good ideas to carry on practising - well, I guess I can't get any worse at this programming malarkey!

My ultimate aim is to produce a PC version of the Japanese Dreamcast game "Tokyo Bus Guide!!" How sad is that ?!

Maybe in about ten years time, I'll be about good enough

Still, it's all good fun

DaveTheStudentAt28
21
Years of Service
User Offline
Joined: 12th Jul 2003
Location: United Kingdom
Posted: 12th Jul 2003 21:28
Ahhhhh Iannai! I've been trying to write my first game ( Yes PONG! ) but not been having much luck. Hope you don't mind if i take yours apart and see where im going wrong. I'm trying to use sprites but you seem to have just drawn the ball and stuff directly. Anyway, Cheers.

Pazza
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: United Kingdom
Posted: 12th Jul 2003 22:41
I've been developing a pong style game for some time, and i don't thing its as good as your version, impressive first game.

Whatever it is the answer's no!
iannai
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location:
Posted: 13th Jul 2003 20:00
DaveTheStudentAt28 - heheh! no problem, tear it apart all you want
By the way, I'm a StudentAt30 so we have something in common - felling old when at college (I do anyway )

Yeah, I just drew the bits directly rather than use sprites, but it shouldn't make a lot of difference.

I've actually just finished a 3D pong as my second attempt using the built in primatives, and managed to do a lovely scrolling sky background with gentle breeze sounds

Once you get the hang of it, it's great fun !!

Pazza
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: United Kingdom
Posted: 13th Jul 2003 20:03
Quote: "I've actually just finished a 3D pong as my second attempt using the built in primatives, and managed to do a lovely scrolling sky background with gentle breeze sounds "


I'de like to see that.

"Bite my shiny metal ass!" - Bender
iannai
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location:
Posted: 13th Jul 2003 20:18
Well, ok I've posted the source below, however:

It does use some media files as well, just some bitmaps for textures, the sky texture and sounds. You need to have the following files in the same folder as the dba file:-

score*.bmp (where * is 0 to 6) some number images for the score
sprite.dba - an include file for creating 3D sprites for HUD displays
blue06.jpg - the sky texture
grass15.jpg - the grass texture
hedge02.jpg - the borders
serve.jpg - a background for the "click to serve" message
wood09.jpg - texture for bat and ball
hitball.wav - sound for hitting the ball
sea.wav - the background ambient noise
thump.wav - for when the ball hits the boundaries

all of the above files are from the "media" content of the DB disk, however I converted from bitmaps to jpegs to save some disk space and editted the sky texture so that it wrapped seamlessly.

Or, you could always delete all the references to textures and sounds if you wanted to look at the basic game structure.

Anyway, hope it is of some use

Login to post a reply

Server time is: 2024-09-20 15:26:05
Your offset time is: 2024-09-20 15:26:05