YesNoOk
avatar

Tutorial: Screenpacks,3D stages,chars for 4:3 and 16:9 resolutions on Mugen 1.0 (Read 5623 times)

Started by MangeX, February 07, 2013, 10:32:41 pm
Share this topic:
Tutorial: Screenpacks,3D stages,chars for 4:3 and 16:9 resolutions on Mugen 1.0
New #1  February 07, 2013, 10:32:41 pm
  • avatar
  • **
  • If you rip sprites i´ll rip your code
    • Mexico
    • www.m3xweb.260mb.com
Introduction

(constantly updating it)

Hello everyone ,there´s be some time since i post anything ,so i like to share a nice tutorial to make 3d stages,screenpacks and characters who work on any resolution without problem.

1.- you need an idea for the stage, like a 3d game rip or you own render
2.- the usefull 3d stage calculator in this forum
3.- any version of mugen but this time we were using the 1.0 one who work on any resolution
4.- and last but very important... time to be happy.

i add images later, first the theory

Any maker in the comunity knows the problem for having 4:3 3d stages in a 16:9 wide enviroment , the camera problems and the ugly feel in the game.
Well, after brake my brain this morning, i finaly discover a metod for all the problems but sadly it require a lot or a least efforce.

Ok the resolution in the mugen engine depend on the configurations in the cfg file , the config on the motif (screenpack) and the local coord in the stage itself.

Imagine you have a mugen engine resolution of 1280x720 , a screenpack on 640x480 and a nice 3d stage equal on 640x480.
The engine constantly tries to perfectly match or make compatible all that resources and this cause the camera glitches sooo.

First we need to "help" it with our brains and simple mathemathics.

The most used resolutions are:

320x240 small and standard one , its like a squared rectangle (yes squared)
640x480 high resolution, like the one above only 4 times the size used on screen.
1280x720 high definition one, this is like 4 times the high resolution but in a wide format.
1920x1080 full high definition , for now we won´t work with this standard.

Ok you notice that 640x480 is the double of 320x240 but 1280x720 is not exactly double at 640x480.

640x480 double size really is 1280x960 but as you notice , the view region is a square ( differs a little in fact), if you put a 640x480 screenpack on a 1280x720 enviroment ,mugen cuts a portion in the bottom and lefts a very bad impresion.

This is , mugen take the 640x480, bouble the size at 1280x960 and cut the portion to make it 1280x720, just like this:
640x480(2)= 1280x960 and (1280x960)-(1280x720) is 240
(1280x720)/2 = 640x360 and (640x480)-(640x360) is 120

Well you got the idea , mugen cuts 240 pixels who is the double of the high resolution, to make it compatible on the high definition one.
And we need tho make that lost portion visible .

This simple equation make a lot of bugs in the engine gameplay.

Ok and now the trick:

Mugen quit 120 pixels in the buttom to cut the image and left a nice wided rectangle, but there is a perfect resolution to avoid the problems said before.

First we need to match the complete 640x480 image on a 1280x720 enviroment without lost anything, the solution is very simple.
On your mugen engine, screenpack, stage, character, or wherever, change the resolution following the equations above mentioned.

240 is double to 120 but for match we need to add pixels to the image. This is ,we put the following resolution:   854x480    this is the trick:

(1280,720) /3 = (427,240) *2 = (854,480)

427x240 is a wide low resolution format who images can match on both 320x240 and 1270x720 enviroment.
854x480 is a wide high resolution format who images can match on both 640x480 and 1270x720 enviroment.

And here is the tutorial to make proper 3D stages and proper screenpacks.

You first need to redone all for it to fit on a square or wide resolution

All the full background images need to be on a 854x480 size ,so when you have all the pictures for your stage or screenpack, put on the mcm or fighter factory and made the center point just in middle of the images, this is, the 0,0 coord must be on the high top center of the image.

This is to prevent that always the image has to be centered on any resolution, and only by code we "cut" the portions not visible.

But if you have a normal stage on 640x480 try change their localcoord to 854x480 or if you have older ones 320x240 change the localcoord to 427x240 and see yourself, the stage only show more portions to fit without affect anything else, now is more cool your old battlefield.

(note: this is like emulators when you put the extrageometry to fit an old 4:3 game in an 16:9 screen)

Normal stages are not problem because only show more to see, the 3d stages are a little bit more complicated because those stages images are complete full renders in the size of the used resolution.

Fine, now we need to make two def files one for S (square) format and other for W (wide) format , because all we do next is pure coding to perfect match each one on their respective resolution, without affect other things in game.

S def file local coord can be 320x240 or 640x480
W local coord must can be standard 427x240,high 854x480,hd 1280x720 or full hd 1920x1080

Ok if you only changes the localcoord the stage will work normaly like before, the bad part is that like in an old tv, there will be two "extra visuals" on each side
There is no knowledge that is not power
--------------------------------------
MANGEX WEB
Last Edit: February 08, 2013, 11:41:17 am by Dakangel