Jump to content
  • 0

Looking for help coding stage zoom. 2 issues.


RobotMonkeyHead

Question

_____/ First Issue
I've run into something I can't figure out regarding zoom, while trying to update my stage edits to 1.1:  It seems like I can only do one of two things, where I would really like to do both.  The problem seems to be the boundhigh.  If it's set to zero, you get the first situation.  If it's set to about -120 or so you get the second situation.

 

First, I can get the stage to zoom out all the way so that the top of the stage sprite lines up with the top of the screen.  But if I do this, when it's zoomed in, the camera won't scroll up to follow the characters when they jump, even tho the floortension and vertical follow are set right. 

 

xor

 

Second, when the characters super jump I can get the camera to follow them to the top of the stage, but when it zooms out all the way, it still follows the characters just as much (absolutely) vertically as it did when zoomed in all the way, so if they super jump when it's zoomed out it exposes the purple background of the stage.

 

Does anyone know how I can get this stage to be able to zoom out all the way, so the top of the stage sprite is the top of the screen, but when it's zoomed in, still have the camera follow the characters up to the top of the stage when they jump? 

Here's a download link if you feel like testing it out, and some screenshots for the problem.  Any help would be greatly appreciated.

 



Zoomed out all the way (boundhigh = 0)
foImmOl.png
 
 

But won't follow the characters up.  (boundhigh = 0)
4ENNFFY.png

 

 

_____/ Second Issue

The second problem is that when player 2 is all the way to the left, and still holding the left directional, and then player 1 walks away from them toward the other edge of the screen you get this weird jittering effect at some distances.  Messing around with the bounds helped in one instance, but I can't seem to get a reliable setting for it.  Does anybody happen to know what's causing that?

 

      onp7EZ9.png

~ℛ.ℳ.ℋ. 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Well...first thing I noticed was that your stage sprite is only 240pcx tall. You need more than that to achieve the type of zoom you're looking for. 360pcxis a good height. It provides superjump but not too much. If you wan't Marvel style stages I'd suggest maybe 420pcx.

If you wan the camera to follow the characters when they jump at close range, use

tensionhigh = 150
tensionlow = 0

That combined with a taller sprite and you will achieve the desired effect. Also when using zoom, it's necessary to adjust the z-offset and the y-delta on ALL of your sprites. Depending on the zoom, you basically have to increase the z and y values equally based on your zoom values.

 

Here's a copy of what I did to your stage. Paste and study my friend.

 

;Enlarged by RobotMonkeyHead 5/27/12 added zoom 5/10/15

;--------------------------------------------------------
[Info]
name = "Castlevania Portrait"

;--------------------------------------------------------
[Camera]
startx = 0
starty = 0
boundleft =  -150
boundright =  150
boundhigh = 0
boundlow = 0
verticalfollow = .75

floortension = 60
tension = 100
;startzoom 	= 1,1
;zoomin 		= 1.3
zoomout 	= .70

tensionhigh 	= 150
tensionlow 	= 0
;--------------------------------------------------------
[PlayerInfo]
;--- Player 1 ---

p1startx = -70          ;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 = 70
p2starty = 0
p2startz = 0
p2facing = -1

;--- Common ---
 ;Don't change these values.
leftbound  = -420 ;Left bound (x-movement)
rightbound =  420 ;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     = 0      ;Bottom z-coordinate for scaling
topscale = 0       ;Scale to use at top
botscale = 0     ;Scale to use at bottom

;--------------------------------------------------------
[Bound]

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

;--------------------------------------------------------
[StageInfo]

zoffset = 212
autoturn = 1
resetBG = 1
xscale = 1.5

yscale = 1.5
;--------------------------------------------------------

[Shadow]
color = 102,102,102
INTENSITY = 120
yscale = .2


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

[Music]
bgmusic = sound\Beethoven - pathetique pt 1.mp3
bgvolume = 255

;========================================================

[BGdef]
spr = Castlevania.sff
debugbg = 1


[BG 0]
type = anim
actionno = 1
layerno = 0
start = -250,-55 ;-250,10
delta = 0.5, .5

[Begin Action 001]
0,0,0,0,150
0,1,0,0,5
0,0,0,0,300
0,1,0,0,5
0,0,0,0,50
0,1,0,0,5
0,0,0,0,200
0,1,0,0,5


[BG 1]
type  = normal
spriteno = 0, 2
start = -300,-70 ;-300, 0
delta = 1, 1
velocity = 0, 0
mask = 1


[BG 2]
type = anim
actionno = 10
layerno = 0
start = 124,60
mask = 1
delta = 1,1

[BG 2]
type = anim
actionno = 10
layerno = 0
start = 220,60
mask = 1
delta = 1,1

[Begin Action 010]
10,0,0,0,2
10,1,0,0,2

[BG 3]
type = anim
actionno = 20
layerno = 0
start = -223,-60
mask = 1
delta = 1,1

[Begin Action 020]
20,0,0,0,100
20,1,0,0,5
20,2,0,0,10
20,1,0,0,5

 

0hGNWik.png

Do your best to become stronger. Become stronger, so you can do your best

Link to comment
Share on other sites

  • 0

I appreciate the help LightFlare, but the problem remains.  I might have done a bad job at explaining what I'm trying to do.  Basically I don't want the camera to scoll vertically at all when it's zoomed out all the way.  When it's zoomed in all the way, however, I want it to be able to scroll up -120.  That's what seems to be impossible.  It seems like I'm stuck with a set amount of vertical scrolling, no matter what the zoom is. 

That means if I have it set so the stage can zoom out all the way, showing the entire bg sprite, I have to have the vertical scrolling (boundhigh) set to 0, otherwise the magenta will show when they hit the top.  What that also means tho, is that when it's zoomed in it won't follow them up when they jump. because the boundhigh is zero.  See what I'm saying? 

I'm hoping there's some kind of work around for that.

The xscale and yscale are both 1.5 so the stage is actually 360 high, not 240.  There's plenty of room for it.  Try opening it up and setting the boundhigh to -120, and use KFM to like quadruple jump up into the magenta.  Tensionhigh pretty much just replaces what floortension and verticalfollow were doing before.

On another note, I did figure out that "jittering camera" issue, so it's just the one to go.

      onp7EZ9.png

~ℛ.ℳ.ℋ. 

Link to comment
Share on other sites

  • 0

Yea recoding it would only take about 20 minutes.  I'd still run into the same problem tho I think... Unless I move the entire thing down, so the boundhigh is 0 either way, and then just have the bound low set just below the zoffset so the players kind of pull the camera down.  That actually might just work. 

      onp7EZ9.png

~ℛ.ℳ.ℋ. 

Link to comment
Share on other sites

  • 0

The reason I had it set at zero was because it's the only way to prevent the camera from scrolling up when it's zoomed all the way out.

I guess to simplify things, that's all I'm really trying to do.  Scroll up when zoomed in, no scroll up when zoomed out.

      onp7EZ9.png

~ℛ.ℳ.ℋ. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...