YesNoOk
avatar

Future Highway Updated (Read 16097 times)

Started by !E, January 26, 2008, 01:12:27 am
Share this topic:

!E

Future Highway Updated
New #1  January 26, 2008, 01:12:27 am
  • avatar
  • **
    • Canada

Added the smashed bumble bee.
Added transparency to the light pole so that the character can seen behind it.

Download: www.before3d.com > Download > Stage
Last Edit: January 27, 2008, 03:36:33 pm by Sepp
Re: Future Highway Updated
#2  January 26, 2008, 05:58:51 am
  • ****
    • www-personal.umich.edu/~tdkim/ziltama/
Hmm...

1) Mild asymmetry.  Not a big deal here since it's only off by 1.  (-boundleft = boundright).

2) To make jumping smoother, change verticalfollow to .85 and floortension to 60.

3) Try not to use both shadow and reflection.  I would get rid of reflection.  For the shadow, I would change the scale to -0.2 to make it go backwards (based on lamp position) and make it a little larger.  Also set fade range to -50,-25 so the shadows don't appear all over the background when jumping.

4) The deltas are a mess and need a complete overhaul.  The back highway layer moves faster than the floor.  The background sky moves at the same delta as the floor.  Not good.

Basically for low-res stages, stuff behind floor layer that's not directly connected to the floor should have a delta less than 1,1.  Stuff in front of the floor layer that's not directly connected to the floor should have a delta more than 1,1.  Floors are, of course, 1,1 except if parallax is used.  Then, the zoffset line within the parallax floor should have an effective delta of 1,1.

I recommend the following changes (subsequent parallax changes are based on these):

For [BG 0], delta = .5,.75 and I would change the start coordinates to start = -622,-376 to compensate (moved it down 10).

For [BG Eagleship], delta = 0.55,0.8.

For [BG Backroad], delta = 0.6,0.9.

For [BG Backlight] and [BG Road], delta = 0.75,1.  Chose an arbitrary value less than 1 for the x-delta.  Y-delta is, of course, 1 since it's the floor.

For both [BG SmashedBee]'s, delta = .826,1.  I'll go over how to calculate this down in the parallax part below.

Get rid of [BG Black Block Reflection] since it won't do anything after the blackjack trick.

For [BG Foreground], delta = 1.417,1.  Also will go over how to calculate this.  If the floor was longer vertically, then I would change y-delta to 1.25.  (That would also require recalculating all the parallax if the floor was extended.)

5) Parts of the background star layer look like a sloppy cut-and-paste job.  You can see some of the bigger stars being abruptly cutoff.  Needs cleaning up.

6) The ship moves a little too fast in the x-direction.  Try lengthening the sinx period to 2500.

7) The light poles should have been their own separate layer instead of being attached to the foreground road barrier.  That would have also prevented use of your "black box reflection".

You can still use the blackjack trick, though.  It was also negate use of the "black box reflection".

As a side note, you don't need to use animations to specify transparencies.  It's just extra work for nothing.  Mask is locked to 1 no matter what value is specified if animations or transparencies are used.

This is your original [BG Foreground]:
Code:
[BG Foreground]
type  = Anim
actionno = 1
start = -622,-110
mask = 1
layerno = 1
delta = 1.3,1

[Begin Action 1]
1,0, 0,0, 5,,A156D256

