playMaker

Author Topic: MARA - 2.5d platformer - WIP  (Read 53201 times)

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #75 on: October 01, 2014, 01:17:49 AM »
Thanks Graham! Here is an illustration a friend has done to be used as promotional art!


Graham

  • Sr. Member
  • ****
  • Posts: 332
  • I Love Playmaker!
    • Portfolio
Re: MARA - 2.5d platformer - WIP
« Reply #76 on: October 01, 2014, 08:06:27 AM »
That's beautiful! Does your friend have a deviantart or portfolio?
More templates on the Unity Asset Store!

Disclosure: We are using affiliate links to our assets; we may receive a commission for purchases made through them. This helps us to continue developing and maintaining great products!

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #77 on: October 01, 2014, 01:20:47 PM »
It really is! Yeah he does: http://sketchsean.blogspot.ca/

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: MARA - 2.5d platformer - WIP
« Reply #78 on: October 02, 2014, 12:25:46 AM »
Lovin' the illustration, it really catches my attention :)

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #79 on: October 06, 2014, 01:20:29 PM »
Thanks! Here is the trailer I just finished putting together:


intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #80 on: October 10, 2014, 01:08:01 AM »
Also just put a presskit together!

www.defiant-child.com/presskit

JonathanBurroughs

  • Junior Playmaker
  • **
  • Posts: 73
  • Some kind of independent game developer
    • @HiFiHair
Re: MARA - 2.5d platformer - WIP
« Reply #81 on: October 11, 2014, 11:35:20 AM »
Hey, intrikit. I think this game looks stunning. The artwork is truly beautiful. And I love the characters and the world.

However, if you can find about 1.5 hours free to watch 2 videos I think it would be *immeasurably* helpful to you.

Juice It or Lose It:
http://www.gdcvault.com/play/1016487/Juice-It-or-Lose

Jan Willem Nijman - Vlambeer - "The art of screenshake"

Particularly Jan's talk, which specifically deals with a 2D platformer.

There are a couple of really simple to implement techniques you could use to immediately give your game better "gamefeel".

Specifically some lerp on the camera, so that it tracks ahead of the player movement and "catches up" with the player when they're stationary. And some minor changes to the character animation, such as a land-from-fall reaction, which would give movement so much more weight and heft. These are minor additions, and not necessarily immediately intuitive ones, but they add so much to an experience.

Just my two cents anyway!

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #82 on: October 13, 2014, 09:38:19 PM »
Thanks for the nice words and even more for the videos! I'll definitely check them out and I'm sure they're worth the time. I am actually working on improving the camera at the moment and it's definitely a priority. The landing animation would also add a lot but I'll have to have a look at that later. Totally agree with you though!

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #83 on: October 14, 2014, 06:44:46 PM »
Hey, intrikit. I think this game looks stunning. The artwork is truly beautiful. And I love the characters and the world.

However, if you can find about 1.5 hours free to watch 2 videos I think it would be *immeasurably* helpful to you.

Juice It or Lose It:
http://www.gdcvault.com/play/1016487/Juice-It-or-Lose

Jan Willem Nijman - Vlambeer - "The art of screenshake"

Particularly Jan's talk, which specifically deals with a 2D platformer.

There are a couple of really simple to implement techniques you could use to immediately give your game better "gamefeel".

Specifically some lerp on the camera, so that it tracks ahead of the player movement and "catches up" with the player when they're stationary. And some minor changes to the character animation, such as a land-from-fall reaction, which would give movement so much more weight and heft. These are minor additions, and not necessarily immediately intuitive ones, but they add so much to an experience.

Just my two cents anyway!

I just checked out Jan's talk and that was gold. Gonna add some of those elements for sure. Simple things that make a huge impact and make the game more satisfying.

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: MARA - 2.5d platformer - WIP
« Reply #84 on: October 14, 2014, 09:09:17 PM »
Quote
Specifically some lerp on the camera, so that it tracks ahead of the player movement and "catches up" with the player when they're stationary

