Possible to make a game similar to this, but using touch?

Comments

  • GappsoftGappsoft Member Posts: 22
    yes
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    The hardest part and the part in question is getting the sword to move realistically with your finger, I just can't figure out how to do that...
  • SnapFireStudiosSnapFireStudios Member Posts: 1,603
    Well, you'd need some fairly complex vector to angle and some other trig functions. But yes, it is possible.
    - Thomas
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    oh man, I have no idea what those are used for yet
  • drakee510drakee510 Member Posts: 49
    edited March 2013
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Seriously though, can anyone give me an example of attribute rules please?
  • WingmanappsWingmanapps Member Posts: 458
    Constrain mouse.self.position.x.y to lightsaber.self.position.x.y

    Constrain self.rotation to
    vectorToAngle(self.Motion.LinearVelocity.X,self.Motion.LinearVelocity.Y)

    That should do it - easy peasy lemon squeezy
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    This reminds me of a GameSalad game... oh what was it?
  • PBEmpirePBEmpire Member Posts: 676
    Use you IMAGINATION!
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Constrain mouse.self.position.x.y to lightsaber.self.position.x.y

    Constrain self.rotation to
    vectorToAngle(self.Motion.LinearVelocity.X,self.Motion.LinearVelocity.Y)

    That should do it - easy peasy lemon squeezy
    Thanks, and I'm thinking you could set random attributes for these rules if you want a computer opponent?
  • WingmanappsWingmanapps Member Posts: 458
    edited March 2013
    Constrain mouse.self.position.x.y to lightsaber.self.position.x.y

    Constrain self.rotation to
    vectorToAngle(self.Motion.LinearVelocity.X,self.Motion.LinearVelocity.Y)

    That should do it - easy peasy lemon squeezy
    Thanks, and I'm thinking you could set random attributes for these rules if you want a computer opponent?
    Well its not that simple - You're talking about creating AI.
    Doing the actual swinging is easy - but creating a AI very difficult

    There are some factors you need to concider.

    1. Distance from you lightsaber to the AI lightsaber = use magnitude monitor distance
    2. Then if distance is < Constrain self.rotation to
    vectorToAngle(self.Motion.LinearVelocity.X,self.Motion.LinearVelocity.Y*(swing speed)
    just a VERY simple example.

    But building Intelligence is thinking through and number of scenarios and then create rules the simulate them.

    Attack, defend, idle, etc, etc.
    Then one i just described would be attacking in a very simple format.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    edited March 2013
    Ok, and I followed your advice on how to make it "swing" and it moves left, right, up, down, but has no angular or swinging motion whatsoever. Why is this?
  • WingmanappsWingmanapps Member Posts: 458
    well using magnitude you can make it follow (chase) your finger.

    here's another thread about how to make an actor follow another actor
    http://forums.gamesalad.com/discussion/comment/374967/#Comment_374967
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    I know it is a little late to continue asking questions on how to do this, but after trying to do what was done in the video above, the actor still does not rotate at all. It just follows the x,y position of my mouse wherever I move it, but does not swing like a sword. Any help on how to extrapolate the info in the videos to follow my mouse, not another actor?
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    I have a rule under the sword actor that says
    every 0 seconds (not to completion), change attribute self.rotate to VectorToAngle(game.mouse.positionX-self.position.X, game.mouse.position.Y-self.Position.Y). What am I doing wrong? Specific rules would be greatly appreciated.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    http://www.aeonity.com/ab/games/simulation/jedi-trainer-light-saber.php

    I've tried everything-all the videos and followed peoples' advice. But my actor only moves side to side and up and down, and doesn't rotate or exhibit a swinging motion like the lightsaber in the game. Please help with specific attributes and rules if possible. Thanks ahead of time :)
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Bump...
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Merged the two similar discussions.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Here is a demo that might help.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Here is a demo that might help.
    Thanks so much for this ;)
  • lycettebroslycettebros Member, PRO Posts: 1,598
    way cool @RThurman
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @Zenith_Gameworks -- you are welcome! Hope it works for you.

    @lycettebros -- Glad you like it. With GameSalad its fun to figure out things like this.
Sign In or Register to comment.