YesNoOk
avatar

Converting from Mugen 1.0 to Mugen 1.1 (Read 28332 times)

Started by aokmaniac13, July 26, 2010, 07:03:03 pm
Share this topic:
Converting from Mugen 1.0 to Mugen 1.1
#1  July 26, 2010, 07:03:03 pm
  • ******
  • Just a butcher on a mission
    • www.justnopoint.com/lbends
I realize not many people have access to the alpha version of 1.1 at this time but nevertheless this thread should save people a lot of headache when the public release rolls around.

Stage Zoom and Camera Bounds
Stages now support the zoomin and zoomout parameters which determine the minimum and maximum amount of the stage that can be shown at once.  Zoomin should usually be kept at the default value of 1.0 while zoomout will be a value less than one and greater than 0.  The maximum zoomout dimensions are also automatically factored into the camera bounds, so there is some math involved in order to keep your stages in bounds.
[Camera]
boundhigh = -544
boundlow = 0
boundleft = -192
boundright = 192
For a high resolution stage (640x480) of size 1024x1024, these are the camera settings you'd expect to have.  However, if we allow the stage to zoom out to the entire stage width we would see these settings instead:
[Camera]
boundhigh = -256
boundlow = 0
boundleft = 0
boundright = 0
zoomin = 1
zoomout = 0.625
To get our scale factor, we divide our screen width by the stage's total width:
640/1024 = 0.625
Then to adjust the boundhigh, we subtract the stage height by the maximum visible stage height
1024-(480/0.625) = 256

If we want to set an arbitrary zoom factor rather than one that goes the whole width of the stage, we can use this method instead:
[Camera]
boundhigh = -424
boundlow = 0
boundleft = -112
boundright = 112
zoomin = 1
zoomout = 0.8
1024-(640/0.8 ) = 224 - Horizontal pixels not visible at any given time
224/2 = 112 - Camera left and right bounds
1024-(480/0.8 )  = 424 - Vertical pixels not visible at any given time
Again this is with a 1024x1024 stage.


I will post more when I get around to it.


Edit: With alpha 2 the wallslam fix is no longer necessary.
Last Edit: August 01, 2010, 08:39:52 pm by Insanius
Re: Converting from Mugen 1.0 to Mugen 1.1
#2  July 26, 2010, 08:13:58 pm
  • ******
  • Just a butcher on a mission
    • www.justnopoint.com/lbends
Floor Overhang With Zoomed Stages
Quick and dirty math here, when a stage zooms out the floor level will always stay constant rather than pan down to accomodate.  This means that your stage will show more under the floor than it did when zoomed in, possibly exposing empty space.  To know how many pixels of stage you need underneath the floor to avoid this, you use this formula:
(screen height - zoffset) / zoomout
Re: Converting from Mugen 1.0 to Mugen 1.1
#3  July 27, 2010, 12:53:51 am
  • avatar
  • ******
    • USA
and you should also have "envshake" in mind in case you want the stage to not to have a black space below the screen, but that-s a bit of the perfectionist side so whatever :P

NIL

Re: Converting from Mugen 1.0 to Mugen 1.1
#4  June 18, 2012, 01:27:49 am
  • who has heartbroken
    • Vietnam
    • njv0tam@jabber.org
quite interesting :P
Re: Converting from Mugen 1.0 to Mugen 1.1
#5  June 18, 2012, 08:34:28 pm
  • avatar
  • *
    • Philippines
    • ciosi@msn.com
Will it be in any way possible to make it compatible with the current stages currently available?
The auto zoom feature seems kickass man!, itd be great if we had that!
Itll add more feel and realism!, no more stage limitations!, run like the wind to the opposite side!

Next step make 2 floors travesable and vise versa just like naruto XD
Re: Converting from Mugen 1.0 to Mugen 1.1
#6  July 22, 2012, 08:47:10 pm
  • ****
  • Shakespear.
Good call on this here.  It will be handy dandy when the time comes.
Re: Converting from Mugen 1.0 to Mugen 1.1
#7  October 19, 2012, 11:30:51 am
  • **
  • Yuyu shooting star
your code dont work man wtf its this come kind off april fool day joke cuase sure not funny >:(
love justices shooting star
Re: Converting from Mugen 1.0 to Mugen 1.1
#8  October 19, 2012, 11:51:50 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I realize not many people have access to the alpha version of 1.1

Actually, why the fuck is this sticky...


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.