I have shared just the action to do that, here is the link:
http://hutonggames.com/playmakerforum/index.php?topic=5701.0

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #85 on: October 15, 2014, 01:45:38 AM »
Quote
Specifically some lerp on the camera, so that it tracks ahead of the player movement and "catches up" with the player when they're stationary

I have shared just the action to do that, here is the link:
http://hutonggames.com/playmakerforum/index.php?topic=5701.0

Ah thanks for this! I am playing around with it right now. However, I already have it set up so that the vertical is ignored. And the camera height is determined by the altitude of the target. How do I apply this same concept with this action?

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #86 on: October 15, 2014, 01:45:44 AM »
Quote
Specifically some lerp on the camera, so that it tracks ahead of the player movement and "catches up" with the player when they're stationary

I have shared just the action to do that, here is the link:
http://hutonggames.com/playmakerforum/index.php?topic=5701.0

Ah thanks for this! I am playing around with it right now. However, I already have it set up so that the vertical is ignored. And the camera height is determined by the altitude of the target. How do I apply this same concept with this action?

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: MARA - 2.5d platformer - WIP
« Reply #87 on: October 15, 2014, 06:38:21 AM »
Hi, I've updated the action, and now it has a checkbox to ignore the vertical position of the character, please give it a try..

edit: I can't seem to attach the updated script, so I'll just post the code in here:

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Transform)]
[Tooltip("Action for 2D Platform Camera with Dampening, based on Smooth Follow Action.")]
public class Platform2dCameraV2 : FsmStateAction
{
[RequiredField]
[Tooltip("The game object to control. E.g. The camera.")]
public FsmOwnerDefault gameObject;

[Tooltip("The GameObject to follow.")]
public FsmGameObject targetObject;

[RequiredField]
[Tooltip("The distance in the x-z plane to the target.")]
public FsmFloat distance;

[RequiredField]
[Tooltip("The height we want the camera to be above the target")]
public FsmFloat height;

[RequiredField]
[Tooltip("How much to dampen height movement.")]
public FsmFloat heightDamping;

[RequiredField]
[Tooltip("How much to horizontal offset.")]
public FsmFloat sideOffset;

[RequiredField]
[Tooltip("How much to dampen side movement.")]
public FsmFloat sideDamping;

[RequiredField]
[Tooltip("How much to dampen rotation changes.")]
public FsmFloat rotationDamping;

[Tooltip("Ignore Y position.")]
public bool ignoreHeight;

// Cache for performance
private GameObject cachedObect;
private Transform myTransform;
private Transform targetTransform;

public override void Reset()
{
gameObject = null;
targetObject = null;
distance = 10f;
height = 5f;
heightDamping = 2f;
sideOffset = 0f;
sideDamping = 2f;
rotationDamping = 0f;
ignoreHeight = false;
}

public override void OnLateUpdate()
{
if (targetObject.Value == null)
{
return;
}

var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null)
{
return;
}

if (cachedObect != go)
{
cachedObect = go;
myTransform = go.transform;
targetTransform = targetObject.Value.transform;
}

// Calculate the current rotation angles
var wantedRotationAngle = targetTransform.eulerAngles.y;
var wantedHeight = targetTransform.position.y + height.Value;
var wantedVel = targetTransform.position.x + sideOffset.Value;

var currentRotationAngle = myTransform.eulerAngles.y;
var currentHeight = myTransform.position.y;
var currentVel = myTransform.position.x;

// Damp the rotation around the y-axis
currentRotationAngle = Mathf.LerpAngle(currentRotationAngle, wantedRotationAngle, rotationDamping.Value * Time.deltaTime);

// Damp the height
if (ignoreHeight)
{
currentHeight = myTransform.position.y;
} else {
currentHeight = Mathf.Lerp(currentHeight, wantedHeight, heightDamping.Value * Time.deltaTime);
}

// Convert the angle into a rotation
var currentRotation = Quaternion.Euler(0, currentRotationAngle, 0);

// Set the position of the camera on the x-z plane to:
// distance meters behind the target
myTransform.position = targetTransform.position;
myTransform.position -= currentRotation * Vector3.forward * distance.Value;

currentVel = Mathf.Lerp(currentVel, wantedVel, sideDamping.Value * Time.deltaTime);

// Set the height of the camera
myTransform.position = new Vector3(currentVel, currentHeight, myTransform.position.z);

// Always look at the target
//myTransform.LookAt(targetTransform);
}

}
}

