playMaker

Author Topic: Question about "running" games [SOLVED]  (Read 3352 times)

cdillard

  • Playmaker Newbie
  • *
  • Posts: 18
Question about "running" games [SOLVED]
« on: December 09, 2012, 12:34:46 PM »
I have some questions about those running games like Temple Run and Agent Dash.

I would imagine that the running is simply animation with constant force in the direction you want to run. To make it not able to deviate off a given trajectory, you just dont include the ability to turn, correct?

Also, as far as the collectables that are used to purchase things, how is this done? Is it using some time of central server in order to keep track of how many you hate or is it kept client side? I'm trying to implement something similar as well as in game purchase items and I have no idea where to start for these types of things.
« Last Edit: December 19, 2012, 02:51:51 PM by cdillard »

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Question about "running" games
« Reply #1 on: December 10, 2012, 03:50:49 PM »
The runners... You might have a point with the constant force, but it's not necessarily the case. That is, if your game relies in physics, perhaps the force thing is the best solution. If not, it might be only a matter of translating your player's GameObject. You can try moving a Character Controller with a static vector, instead of getting it from input axis.

Now, for the pickups, it depends on the way you want to have it work. If those pickups are currency to buy things in your game, you just need to update a money counter each time a pickup is hit. If it's a power-up, you can activate the effect when collider is hit. Ah, those should probably work better with trigger colliders. Those might not be necessarily in a server. The server thing is a decision you have to do, depending on your needs.

For the In-App Purchases, you should have a look at Apple's documentation. Since you might not implement Apple's IAP, it'd give you enough information to get started.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Question about "running" games
« Reply #2 on: December 11, 2012, 04:55:13 AM »
Hi,

 You should first concentrate on your game, and then tackle the IAP, as the IAP is something very specific and will vary from platform to platform.

 Have you looked at the M2H examples I ported to Playmaker, most of them have some pickups along the way:
https://hutonggames.fogbugz.com/default.asp?W880

Check out "Egg Catcher" and "marble game" they do have some checkpoints and pickups.

bye,

 Jean

cdillard

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Question about "running" games
« Reply #3 on: December 14, 2012, 10:20:44 PM »
First of all, thanks for the suggestions and input. I have went with the Controller Simple Move as per your suggestion. Now I have another question if you would be so kind...

Along with this constant moving aspect, I want to be able to have an animated turning which will be exactly 90 degrees every time. Should I use iTween and Move To some point on the other side and facing the correct direction to ease the movement in or is there a better way to do that?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Question about "running" games
« Reply #4 on: December 17, 2012, 05:39:20 PM »
Hi,

 Use move to, iTween could do the job but you may find it more constraining.

bye,

 Jean

cdillard

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Question about "running" games
« Reply #5 on: December 18, 2012, 11:53:25 PM »
Thanks for the input. I'd like to do it with some sort of guides though and I don't know if I can do that with only Move Towards. My problem is that I want the 90 degree turn to happen smoothly. When I use the included setup, the turn is relatively smooth, however, the look at doesn't seem to be working. instead of looking straight down the street, it looks across the second crosswalk. Any ideas?

I have included a screenshot to better illustrate. The colors show what is what in regards to Scene window vs Variables.

cdillard

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Question about "running" games
« Reply #6 on: December 19, 2012, 02:51:20 PM »
Ok. Forget it. I did it a different way.