Experts Needed - boat game but need answers

debugdesigndebugdesign Member Posts: 886
edited November -1 in Working with GS (Mac)
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

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    I really hope someone helps you out, cos that game just looks like it's MADE of awesome! :)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • quantumsheepquantumsheep Member Posts: 8,188
    I find that I BUMP into the walls a lot on this game ;)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • rebumprebump Member Posts: 1,058
    For #1 on your list, do these two things:

    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.
  • rebumprebump Member Posts: 1,058
    Observation: Since the player boat will slowly move forward at a slow default idle pace, if the player boat gets hung up on a wall, it bounces (i.e. the restitution setting of the player boat and side wall) but the player boat gets wedged against the side wall if enemy boats are nearby. Maybe have them sense the "bouncy" movement of the player boat and if so, move around a bit randomly (or away from the player boat) to allow the player to escape?

    What a run-on sentence the first sentence was, eh!?
  • rebumprebump Member Posts: 1,058
    For #2 on your list: In your "Move Me Around" actor, you need to remove the timer (and its contents) near the top that runs every 0.01 seconds. The contents were setting the "game.PlayerX" and "game.PlayerY" attributes to those of the "Move Me Around" actor position using "Change Attribute". After you delete all that, add at the root level of the "Move Me Around" actor two "Constrain" behaviors. One that constrains "game.PlayerX" to "self.Position.X" and another constrains for the corresponding Y attributes.

    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).
  • rebumprebump Member Posts: 1,058
    For #3 on your list: Since the player boat over the jump initiates the change in the player boat (its size and I think position) and also spawns the shadow, maybe upon shadow spawn, for the first few moments in time, have it grow in size a tad while also moving up and to the right? Seems simple to describe but maybe it is harder to actually implement.
  • quantumsheepquantumsheep Member Posts: 8,188
    @rebump - you're brilliant :)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • rebumprebump Member Posts: 1,058
    If you make those changes in regards to #2, be aware that the boats will still jitter when they are bumping against each other or the side walls so you may want to play with all their "restitution" attributes a bit to fine tune it. I think you need some bumping since they are boats but maybe scale it down a bit.

    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.
  • debugdesigndebugdesign Member Posts: 886
    Hi Rebump,

    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...
Sign In or Register to comment.