Experts Needed - boat game but need answers
debugdesign
Member Posts: 886
Hello!
This is a VERY early build of a game I am working on.
http://gamesalad.com/game/play/39868
Please could you help with a few queries...
1. How do I stop the boat from being able to go backward?
2. In order to have a boat AND a gunner the gunner is the main actor and the boat in a constrained actor underneath it. But when the boats move forward the animation stutters as the boat is 0.01 behind all the time so ts not very smooth
3. When the boat goes over a jump the shadow actor is spawned but it would be great to move to a position (whilst still constrained) to give the impression of a real shadow.
Any help is appreciated.
Thanks
Ian
This is a VERY early build of a game I am working on.
http://gamesalad.com/game/play/39868
Please could you help with a few queries...
1. How do I stop the boat from being able to go backward?
2. In order to have a boat AND a gunner the gunner is the main actor and the boat in a constrained actor underneath it. But when the boats move forward the animation stutters as the boat is 0.01 behind all the time so ts not very smooth
3. When the boat goes over a jump the shadow actor is spawned but it would be great to move to a position (whilst still constrained) to give the impression of a real shadow.
Any help is appreciated.
Thanks
Ian
Comments
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
a) In your "Move Me Around" actor, remove the rule for when the "down arrow" key is pressed to remove the ability of the keyboard to move the boat backwards.
b) For the backwards movement in your on-screen joystick: In your green "stick" actor, where you see the "Constrain" behavior for the "game.DistanceFromCenter" attribute, change it from:
`vectorToAngle( self.Position.X - game.BaseX ,self.Position.Y - game.BaseY )`
to:
`vectorToAngle( self.Position.X - game.BaseX ,max(57, self.Position.Y )- game.BaseY )`
(be sure to use the expression editor to make the change. The "57" just happens to be the self.Position.Y of the green "stick" actor instance (not prototype). It would probably be wise to make that into a game level attribute and use it in the expression above in place of the "57" and also add some initialization code to the green "stick" actor prototype to use the value in setting the self.Position.Y value of itself (so you set it in only one place)
I made those two changes and I could no longer go backwards with either the keyboard or the on-screen joystick but I did keep chugging along forward at the slow default idle pace that was set.
What a run-on sentence the first sentence was, eh!?
You will want to do the same thing with the "cop-gun1" actor.
When I did this, they were both smooth as silk.
"Constrain" does not need to be used in a timer. Think of it as "always" on (unless you put it in a rule...but I would still want to test that out).
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Or make them rubber rafts and really crank the restitution up! ;-)
Oh, and one more thing, in your orange "Projectile" actor, if you could add a rule around the "Move" behavior for it that if facing forward, use a faster "speed" setting in "Move" than when facing backwards. This would make your bullet speed a little more consistent since it appears to slow down quite a bit on forward facing shots. You will probably need to base the decision on a range or rotation values or something.
Thank you for your help on this...
1. Moving backwards - I have made the changes and on the whole it works
- there is an issue that if you pull left diagonal down you still go back.
(i left the keyboard down action on for testing)
2. That timer thing was brilliant, as this will help with LOADS of things
I have updated the file...