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 game

Author
Message
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 28th Aug 2005 05:53 Edited at: 28th Aug 2005 05:57
Hey! After being in the DB community for about a week, I have succesfully made my first game. True, it is a pong clone, and it isn't quite finished, but I want to know what you think of it and how I could improve it.

It can be downloaded at
http://www.geocities.com/rennekon/ping.zip

(Note: When you get to 10 points you go up a lvl)

"I will work harder... if you ask me enough times."
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 28th Aug 2005 19:51
Good for your first game. Couple of tips - firstly, the initial launch angle needs to be set so that the ball can't move almost vertically, and take an age to get across the court! Secondly, for a game like this where you don't really need any media, present your code within c0de /c0de tags, like this:



so that firstly, people can look at your code and help you to improve upon it, and secondly, so that people who are lazy like me, are more likely to try it out rather than download a 4meg file.

Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 28th Aug 2005 22:21
Thanks Ric! You're the first post after a night and half a day!

Ok, here's the code.


The AI's a little flaky, but I'm not sure how to fix it up or the starting angle. If you have a suggestion, go ahead and tell me.

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 29th Aug 2005 03:54
(bump)(nudge)

"I will work harder... if you ask me enough times."
Colonel Cool
19
Years of Service
User Offline
Joined: 3rd Aug 2005
Location: Somewhere
Posted: 29th Aug 2005 22:27
Ping that's my pong clone's name.

Formerly Ogre Software
My Current Project: Mystic I: Quest of A Lifetime
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 29th Aug 2005 22:46
I thought of using that... darn... I'll have to switch to Gnip or something.

"I will work harder... if you ask me enough times."
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 29th Aug 2005 23:41


Sorted out the angle problem for you. Also added a bit of lighting, made the ball a bit rounder and shinier, and changed the randomize command to 'randomize timer()', which will set a new random seed each time you run the program.

The Cage Complex
19
Years of Service
User Offline
Joined: 26th Aug 2005
Location: Reims, France.
Posted: 30th Aug 2005 00:50
Funny !

Here is small modifications :

1) Camera movement intro
2) "Get Ready !" pause between balls
3) Effect : ball angle calculated from impact point

Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 30th Aug 2005 02:23
Thanks! I wanted to use the randomize timer command, but it didn't seem to work. Now it works, weird.

Thanks for the angle fix. I was thinking about it right before I read your post and then BAM!! it was already done. Thanks again for all your help!

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 30th Aug 2005 03:54
Hey, what kind of music goes with a pong game. I've been looking for some, but nothing really seems to fit.

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 31st Aug 2005 04:50 Edited at: 31st Aug 2005 12:59
Ok, I've been trying to add a menu to the game, but the code just crashes and ends without an explanation. I'll paste it up here. I'd appreciate the help.



"I will work harder... if you ask me enough times."

Attachments

Login to view attachments
Fox Dark Master
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Portugal
Posted: 31st Aug 2005 12:59 Edited at: 31st Aug 2005 13:00
Ive made an tutorial for a menu:
http://www.ideiasinc.net/forum/viewtopic.php?t=331
but instead of the Option1, etc... create an array for that


True Phantasy
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 31st Aug 2005 13:07 Edited at: 31st Aug 2005 13:12
Why would creating an array do any good? Wouldn't I just need mouse position and click commands to select?

