Page 1 of 1

game coding needs work...

PostPosted: Mon Jun 15, 2009 5:16 am
by refresh
yo.. im creating a pong evolution game and cant make the "opponent" move.
im very far in this game and wouldent like to stop but pong is a little bit old and was wondering if people
would even like it.
iv'e tried that to anterior position thing. but still nothing.

Re: game coding needs work...

PostPosted: Mon Jun 15, 2009 5:51 am
by DST
There are lots of ways to do that.

A simple one is to use the moveto command with a bit of rand() inserted

Code: Select all
MoveTo("Event Actor", x, ball.y+(rand(40)-20), speed, "Game Center", "");


Triggered at intervals.

However, I'm sorry to say, that not many people play pong these days. Consider how much similiar yet way more fun Super Dodgeball was (and that was made in like, 1986!). Tons of tennis, volleyball, and dogeball games exist which are the same thing, but way more complex and way better looking.

You can still make pong. Just do something different and fun with it. Give the ball a tracer.

Create an actor called ball2 or whatever. Give it the same animation as ball. In its draw actor, write this:
Code: Select all
transp+=.02;
if(transp>.9){
DestroyActor("Event Actor");
}


Create an integer variable. Call it whatever.

Then on the main ball, in draw actor, put this:
Code: Select all
whatever++;
if(whatever==5){
CreateActor("ball2", "ball", "no parent", "no path", 0, 0, true);
whatever=0;
}



Now your ball leaves trails. Try making the ball explode sometimes. Or the ball changes from a ball to a snowball to a blob of gak. Or maybe the ball is a cute little animal that gets painfully bounced around (i. e. the puppy bouncing scene from Earthworm Jim). If you do something original and fun, people will play your game.

Re: game coding needs work...

PostPosted: Mon Jun 15, 2009 6:10 am
by Scorpion50o1
id go with what he said about making the ball turn to goop or a snow ball but could u have power ups like speed hit or fire ball!!it would be cool!! :mrgreen:

im making game graphics or pics if u want me to i could make u some.

Re: game coding needs work...

PostPosted: Tue Jun 16, 2009 12:00 am
by refresh
wow!! you guys have some nice idea's! if you keep em' coming ill try my best for the ultimate pong experience.and thanks DST. I'll try out some power ups!! ill post back when iv got some.


edit: i know its rong post but could you draw me some power-ups while i code my game?

Re: game coding needs work...

PostPosted: Wed Jun 17, 2009 2:17 pm
by refresh
Now i have a new problem.
i have a performance chalenge button where you have 3 points and you need to see how loang you can last BUT when a three points are gone the number says 000 and then the view gose back to main menu. what coding do i use.
Code: Select all
player_score.textnumber =000 MoveTo ("view",x-1200,y-300,("Game Center", "");
i tried this code but failed.

Re: game coding needs work...

PostPosted: Wed Jun 17, 2009 8:19 pm
by skydereign
If I get what you want, moving back to the main menu after three points, or is it the other way? Is that what happens or what you want? If it is, you need a conditional to test that.
Code: Select all
if(player_score.textNumber==0)
{
    MoveTo("view", x-1200, y-300, velocity, "Game Center", "");
}


You might want just to set the x and y, that way it is instantaneous. You could just increase the speed too... Anyway, make sure that textNumber has the capital N. The if checks if that is true, but always make sure if you are checking if two things are equal that you use two =s. Like shown above.