User Tag List

Results 1 to 2 of 2

Thread: Defender Movement, suggestions?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2006
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Defender Movement, suggestions?

    Im working on a 'DEfender' type game with a rather simple movement style.

    However, my 'simple' movement has me stuck.

    I want the player to be able to hold the opposite direction of the character movement, slow down, and when thier speed hits 0, change to the opposite direction.

    My hang-up is when the players speed hits 0 and changes direction, I have a 'turning' animation and then a ship wobble.

    My question is, what would the 'pros' out there do to handle this movement type?

    Static onject?, bouncing ball?
    And how can I have it so the player does not need to let go of the direction key and press it again to actually get the ship to turn around?

    Any suggestions?

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,062
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Defender Movement, suggestions?

    this could be done so many ways its not funny.

    a quick idea: (providing the ship never went faster than 8 pixels)

    set static. value(ship speed) = we'll call this VSS.

    *movement*
    repeat while keydown right & VSS < 8 then VSS=VSS+1
    repeat while keydown left & VSS >-8 then VSS=VSS-1
    (could add to these - & every 4" to slow acceleration etc)

    *directions*
    if VSS <0 then set dir ship(left)
    if VSS >0 then set dir ship(right)

    *turning*
    if VSS=0 & leftkey down then animate turn left
    if VSS=0 & rightkey down then animate turn right
    (& add [negate]turning animation is playing to each)

    *positioning*
    always set ships( to ships( + VSS
    or
    every 4" set ships( to ships( + VSS
    (or every 6" etc to slow it more)

    could also add:
    every 30" & VSS >1 then VSS=VSS-1
    every 30" & VSS <-1 then VSS=VSS+1
    ***for eventual slowdown to nearly stopped (use 0 for stop)

Similar Threads

  1. Invader Defender
    By turtle in forum Android Released Games & Apps
    Replies: 4
    Last Post: 2nd July 2013, 01:02 AM
  2. Invader Defender
    By turtle in forum Released Games & Apps in Flash
    Replies: 0
    Last Post: 19th June 2013, 07:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •