The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: FastFlash on December 06, 2019, 11:35:36 PM

Title: Zooming out when enemy jumps too high
Post by: FastFlash on December 06, 2019, 11:35:36 PM
This is for a full game btw. Right now, whenever a player jumps too high, the camera follows them and you can't see the other player on the ground (as is usually in fighting games). I was wondering if there's a way to make it so instead of moving with the highest player, the camera zooms out instead so you could still see both players on screen.

I know there's a zoom sctrl in 1.1 but that only seems to work to zoom in, it doesn't do anything if you try to move out.

Basically, when the a player jumps, I want the camera to zoom out so I can keep both players visible.
Title: Re: Zooming out when enemy jumps too high
Post by: NotAGoodName on December 07, 2019, 06:48:17 AM
This has to be programmed into the stage.  Mugen 1.1 only.

The stage has to be built for this effect for the same reason that widescreen is 4:3 minus the top and bottom.  Stages don't have standard dimensions.
Title: Re: Zooming out when enemy jumps too high
Post by: FastFlash on December 07, 2019, 07:00:36 PM
This has to be programmed into the stage.  Mugen 1.1 only.

The stage has to be built for this effect for the same reason that widescreen is 4:3 minus the top and bottom.  Stages don't have standard dimensions.

So this is something that can be done by just messing with stage def parameters? I've had a look at the stage documentation and didn't find anything about vertical zoom.
Title: Re: Zooming out when enemy jumps too high
Post by: NotAGoodName on December 08, 2019, 05:35:38 AM
I don't know how the parameters work exactly, but SFIVTraining does indeed zoom out just from players jumping.  I'd say download some stages with zoom and play around to see what you can come up with.  I've never messed with it because I've never made a stage with zoom.
Title: Re: Zooming out when enemy jumps too high
Post by: YugaCurry on December 08, 2019, 05:46:59 AM
This has to be programmed into the stage.  Mugen 1.1 only.

The stage has to be built for this effect for the same reason that widescreen is 4:3 minus the top and bottom.  Stages don't have standard dimensions.

So this is something that can be done by just messing with stage def parameters? I've had a look at the stage documentation and didn't find anything about vertical zoom.

To achieve that you need a stage with large bounds. Check out any of Margatroid's stages (Bamboo Forest and Hakugyokurou) and it'll give you the desired effect. Any stage that is capable of having zoomout beyond 0.7 will give you that effect. The higher you can jump and wider the stage, the better.
Title: Re: Zooming out when enemy jumps too high
Post by: Kolossoni on December 08, 2019, 09:04:06 AM
The whole zoom-in & zoom-out feature is a little clunky since the engine itself is still only a beta.
For example, jumps (or vertical movement) don't make screens zoom-out unlike horizontal movements.
But, there are ways around.

Bounds sound okay-ish if you know what you are doing and is stage-code savvy.
Some creative coders I've seen, used custom codes that used drawangle to make the chars bigger/smaller depending on the height of the ground and distance from 2p to achieve the farness effect.
Now THAT's hard to achieve but certainly cool to look at.

As for me, I'm not that code-savvy, but if to just throw in a couple of ideas:
- Try using screenbound. Lock the screen to stationary.
- Then use Zoom (SCTRL) to add/remove camera zooms depending on the height.
- Maybe use Width (SCTRL) to push the char's sides so the screen actually moves without making the char moving.
- etc

Never tried it, but it's just a theory :P
Title: Re: Zooming out when enemy jumps too high
Post by: Cyanide on December 09, 2019, 09:36:31 AM
Put a helper in the middle of the visible screen area. Combination of width posset and screenbound should allow you to push the edges around at will based on p2dist.