PDA

View Full Version : Putt Putt Golf


GreenLantern
01-28-2004, 12:02 AM
I am going to start my first game soon. I have decided on a simple putt putt golf game. I have a basic plan right now as to how to do it, but I plan on adding features later on.

I would like to get some feedback/comments/ideas, about what you guys think about this.

Marz
01-28-2004, 01:49 AM
Your first game as a putt putt game...

I admire your corage... But I'd suggest a smaller project...

Putt Putt Golf sounds easy at first... But when you think about all the trig ratios you have to do and the amount of advanced physics that you put into it... It becomes alot harder...

If you are still going for it.. I might be able to give you some pointers here and there though :)

GreenLantern
01-28-2004, 02:27 AM
I don't plan on have alot of advanced phsyics.

Here is my general idea:
1. The farther the ball goes the slower it gets.
2. If the ball it's a wall bounce off at the angle that it hit the wall at.
3. If a ball it's a wall lose a little speed.
4. If the ball hits the hole, and is going slow enough drop in.
5. If the ball hits the hole, and is going to fast, bounce up and slow down.

Sounds easy enough don't you think?

Marz
01-28-2004, 02:28 AM
Well... The hitting of the wall thing is just going to piss people off... And you have to make it challenging by adding height and all that fun stuff :)

GreenLantern
01-28-2004, 04:37 AM
What do you mean hitting the wall thing? It would be just like other putt putt games?

I will have height and everything eventually, but for now i'm just going to start out with a few holes that are basically flat.

GreenLantern
01-28-2004, 12:25 PM
Ok i'm completely stumped. I have the basics of my putt putt game rocking rolling, but how do I get the ball to bounce off the border?

I just can't even begin to think how to do it.

Elbudster
01-28-2004, 04:30 PM
you could probably use something like the pongs bouncing... heres an example...


onClipEvent (load) {
_root.xmove = 5;
_root.ymove = 5;
}
onClipEvent (enterFrame) {
if (this, hitTest(_root.topwall)) {
_root.ymove *= -1;
}
if (this, hitTest(_root.leftwall)) {
_root.xmove *= -1;
}
if (this, hitTest(_root.rightwall)) {
_root.xmove *= -1;
}
this._x += _root.xmove;
this._y += _root.ymove;
}


Maybe? (-:

GreenLantern
01-28-2004, 10:44 PM
Actually that's exactly what i'm doing right now. The thing I am worried about is weather or not that will be a flexible enough solution to allow for multiple holes. Setting up a hitTest block for each hole would kind of be tedious.

junahu
01-29-2004, 05:49 AM
You could put multiple holes in a movieclip and have something like this in the ball's actions (before the part where you move them, so probably near the beginning)

if(_root.holes.hitTest(_x + xmove,_y + ymove,true) and speed <= 15)
{
_x += xmove
_y += ymove
//your code here
}

GreenLantern
01-29-2004, 06:28 AM
I'm not following you here. What does that do?

junahu
01-29-2004, 08:22 AM
It checks whether the ball's next x y position is touching the movieclip "holes" (it checks by shape rather than by bounding box) AND that the speed (assuming that you used speed to calculate xmove and ymove values) is less than 15 (i.e. if it's moving too fast it'll just fly right over the hole).

Does that help any?

GreenLantern
01-29-2004, 10:57 PM
Yes it does! Thank you very much.

How does checking by the shape vs. checking by the bounding box work? I guess I have always thought you could only use the bounding box method.

SeiferTim
01-30-2004, 01:01 PM
If my memory serves me correctly, it would allow you to have 2 objects techically overlap with bounding-boxes, but if unless the pictures actually touch, it won't be considered a "HIT"... imagine 2 transparent images, with a circle in the center, with the Bounding-box method, if they bump corners, it's a HIT, even though it would look like they stop just before actually touching, whereas if you use shape, it won't be considered a HIT until the actual balls touch, essentially ignoring any HITs that take place with a transparent color.... I hope I explained it well enough, I don't have access to pictures here, while at work...

Marz
01-30-2004, 04:39 PM
The difference between shape and bounding box is this..

Bounding box.. with the two circle objects... If you drew a tight box around a circle... You coule hit anywhere in the box and still access a hittest...

Shape is this.. You take a pixel from the one object... And if that one pixel (tsay the center of the object) matches with any of the real object.. (like the real circle and not th box) it'll account as a hitTest...

the only bad part is.. it's only testing a single pixel... And that's it.. Not the full object :)

SeiferTim
01-30-2004, 04:56 PM
Ah. Thanks for the clarification. It's been awhile since I've done any HitTesting at all. I was a little off... :D

P.S. : I guess I have to make a new footer... it's on the way... not sure how it got taken down, since I thought I was in the guidelines, and hadn't made any changes to it for several months... so for right now, you have to look at the ugly "Does not meet guidelines" message! :P

junahu
02-02-2004, 05:51 AM
Better than my footers...:(

GreenLantern
02-02-2004, 06:01 AM
I think i'm going to go freelance making footers for people.

Anybody want a footer, they are cheap.

junahu
02-02-2004, 06:28 AM
I like my money better than footers so sadly, no. Good luck on your wacky buisness venture though.

SeiferTim
02-02-2004, 01:27 PM
That would make a catchy slogan: "Custom Flash Footers: We're Wacky!"

GreenLantern
02-02-2004, 01:59 PM
hmmm I am seriously thinking about this....

Do you think it would fly?

Hell I would do it for free, as long as I get a little RMB logo in the corner or something

Marz
02-02-2004, 10:47 PM
Umm... If you did it for free.. Yes.. But if not.. Then no.. Footers are practically useless :)

GreenLantern
02-02-2004, 10:55 PM
Ok, i'm going for it.

Watch for the post in random.

GreenLantern
02-02-2004, 10:57 PM
On second thought (as i was writing the post) this is probably not a good idea. I don't have the time nor the patience to deal with that kind of hassle.

junahu
02-03-2004, 07:49 AM
Shortest business venture ever

GreenLantern
02-03-2004, 10:10 AM
2 minutes.

That lasted longer than a dot.com?