After delta tweaks and getting rid of animation (also needed tile):
Code:
[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
mask = 1
tile = 1,0
layerno = 1
delta = 1.417,1

Replaced with:
Code:
[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
mask = 1
tile = 1,0
delta = 1.417,1

[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
tile = 1,0
delta = 1.417,1
trans = sub

[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
tile = 1,0
delta = 1.417,1
trans = add1
layerno = 1

The poles will appear normal until characters pass on through.

8. The floor is obviously broken.  Characters slide.  Setting the bee delta to 1,1 is just ridiculous.  If you do not know how to use parallax, look up a tutorial, especially when using an undocumented function like width (at least not documented in mugen's bg docs).

Width is best used for tiled floors while xscale is best used for non-tiled, single graphic floors.

Your floor is tiled, I guess, but you had the green debris built in and made a much longer floor graphic.  I probably would have left that separate to make smaller tiles.

width = w1, w2

w1 = width of floor top, w2 = width of floor bottom

The top of the floor will have an x-delta of whatever you defined in delta = x,y.  The bottom of the floor will have an x-delta of w2/w1.

The zoffset line has to have an effective x-delta of 1 for characters not to slide.

So, if 1 is not an allowable value between the top and bottom of the floor graphic, then parallax automatically fails.  Your original settings had the top of the floor start off with a delta of 1, so it was impossible to even guess appropriate width values.  That's why your floor is broken.

For width, the calculations are the same as vib's xscale formula except with an additional calculation at the end.  So, let's look at the xscale formula first to calculate deltas:

How to figure out xscale: (more or less cut-and-paste from a prior post)

To prevent sliding on a floor layer, delta = x,y needs to be 1,1 for low-res stages (2,2 for hi-res).  For parallax, the y-delta will remain 1, but the x-delta varies from the top to the bottom of the image.  The goal is to have the x-delta equal 1 where the zoffset line is.  This will avoid sliding.

As for delta = x,y:

X is usually known (most often, it's the same value as the layer connected to or above the floor) and less than 1.  Per my prior suggestion, we'll use x = 0.75.  Y is 1.

As for xscale = x1,x2:

These are the multipliers for the x-delta (so obviously, won't affect y-delta at all).  So, x1 * x = delta for top of image and x2 * x = delta for bottom of image.  Parallax floors will automatically fail if (x1 * x) > 1 or (x2 * x) < 1, since it will be impossible for the zoffset line to have an x-delta of 1.

x1 is usually set to 1 to make calculations easier.

x2 goes by this formula:

x2 = [(1-x) * B/A +1] / x

x is the x-delta from above, B is distance from zoffset line to bottom of ORIGINAL floor graphic, A is distance from zoffset line to top of ORIGINAL floor graphic.

To use the formula correctly, you need to 1) take a screenshot to get an idea where the zoffset line is and 2) superimpose the zoffset line onto the ORIGINAL floor graphic (this is important since the floor graphic often extends past the visible viewing area and does matter in calculations...although your floor isn't affected by this).

This is your stage as an example (after some other tweaks):


I prefer using Michael Jackson to do calculations since his feet are always on the zoffset line (my own preference).  The snippet on the right is his feet superimposed onto the ORIGINAL floor graphic in the same vertical position.

I measure 33 for A and 17 for B on the ORIGINAL floor graphic.

x2 = [(1-0.75) * 17/33 +1] / 0.75 = 1.505050

To calculate width:

For width, it's easier to keep one of the values the same as the original floor tile width.  Yours is rather large but still works.

For your stage, we'll keep w1 as the floor tile width and calculate w2.

w2 = w1 * x2

So, 1188 is the original width of the floor.  Multiply this by 1.505050 to get 1788.

So, width = 1188,1788.  The zoffset line will have an x-delta of 1 and characters won't slide.

Code:
[BG Road] 
type  = parallax
spriteno = 1,1
delta = 0.75,1
start = 0,152
tile = 1,0
width = 1188,1788

Since the change in x-deltas in parallax is linear from top to bottom, then you can use ratios to calculate the x-deltas of objects placed on the road.

Using same variables as above, x-delta change = (1-x)/a = (1-.75)/33 = .00757575

The bee bottom is roughly 10 pixels down from the top of the floor.  So, the delta there should be 10 * the above value plus the delta from the top of the floor.

.75 + .0075757575 * 10 = .826

So, that's why I set the bee delta to .826,1 above.  Now the bee doesn't slide.

As for the road foreground barrier, I extrapolated the floor down to the very bottom of the screen (even though the floor graphic itself doesn't go down that far).

The bottom of the barrier/screen is 88 pixels from the top of the floor.

.75 + .0075757575 * 88 = 1.417

So, that's why I set the foreground barrier to 1.417,1.

Now the parallax effect looks nice.  You'll probably want to tweak the exact starting positions to get the lamp posts better aligned.

9) You probably should move the entire stage down 10-20 pixels.

10) For now, if you just want to see all the changes plugged in, you can copy and paste this:
Code:
;---------------------------------;
;Author  : Etg   ;
;Email   : Eternaga@hotmail.com   ;
;Website : www.before3d.com       ;
;---------------------------------;

; Last updated: Jan 25, 2008
; Release Date: Dec 14, 2006

[Info]
name = "Future HighWay Remix"

[Music]
bgmusic=
bgvolume= 255
bgm.loop = 1

[Camera]
startx = 0
starty = 0

boundleft = -462
boundright = 463

boundhigh = -386
boundlow = 0

verticalfollow = 0.85
floortension = 60
tension = 60


;--------------------------------------------------------
[PlayerInfo]
;--- Player 1 ---
p1startx = -80          ;Starting x coordinates
p1starty = 0            ;Starting y coordinates
p1startz = 0            ;Starting z coordinates
p1facing = 1            ;Direction player faces: 1=right, -1=left

;--- Player 2 ---
p2startx = 80
p2starty = 0
p2startz = 0
p2facing = -1

;--- Common ---
 ;Don't change these values.
leftbound  = -2030 ;Left bound (x-movement)
rightbound =  2600 ;Right bound
topbound  =  0     ;Top bound (z-movement)
botbound  =  0     ;Bottom bound

;--------------------------------------------------------
[Scaling]
 ;No need to change these values
topz     = 0       ;Top z-coordinate for scaling
botz     = 50      ;Bottom z-coordinate for scaling
topscale = 1       ;Scale to use at top
botscale = 1.2     ;Scale to use at bottom

;--------------------------------------------------------
[Bound]
screenleft = 15   ;Dist from left of screen that player can move to
screenright = 15   ;Right edge

;--------------------------------------------------------
[StageInfo]
zoffset = 185
autoturn = 1
resetBG = 1

;--------------------------------------------------------
[Shadow]
intensity = 100
color = 0,0,0
yscale = -0.2
fade.range = -50,-25

;--------------------------------------------------------
[Reflection]
intensity = 0

;--------------------------------------------------------

[BGdef]
spr = FutureHighwayRemix.sff
debugbg = 0

[BG 0]
type  = normal
spriteno = 0, 0
start = -622,-376
delta = .5,.75
mask  = 0

[BG EagleShip]
type  = normal
spriteno = 1,4
start = -500,-340
mask = 1
sin.y = 10, 200     
sin.x = 400, 2500
delta = 0.55,0.8

[BG BackRoad]
type  = normal
spriteno = 1,3
start = -700,-90
mask = 1
delta = 0.6,0.9

[BG Backlight]
type  = normal
spriteno = 1,2
start = -723,-49
mask = 1
delta = 0.75,1

[BG Road]
type  = parallax
spriteno = 1,1
delta = 0.75,1
start = 0,152
tile = 1,0
width = 1188,1788

[BG Smashed Bee]
type  = normal
spriteno = 1,5
start = -723,-49
mask = 1
delta = .826,1 

[BG Smashed Bee]
type  = normal
spriteno = 1,6
start = -723,-49
mask = 1
delta = .826,1

[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
mask = 1
tile = 1,0
delta = 1.417,1

[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
tile = 1,0
trans = sub
delta = 1.417,1

[BG Foreground]
type = normal
spriteno = 1,0
start = -622,-110
layerno = 1
trans = add1
delta = 1.417,1
tile = 1,0

Again, I would further adjust things like lamppost x-position and bringing the whole stage down 10-20 pixels.

Note: The formulas only work for low-res setups.  They will fail for hi-res stages (needs some slight adjustments).  Moving everything down won't need parallax recalculations as long as the zoffset line is kept in the same relative spot compared to the floor.

11) Use the appropriate message icon for this forum.

Alright, class is now adjourned.  Gimme $10.
Last Edit: January 26, 2008, 06:16:53 am by ziltama
Re: Future Highway Updated
#3  January 26, 2008, 10:52:06 pm
  • *
  • I'm a llama!
Wow! Im all for some good feedback, but dont you think you went a little overkill?

OZ

Re: Future Highway Updated
#4  January 26, 2008, 11:00:18 pm
  • ******
  • ಠ_ಠ
There's no such thing as overkill when it comes to feedback.

He listed everything that could ever possibly need fixing.
This is incredible feedback, I'd be sure to take advantage of it.
ಠ_ಠ
Re: Future Highway Updated
#5  January 26, 2008, 11:00:38 pm
  • *****
  • Three times thicker font than a normal user.
Quote
Imagine a zanguief runing to attack ryu, ryu does a quick+kind of weak fast punch and hit the chest of zanguief, will this punch be enough to zanguief say/think \"oh no, this punch hurted a little, I better stop the attack and put my hand on my chest to help contain the pain while ignoring if ryu is going to make other attacks now"


Cenobite 53 said:
If someone isn't able to get girls laid, why buying this exorcist needing piece of retardet piece of bullshit an not wisiting his local red light district. For that money he could  :hump: tons of hookers.