Jezzball-like interface
Hi all,
I'm working on a game that has similar gameplay to jezzball, see the link for those who don't remember
http://onemorelevel.com/game/jezzball
Now my game will work a little differently, instead of clearing off chunks of the map, I want to make it so if they are trapped in a box lets say with the surface area of 50px, then the ball explodes, or dies, or you get points or whatever.
right now I have a guy running around that shoots(spawns) rays perpendicular to him and i have it set up so they get destroyed and then spawn a barrier. (side question, is this too much spawning and destroying should I recycle?)
And I can successfully trap a ball, but I don't know how to acknowledge the square it's in is small enough to destroy the ball/give points.
I thought of having the 'barrier' actor spawn another actor at a certain size, and when 4 of them touch the ball, then have the ball destroyed. So... 'if barrier spawn collides with actor>ball> change attrib> touch +1'
But I did tests and it seems if there are more than one instances of the same actor touch the ball it doesn't keep adding.
Okay I hope that was coherent, thank you all in advance!
I'm working on a game that has similar gameplay to jezzball, see the link for those who don't remember
http://onemorelevel.com/game/jezzball
Now my game will work a little differently, instead of clearing off chunks of the map, I want to make it so if they are trapped in a box lets say with the surface area of 50px, then the ball explodes, or dies, or you get points or whatever.
right now I have a guy running around that shoots(spawns) rays perpendicular to him and i have it set up so they get destroyed and then spawn a barrier. (side question, is this too much spawning and destroying should I recycle?)
And I can successfully trap a ball, but I don't know how to acknowledge the square it's in is small enough to destroy the ball/give points.
I thought of having the 'barrier' actor spawn another actor at a certain size, and when 4 of them touch the ball, then have the ball destroyed. So... 'if barrier spawn collides with actor>ball> change attrib> touch +1'
But I did tests and it seems if there are more than one instances of the same actor touch the ball it doesn't keep adding.
Okay I hope that was coherent, thank you all in advance!
Best Answer
-
tatiang Posts: 11,949
I had an idea... what about making a few "bullets" discover the barriers' locations? You would spawn the range finder actor from a ball, most likely.
See the attached demo.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
that's a possible solution, I'm just afraid it might bounce around vertically for like 45 seconds before bouncing horizontally, and the user will be sitting there like
"hey I won already hurry up!"
Seems like there is a little room for weird stuff to happen that way.
That being said, it's better than any solution I've yet to come up with!
Edit: so I think you might be able to do it by looking at the x value of the ball and figuring out which barriers are closest to it (you'd have to add barrier x values to a writeable table as they are added to the scene) and then figuring out the distance between them.
Not sure if I have time to do all of that, but perhaps it can lead you in the right direction!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
any opinions on the amount of spawns/destroys I'm using?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I'm doing something a little different now, which might work better in my game(might), just because of the way it's setup.
basically I have 4 actors, sticking out of the ball all 20px long, one each direction. When they collide with a barrier, it triggers a boolean. When all 4 booleans are checked, then the magic happens.
Thanks! I would not have came up with this if it wasn't for our brainstorming session we had here!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User