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.Ok, i'm going for it.
Watch for the post in random.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 :)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! :PIf 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...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 :)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 somethingBetter than my footers...:(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.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 :)Umm... If you did it for free.. Yes.. But if not.. Then no.. Footers are practically useless :)2 minutes.
That lasted longer than a dot.com?Shortest business venture everI like my money better than footers so sadly, no. Good luck on your wacky buisness venture though.I'm not following you here. What does that do?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.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? (-: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.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?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.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.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?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
}That would make a catchy slogan: "Custom Flash Footers: We're Wacky!"I think i'm going to go freelance making footers for people.
Anybody want a footer, they are cheap.#If you have any other info about this subject , Please add it free.# |
|
March 12th, 2010, posted by wktd
hznq.com edit