and save it as Platform2dCameraV2.cs (make sure it is the same as the public class name)

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: MARA - 2.5d platformer - WIP
« Reply #88 on: October 16, 2014, 02:08:21 AM »
Hi, I've updated the action, and now it has a checkbox to ignore the vertical position of the character, please give it a try..

edit: I can't seem to attach the updated script, so I'll just post the code in here:

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Transform)]
[Tooltip("Action for 2D Platform Camera with Dampening, based on Smooth Follow Action.")]
public class Platform2dCameraV2 : FsmStateAction
{
[RequiredField]
[Tooltip("The game object to control. E.g. The camera.")]
public FsmOwnerDefault gameObject;

[Tooltip("The GameObject to follow.")]
public FsmGameObject targetObject;

[RequiredField]
[Tooltip("The distance in the x-z plane to the target.")]
public FsmFloat distance;

[RequiredField]
[Tooltip("The height we want the camera to be above the target")]
public FsmFloat height;

[RequiredField]
[Tooltip("How much to dampen height movement.")]
public FsmFloat heightDamping;

[RequiredField]
[Tooltip("How much to horizontal offset.")]
public FsmFloat sideOffset;

[RequiredField]
[Tooltip("How much to dampen side movement.")]
public FsmFloat sideDamping;

[RequiredField]
[Tooltip("How much to dampen rotation changes.")]
public FsmFloat rotationDamping;

[Tooltip("Ignore Y position.")]
public bool ignoreHeight;

// Cache for performance
private GameObject cachedObect;
private Transform myTransform;
private Transform targetTransform;

public override void Reset()
{
gameObject = null;
targetObject = null;
distance = 10f;
height = 5f;
heightDamping = 2f;
sideOffset = 0f;
sideDamping = 2f;
rotationDamping = 0f;
ignoreHeight = false;
}

public override void OnLateUpdate()
{
if (targetObject.Value == null)
{
return;
}

var go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null)
{
return;
}

if (cachedObect != go)
{
cachedObect = go;
myTransform = go.transform;
targetTransform = targetObject.Value.transform;
}

// Calculate the current rotation angles
var wantedRotationAngle = targetTransform.eulerAngles.y;
var wantedHeight = targetTransform.position.y + height.Value;
var wantedVel = targetTransform.position.x + sideOffset.Value;

var currentRotationAngle = myTransform.eulerAngles.y;
var currentHeight = myTransform.position.y;
var currentVel = myTransform.position.x;

// Damp the rotation around the y-axis
currentRotationAngle = Mathf.LerpAngle(currentRotationAngle, wantedRotationAngle, rotationDamping.Value * Time.deltaTime);

// Damp the height
if (ignoreHeight)
{
currentHeight = myTransform.position.y;
} else {
currentHeight = Mathf.Lerp(currentHeight, wantedHeight, heightDamping.Value * Time.deltaTime);
}

// Convert the angle into a rotation
var currentRotation = Quaternion.Euler(0, currentRotationAngle, 0);

// Set the position of the camera on the x-z plane to:
// distance meters behind the target
myTransform.position = targetTransform.position;
myTransform.position -= currentRotation * Vector3.forward * distance.Value;

currentVel = Mathf.Lerp(currentVel, wantedVel, sideDamping.Value * Time.deltaTime);

// Set the height of the camera
myTransform.position = new Vector3(currentVel, currentHeight, myTransform.position.z);

// Always look at the target
//myTransform.LookAt(targetTransform);
}

}
}

and save it as Platform2dCameraV2.cs (make sure it is the same as the public class name)

Thanks SO MUCH. Works like a charm. This really makes the camera more dynamic and it really takes advantage of the 3D world a lot more.

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: MARA - 2.5d platformer - WIP
« Reply #89 on: October 16, 2014, 10:00:08 PM »
You're welcome, Glad to Help :)