A sidescrolling square character with square physics?

GugsGamesGugsGames Member Posts: 54
edited November -1 in Working with GS (Mac)
Hey there.

I'm still new with GS but have got my head around basic movements. However, I am wondering how I might create a Player Actor that is a square, but moves along the ground with similar physics/gravity to how an actual square would move. A bit like this:



But on a flat ground so it would sort of bobble and teeter and the movement would not be smooth. I guess in a similar way to the Cube in that Edge iphone game:



The key difference being that this would be sidescrolling, not 3D.

I suppose my key query surrounds how I would create that kind of physical movement/momentum for that actor. Then I can play with it/tweak the values.

Not sure if this is relevant, but the controls would be touch the right half of the screen to move the square right, and the left half to move it left. So quite simple.

Any guidance appreciated.

Comments

  • GugsGamesGugsGames Member Posts: 54
    Bumping in case anyone can help out.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Its really just a timing issue You can move a square back and forth and your can rotate the square at any speed you want. Your just gonna have to sit and play with the move speed and the rotate speed so they match up nicely.
  • GugsGamesGugsGames Member Posts: 54
    Thanks for your comment.

    Ah right, I see what you mean. For some reason I thought it would be a more complex process.

    I think my main concern was that the square would have something resembling decent physics and react to the ground it is travelling on, so that if you moved it so that it was teetering on one of its corners and leaning a bit to the right, if you stopped pressing right, it would continue with its own momentum until it landed flat. I guess that comes down to tweaking the velocity and things of that nature?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Well actually the physics in GameSalad are not bad so you may Actually be able to get a decent movement by just using rotate and making sure you have collisions set it the proper actors.
  • GugsGamesGugsGames Member Posts: 54
    Right, I see. I'll give that a go then and start playing with those values. Many thanks for the help!
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Well I just played with I for a little bit and its certainly not as easy as it seems. at least not with moving on a single flat platform. You've got me intrigued now. I may just have to work something out on this.
  • GugsGamesGugsGames Member Posts: 54
    Well, I'm glad I've got you intrigued, let me know if you find anything out! I will do similar.
  • GugsGamesGugsGames Member Posts: 54
    Just a thought, wouldn't this be very similar to a game where it is a circle/ball rolling left and right? Essentially that's the same principle, but instead of a ball, it's a square.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    sure but the problem is getting the square to overcome things like gravity while rolling since a ball is round it does not have to raise it self up to roll an move.
  • old_kipperold_kipper Member Posts: 1,420
    Its a very interesting problem. I thought about this and wondered. A few ideas came up.

    1).You could fake it with an offset animated by rules square that raised and lowered as a main round actor it was constrained to rolled. And dependant on the rotation you would have to increase and decrease the friction.

    2). you might be able to fix tiny objects on the floor and adjust the gravity to different directions to draw the square on, and the square would catch on the small objects and allow it to turn over.

    3). the bike version above could be faked with a flat surface the was higher than the visual bumped floor, and the square would be attached to a round wheel and rotate with it but overhang the real floor.

    4). none of the above.... but just play around with friction and squares and see what happens. I would try high friction, low density and accelerometer gravity in this case, but I am not sure what might be achievable.

    I do remember in I think 'Carry on Cleo' that an ancient Briton inventing a bike with square wheels to avoid having disasters going down hills.

    good luck.

    kipper
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    You could do with an invisible circle and constrain an image of a square to it?

    ---
    Get Honey Tribe on iTunes
    "...a touch above the rest in the endless running genre" 148apps.com
    "If you’re a nature lover, or simply a lover of well-executed games, Honey Tribe... is worth checking out. Download it today." AppAdvice.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
Sign In or Register to comment.