playMaker

Author Topic: Fighter Prototype  (Read 11434 times)

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Fighter Prototype
« on: September 23, 2014, 03:37:50 AM »
Hey,

Made a little fighter prototype movement system over the weekend:


Features so far:
- Basic Movement (left and right)
- Dashes
- Jumping (UL, U, UR), a few prejump frames before you take off.
- Detecting which direction you're facing
- Crouching is registered but there's no animation just yet.
- Blocking by holding away, or down+away is registered correctly, but no animation or attacks to block yet.
- You can change your colour by inputting D,DF,F, LP.
- Screen boundaries prevent you from walking to the other end of the stage.

I'm still adjusting the feel of everything so it plays nice and solid.

Need to address how cross-ups feel. I made it so that a jumping player doesn't collide with a standing one, and then rechecks the collisions upon landing on the ground again, but ideally it should push the standing player away. The problem is that when I don't play with collision layers you can just land on the other player's head and stay there.

I think the next step is a character to implement basic attacks, which should be a fun challenge.

(I'm starting to think I should make a prototype thread for all of these little projects.)

Mark

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Fighter Prototype
« Reply #1 on: September 24, 2014, 06:13:40 PM »

(I'm starting to think I should make a prototype thread for all of these little projects.)


I thought about this too. I do have a small prototype adventure game that I made awhile back, it's a older build so I forgot to remove state labels.

http://hutonggames.com/playmakerforum/index.php?topic=8236.0

Back on the topic of your small fighting prototype, how does one deal with collision if you develop animations?

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Re: Fighter Prototype
« Reply #2 on: September 24, 2014, 09:39:05 PM »
My understanding of fighters is that attacks basically have 3 parts:

- Startup, the attack beginning.
- Active, when the attack can actually hit.
- Recovery, attack can no longer hit, and you can't perform another action yet.

Right now the way I'm thinking about doing it is having generous 2D colliders on the bones themselves, and then testing for collisions during the active part of the attack.

Here's a video of some basic one frame animations, and then with the colliders shown. They don't do anything yet, obviously.


Graham

  • Sr. Member
  • ****
  • Posts: 333
  • I Love Playmaker!
    • Portfolio
Re: Fighter Prototype
« Reply #3 on: September 25, 2014, 08:45:05 AM »
Looking pretty good with single frame animations, looks promising!
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!

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Fighter Prototype
« Reply #4 on: September 25, 2014, 10:26:18 AM »
:O

TrentSterling

  • Junior Playmaker
  • **
  • Posts: 89
  • Someday I'll make games!
    • My Blog
Re: Fighter Prototype
« Reply #5 on: September 26, 2014, 12:41:00 AM »
Wow, this looks cool. I like your other prototypes too. Had any progress on Sine Runner?

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Re: Fighter Prototype
« Reply #6 on: September 27, 2014, 12:58:34 AM »
Looking pretty good with single frame animations, looks promising!

Cheers! I need to make sure I do the attacks in a clever and modular way, so that designing characters is a very straightforward process.

:O

:D

Wow, this looks cool. I like your other prototypes too. Had any progress on Sine Runner?

Thanks! I need to figure out how to stop physics from updating during dropped frames in Sine Runner. It was causing the player to launch wayyyyyy beyond what they should be able to jump, and when it's all about precision platforming, not really fantastic.

Ideally no frames will drop in the final build, but if a phone starts to lag (my 4S is starting to die, for example), then it makes it really erratic to play.
If anyone knows how to prevent 2d physics from updating when it lags, or changing when the updates happen using Playmaker. I'd love to know!

TrentSterling

  • Junior Playmaker
  • **
  • Posts: 89
  • Someday I'll make games!
    • My Blog
Re: Fighter Prototype
« Reply #7 on: September 27, 2014, 12:31:16 PM »
Well the question there would be- do you want the game to literally slow down when you're lagging? It sounds like Unity is skipping time ahead for the dropped frames, which is what the FixedTimestep is for.

If you go to Edit>Project Settings>Time settings- you'll see FixedTimestep = 0.02. This means you get a physics update 50 times per second.

Below that you see the Maximum Allowed Timestep = 0.3333. This setting allows Unity to skip time ahead a maximum of 0.33, before it decides to just slow down time and wait.

If you lower the Maximum Allowed Timestep to 0.02, same as your regular timestep, you'll never skip a frame. However, the simulation will slow down, which is shitty on old devices, because it's like they'll be playing in bullet time all day.  :o

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Re: Fighter Prototype
« Reply #8 on: September 27, 2014, 11:32:48 PM »
Well the question there would be- do you want the game to literally slow down when you're lagging? It sounds like Unity is skipping time ahead for the dropped frames, which is what the FixedTimestep is for.

If you go to Edit>Project Settings>Time settings- you'll see FixedTimestep = 0.02. This means you get a physics update 50 times per second.

Below that you see the Maximum Allowed Timestep = 0.3333. This setting allows Unity to skip time ahead a maximum of 0.33, before it decides to just slow down time and wait.

If you lower the Maximum Allowed Timestep to 0.02, same as your regular timestep, you'll never skip a frame. However, the simulation will slow down, which is shitty on old devices, because it's like they'll be playing in bullet time all day.  :o

Oh wow, thank you! You've just earned yourself a credit. :)

So basically it's a matter of finding a sweet spot between lagging so hard they go into orbit, and playing in slow motion? haha

TrentSterling

  • Junior Playmaker
  • **
  • Posts: 89
  • Someday I'll make games!
    • My Blog
Re: Fighter Prototype
« Reply #9 on: September 30, 2014, 05:45:42 PM »
Yeah it's a weird compromise. But if you're getting a bunch of instability, I think slowing everything down would be more acceptable.  ;)

rik

  • Full Member
  • ***
  • Posts: 246
Re: Fighter Prototype
« Reply #10 on: November 27, 2014, 05:33:42 PM »
good demo video adding gui buttons make an android or ios version good video

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Re: Fighter Prototype
« Reply #11 on: November 17, 2015, 10:27:24 PM »
Deciding to have another go at building a fighter. After learning from a few mistakes the first time around, I decided to start with the move input system, and then added in some graphics once I was satisfied with how executing moves felt.

The focus is just making it feel nice to play, not worrying about balance yet. Also, trying to keep things as modular and neat as possible.


dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Fighter Prototype
« Reply #12 on: November 18, 2015, 12:35:43 PM »
hey dude,

You should try the 'fighter camera advance' action for the camera movement. I don't think anybody ever used it so would be nice to get some feedback on it. It's in the ecosytem...

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Re: Fighter Prototype
« Reply #13 on: November 18, 2015, 08:01:41 PM »
Hey mate,

I gave it a shot earlier on in the project, but it kept spamming me with red errors on the lines regarding the interpolation, so I just rolled my own system in Playmaker.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Fighter Prototype
« Reply #14 on: November 19, 2015, 07:52:10 AM »
oh weird.. it should be working. i tested with cubes and it had no issues then. I will review  the action.


Many thanks for the feedback.  ;D
« Last Edit: November 19, 2015, 07:55:18 AM by dudebxl »