Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SDK question(s)
#31
So if you get a chance - I would be interested in seeing the code you're using for the Heli to move up/down with leaning. I have kludged something together but I would like to compare notes if you don't mind Smile
Reply
#32
I can't make a simple compilable example right now, but we essentially have

Code:
override void Update()
   {
      ...
      // Adjust forward speed
      float bend = Mathf.Clamp01(Controller.HeadBend / 0.2f);
      SpeedFudge = mOriginalSpeedFudge * Mathf.Lerp(0.66f, 1, bend);
   }

   override void FixedUpdate()
   {
      ...
      // Lean forward to bleed lift and increase falling speed limit
      force.y *= 1 - bend;
      MaxVertSpeed = Mathf.Lerp(4.5f, 9, bend);
   }

Hope that helps! We do other things in real code like smooth the bend value (see Mathf.SmoothDamp), use B button when tilt steering, and tilt the heli model down more when bending, but those are secondary.
Reply
#33
That'll work. Thanks!
Reply
#34
OK - I have one more avatar question. I am curious how you handle the Cowboy avatar going sideways without going off the edges. I assume you are using colliders of some sort on the sides, but wondering how you handle the motion (I assume you are not just letting the physics engine handle it because it's more of a "smooth" bump than it seem like you get with standard box colliders... Are you using a trigger and simply limiting the horizontal position? Guess I'll try that... Smile
Reply
#35
Ohhhhh, I bet you're clamping it aren't you Smile
Reply
#36
Hi Stain I don't have time to look into this in detail now, but believe since Jailbreak goes in a straight line we just clamp its position rather than rely on colliders like you said. Note it's the only game where we set VZPlayer.AllowRotate to false, so your steering just affects the horse's velocity and your forward-facing direction always remains the same.
Reply
#37
Thanks! that's pretty much what I figured.
Reply
#38
I'm not sure if you can answer this since it goes more to level design but I'd appreciate any pointers. I'm curious about how you spawn the bandit enemies in the cowboy game.... I'm not looking for code, but more of a general idea of how it is handled, just trying to get some insight into game design tricks as all my programming experience is more business-oriented Smile

For example, I'm wondering if the round length is time-based, or is it a certain distance travelled, etc?

Do you spawn the bandits into existence behind/relative to the player position, or does the player cross a trigger which spawns them from a fixed point? And am I correct that the bandits get slightly faster each round?
Reply
#39
The Jailbreak round levels are time-based. Since you are meant to lasso the bandits and not race them, they always run faster to keep a minimum distance ahead of you, so rounds can't be distance based. Each wave of bandits spawn behind the player and run ahead. The speed and behavior of each bandit is based on its horse color. Whites are the fastest, black ones move side-to-side, tan ones leave droppings, etc. We generally put more and harder bandits into new levels, but occasionally drop back for relief. We also drop back if you can't progress from current wave after 3 tries, to calibrate to your workout ability.

Glad you're finding game programming fun, it touches on a lot of disciplines. Designing games that make you perform interval pedaling while distracting your mind from pedaling is our unique challenge!
Reply
#40
Here are some other resources for you

Jesse Schell's The Art of Game Design is a good read about how to approach making games. It doesn't contain a lot of technique though.

Game Programming Gems 1 & 2 go into very detailed technique, but is mostly engine level stuff that Unity and plugins can take care of now.

Gamasutra.com is read and contributed to by a lot of game devs.

Gdcvault.com is a repository of GDC conference decks, though most of them are behind subscription wall.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)