Also, how could I do a camera intro? Would it be programmed or an avi of some sort? (your source doesn't work)

"I will work harder... if you ask me enough times."
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 31st Aug 2005 13:31
Here are 3 buttons I created.

I wanted to make more, but I had to eat...


Immunity and Annihalation makes Immunihalation...
Fox Dark Master
20
Years of Service
User Offline
Joined: 20th Jul 2004
Location: Portugal
Posted: 31st Aug 2005 13:32
doesn't work? what part? it had work with me


True Phantasy
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 31st Aug 2005 22:23
Fox Dark Master:
The source button doesn't work, it says there's an invalid ID.

Sven B:
Thanks for the buttons, now how do I use them?

"I will work harder... if you ask me enough times."
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 1st Sep 2005 02:54 Edited at: 1st Sep 2005 03:05
Programmer of Power heres Sven B's buttons implemented into your pong program, i think...

This is sloppy and poorly written of me, but I'm new to this code, used it for a month or so a long time ago, but cudn't figure out how to do anything, and I just restarted using it. The exit button may or may not work, but that all i found wrong with it, Sven B's buttons are really helpful ,and I think I may just snatch that code to use in my programs Good luck, i hope i helped, yet somehow i doubt it...


EDIT:
Oh, and you could probably sidestep having to hide, and then show all objects with a different command, like uh, CLS? lol here, this works:

oh, and by the way, if anyone could explain how to make it go back to the menu if you press escape during gameplay, that might be beneficial to many of us


EDIT... AGAIN!!! :
Oh, good job on this by the way, and a suggestion or two I have:

1. for the AI, perhaps if you want to, you could make the enemy move up and down if the ball is above him or below him, as opposed to being above the halfway point between the walls in the game...
but to make it not so hard, you could say sumthing like:

if ball is above player2 + 1
player2pos = player2 pos + player2speed
endif
if ball is below player 2 - 1
player2pos = player2 pos - player2speed
endif

that way, it will wait till the ball is a little above it before making an attempt to reach it, as opposed to just going up and down with the ball... you could try it if you want...

A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/
Colonel Cool
19
Years of Service
User Offline
Joined: 3rd Aug 2005
Location: Somewhere
Posted: 1st Sep 2005 03:48
You can have Ping, I just used it for a tutorial. Nice work on your first game.

Formerly Ogre Software
My Current Project: Mystic I: Quest of A Lifetime
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 1st Sep 2005 03:54 Edited at: 1st Sep 2005 04:24
Thanks Shadowed Lightning, that button placing code really helped. As for the AI thing, I'll try that, it's a good idea.

Eventually I want to add some breakout blocks in the middle of certain levels for the ball to bounce off of and maybe (hoping a lot) I can add some powerups and stuff. Any idea how to go about that?

edit: Thanks some guy, but the name's going to be Pin-Go

edit: I seem to be having some problems with the paddles on "Boss levels" (every fifth level) The paddle is bigger on these levels and seems to go through the walls. What can I do to fix this.

"I will work harder... if you ask me enough times."
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 1st Sep 2005 05:19 Edited at: 1st Sep 2005 05:27
Whats happening is your collision code is set to this:

say the paddle is 4 units long, and the playing field is 12 units, so the midpoint of the playing field is 6

ok, so your code says that if the paddle goes too high, stop it, well, that is based on your paddle being 4 units, so on boss levels, collision for the paddle will have to cahnge from 4 units to, however big the boss paddle is, for example:
(if say, you original paddle size is 1, but your boss paddle size is 2 then this would have to be



because the paddle is now 1 unit larger, you have to account for the extra 1 half of a unit on each side of the paddle, so then, the edge of your paddle will still sotp at the wall, but you will have to make this change only on boss levels, so use a variable or sumthing, lol

EDIT: sorry if that is hard to understand, im not good at explaining ...

and for the breakout blocks and the powerups... (ive never done this but ill give it a whirl:

for the break out blocks:

say you want level 10 to be a breakout block level, so you say:

if currentlevel# = 10
breakout()
endif
...
function breakout()
make object box 7,1,1,3 rem this makes box 1 unit by one unit by 3 units long on z axis)
position object 7,4,0,rnd(7)-3.5 rem this positions the box anywhere in the middle of the playing field from the top wall to the bottom wall)
end function

now, you will also have to place collision for the breakout block and the ball, but it will be the same as your 2 paddles, just on both sides of it, and you can make the ball bounce off of it back towards where it came from or at the opposite angle by playing with your balla# variable
thats all ive got on that one, i hope it helps, and as for power ups...

ill have to get back to you on that one, g2g

A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 1st Sep 2005 12:59
Wow! Lot's of info on that one! Thankyou shadowed lightning.
Ok, I fixed the boss level problem, but it's giving me an error that says the nest isn't closed at line 263, which is the last line of the program. What does that mean?

"I will work harder... if you ask me enough times."
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 1st Sep 2005 17:25
It means that you forgot an 'endif' or 'loop' or 'endwhile' or 'until' or 'next'...

Immunity and Annihalation makes Immunihalation...
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 1st Sep 2005 22:21
Oops, found it. Here's the most recent code: It doesn't work because it says that there's already an item existing on line 199, but I don't think so. Any help?


"I will work harder... if you ask me enough times."
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 2nd Sep 2005 00:29
well there is a series of problems with this code, i am going to work on it throughout today, but im going to have to learn every little detail of ur program to see how to fix it, so it might not be till tonight or tomorrow morn that i post it up, k?

A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 2nd Sep 2005 04:46
That's fine, I'm searching though it also and trying to fix any problems. Tell me when you get it fixed!

"I will work harder... if you ask me enough times."
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 3rd Sep 2005 01:31
i can't figure itout lol, i have to start dvoting more time to school now, sorry, ill keep trying though

A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 7th Sep 2005 22:29
I tried putting some () around that part of the code to see if it was messing up the order of operations but that didn't seem to fix anything. At least the game loaded up this time.

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 8th Sep 2005 22:31 Edited at: 9th Sep 2005 13:09
Ok, I made a bunch of progress. I figured out what was wrong with the "Object Already Exists" error and fixed that, then set up some collision for the ball and blocks, but now the game starts, and the ball doesn't move! Gug.

Here's the latest code... do you see a problem?


Edit: Oh, and how do I make the exit button work?

"I will work harder... if you ask me enough times."
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Sep 2005 23:17
Try using 'end' instead of 'exit' or a gosub to an ending screen.

I'm not getting you down am I, Ho Look! another fancy Door?
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 9th Sep 2005 13:08
Thankyou HowDO, I was able to fix the exit button because of you. Still having problems with the ball movement though.

Note: The code in the last post has been updated

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 13th Sep 2005 13:17
I really can't figure this out. I've been eliminating parts of code that aren't the problem, but nothing's turned up so far. All the source is in the source thing.

I was able to get the blocks to show up, so I thought that might be the problem, but remming that code along with its affiliates didn't seem to help.

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 15th Sep 2005 00:11
Alleuia! It works. And the AI's vastly improved. I just have to figure out some bugs with the Blocks and... and... and... !!!!

I'm very excited right now! Try out the new game! (check the source)

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 16th Sep 2005 00:22
(looking for opinions and comments)

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 18th Sep 2005 22:10
Quick update on the game. I've attempted to add a bunch of new things like fixing the bouncing for the blocks and adding various powerups but nothing's seemed to change. Can you take a look and see if you can figure out what's wrong?



"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 23rd Sep 2005 23:08
So how do you like the new game?

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 26th Sep 2005 22:51
Almost 500 views but still no replies...

"I will work harder... if you ask me enough times."
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 28th Sep 2005 09:02
People will probably more likely test it if you just compile it yourself and upload a .zip.
Deep Thought 42
19
Years of Service
User Offline
Joined: 31st Jul 2005
Location: New Jersey, USA
Posted: 28th Sep 2005 22:13
Looks good and the game works fine. The score is sort of hard to see agianst a blue background though. I'm more used to the player's paddle being on the left too, but that's ok.

"Winners never quit and quitters never win. But those who never win and never quit are idiots."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 28th Sep 2005 22:40
Thank you people! I compiled it at first but then was told just to put the code up. I can do both if that is wanted. Can you figure our what's wrong with the powerup and block deletion code?

"I will work harder... if you ask me enough times."
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Sep 2005 01:14
Quote: "Ping that's my pong clone's name.
"

sorry, beat you to it ages ago...
http://forum.thegamecreators.com/?m=forum_view&t=34569&b=2



"We make the worst games in the universe."

Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 30th Sep 2005 03:32
Mine's called Pin-Go. No relation whatsoever .

"I will work harder... if you ask me enough times."
Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 3rd Oct 2005 04:46
Anyway, what can I do to improve it.

"I will work harder... if you ask me enough times."
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 3rd Oct 2005 20:32
Quote: "Mine's called Pin-Go. No relation whatsoever "

yeah, wasn't talking to you if you notice the quote

Quote: "Anyway, what can I do to improve it."

(assuming it's bug free) whatever you want!

"We make the worst games in the universe."

Programmer of Power
19
Years of Service
User Offline
Joined: 22nd Aug 2005
Location: Home
Posted: 4th Oct 2005 02:37
Do you have any suggestions?

"I will work harder... if you ask me enough times."

Login to post a reply

Server time is: 2024-11-13 21:23:43
Your offset time is: 2024-11-13 21:23:43