YesNoOk
avatar

Platforms (Read 1448 times)

Started by XoninX, September 30, 2016, 04:25:14 am
Share this topic:
Platforms
#1  September 30, 2016, 04:25:14 am
  • avatar
  • *
    • USA
I've been wanting to make a One Piece full game for a long time now, with vulnerability & immune values, weaknesses according to the canon, etc. I'm pretty sure I can do these things, but I'm stuck on one feature right now. Platforms. How to make these monstrosities has been on my mind for weeks now, and however much I try, nothing seems to work. I've tried setting a helper and having vars detect how far away the character is from the platform:

State -2:
Spoiler, click to toggle visibilty


State 50:
Spoiler, click to toggle visibilty

This really is all I can think of, but always ends in the character falling straight through the platform and jumping normally. The point is, I really need someone to tell me 'what' goes 'where' and how to correctly write that 'what', because I feel like I'll spend a loop of eternities if I try to find this out on my own, and I really need to finish this so I can progress with other things. Anyone who has experience with platforms, help please. Thanks

(Running Mugen 1.1)
Last Edit: September 30, 2016, 04:28:38 am by XoninX
Re: Platforms
#2  September 30, 2016, 06:25:07 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Gone a bit... odd there. You're redirecting to helper 8000 and then checking if it is helper 8000. Is this a game where 1 player can jump on the platforms, or both, and how much interactivity with said platforms is there? There are a few methods.

You can do absolute position of your player on the stage to define whether they should be on a platform or not. You can set the helpers up as platforms and have them apply variables which cause the root to "land" or you can have the helpers deal a hit to make the root land, all depends on how you want to play it.

Would you be happy to mock up a screenshot of what you want to achieve? Like walking and falling off, or jumping through them in some way, all that stuff. I helped with Bane84's mario stage so this isn't new, it's just what you want to do.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Platforms
#3  September 30, 2016, 03:44:21 pm
  • avatar
  • *
    • USA
Thanks for replying so quickly! I'd like a game where both players are able to land on the platforms.

Something like this:



There should be:
-- Several platforms per stage.

-- Activating the crouch command two times + start should set you off the platform.

-- Platforms should be destroyed once they take enough damage.

That's pretty much the gist of it. Sorry if I overwhelmed you! Once again thanks for replying so quickly.
Re: Platforms
#4  September 30, 2016, 04:37:56 pm
  • ****
    • Peru
Here's a way I can think of (for the landing on the platform):

In statedef -2:

Code:
[State -2, Land on platform]
type = ChangeState
trigger1 = statetype = A
trigger1 = pos y >= helper(8000), pos y  && vel y > 0 ;Basically the same logic you would use with natural ground landing, just look at "helper(8000), pos y" as if it was 0.
value = 53

Next, go to statedef 53 and do this (in case you haven't):

Code:
[State 53, Stepping on platform]
type = PosSet
trigger1 = pos y > helper(8000),pos y && pos y < 0 ;Again, treating the platform's position as you would the ground's position, only this time you're making sure your character isn't a few pixels below it.
y = helper(8000), pos y

That should help in getting you started. As for the sinking through them with down,down+start, make a state for that and add stateno != sinkingthroughstate in your "Land on platform" sctrl. Otherwise, they're just gonna change to State 53.

Hope I'm not being too convoluted, if there's something you didn't understand let me know.
Millie, "Ozy and Millie" said:
"I think there are really three types of people: "Glass is half-full" sorts of people, "Glass is half-empty" sorts of people,
and people who will spit into the glass until that's fixed."
Re: Platforms
#5  October 01, 2016, 12:06:28 am
  • avatar
  • *
    • USA
SUCCESS!

I added the "if you're within this amount of x from the platform" argument and also a changestate to go into state 50 once you're out of that range. There was a problem where you'd block when you're near the enemy's platform, so I just made an assert special that stopped you from doing that unless they're actually in an attacking state. The platforms would mirror (One would be P1s and only he could go on it, same for P2), so I overlapped the platforms based on what teamside you're on, and now they can both be on the same platform! I hope everything goes smoothly from here.

Here's my code for people to see:

State -2
Spoiler, click to toggle visibilty

State 8000 (Platform Helper)
Spoiler, click to toggle visibilty

State 53 (Custom state to land on the platform)
Spoiler, click to toggle visibilty

Still going to bug test to see if multiple platforms will work okay.
Thanks a ton!
Re: Platforms
#6  October 01, 2016, 02:21:55 am
  • avatar
  • *
    • USA
Aight. There is a problem. So I'm able to make one platform without any problems, but now I can't make more than one platform at once without the character getting stuck in either the custom landing state, or state 50.

Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty

State 53
Spoiler, click to toggle visibilty
Re: Platforms
#7  October 01, 2016, 03:01:27 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Your triggers match too often. Your helpers are both the same ID. Something is going to be true for one or the other very frequently. Find a way of having the helpers register the parents position and then have the parent change basedo n that.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Platforms
New #8  October 01, 2016, 07:52:36 pm
  • avatar
  • *
    • USA
Fixed. I'm currently working on a way to have a projectile set p2 into state 53, since I think the overlapping helpers thing is inefficient (having to set the x distance depending on what team side you're on every time is a pain). I'll keep testing.

Edit: Meh. The stacking helpers thing won't be THAT bad... it's just a bit of positioning anyway.

Here's the code for the platforms. I still have to make the whole breaking platforms thing, but I don't think that'll be THAT bad.  Everything's working well, a big thanks to everyone!

Statedef -2
Spoiler, click to toggle visibilty

Platform 1 & 2 helpers
Spoiler, click to toggle visibilty

Custom land state
Spoiler, click to toggle visibilty

Custom "land on the platform from getting hit in the air" state
Spoiler, click to toggle visibilty

It'd be amazing if a ton of more people could work on platforming. Flat stages get a tad mundane after a while, and this really spices things up. Once again, thanks to everyone who contributed! I hope this helps people!
Last Edit: October 01, 2016, 10:55:44 pm by XoninX