Difference between revisions of "Resize Levels in Sonic 2"
From Sonic Retro
Lavagaming1 (talk | contribs) |
Inferno Gear (talk | contribs) (Holy shoot, this was trash. Fixed it for ya, Lavagaming.) |
||
Line 1: | Line 1: | ||
{{GuideBy|lavagaming1}} | {{GuideBy|lavagaming1}} | ||
− | + | This was heavily edited by Inferno. | |
− | the | + | In Sonic 2, all acts reference an array which defines starting screen boundaries for the levels. |
− | + | By editing this array, we can resize the initial level boundaries, so let's do that. | |
+ | In s2.asm, search for "LevelSize:" You should see this: | ||
<syntaxhighlight lang="asm"> | <syntaxhighlight lang="asm"> | ||
; =========================================================================== | ; =========================================================================== | ||
Line 50: | Line 51: | ||
; =========================================================================== | ; =========================================================================== | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | This is the array. Now, let me explain how this works: | |
− | + | X-Start: These are all $0 so that the screen boundaries for the level start at the start of the level. Make it a larger value if you want there to be hidden level geometry. | |
− | + | X-End: This is the end of the screen boundaries on the x-axis, usually at the end of the level. I'd suggest making it the current x-position of the signpost or egg-capsule plus $A0. | |
− | the | + | Y-Start: This is where the death boundary will be at first. Adjust wisely. If it's greater than $0, than it's likely the Dynamic Level Events adjust this. |
− | + | Y-End: This is the top of the level, where the camera cuts off. This should be self-explanatory. | |
− | + | These all reference X and Y coordinates in the level, respectively. | |
− | + | In Sonic 2, these are easily accessible in ASM format, however if you are modifying S1, it will be a .bin file instead. | |
− | + | Hopefully this helps you understand the basics of this topic. | |
{{S2Howtos}} | {{S2Howtos}} | ||
|{{PAGENAME}}]] | |{{PAGENAME}}]] |
Revision as of 15:08, 21 January 2020
(Original guide by lavagaming1) This was heavily edited by Inferno. In Sonic 2, all acts reference an array which defines starting screen boundaries for the levels. By editing this array, we can resize the initial level boundaries, so let's do that. In s2.asm, search for "LevelSize:" You should see this:
; ===========================================================================
; ----------------------------------------------------------------------------
; LEVEL SIZE ARRAY
; This array defines the screen boundaries for each act in the game.
; ---------------------------------------------------------------------------- ;how long ;is level;makeslev ;up ;dawn
; xstart xend ystart yend ; ZID ; Zone
LevelSize: zoneOrderedTable 2,8 ; WrdArr_LvlSize
zoneTableEntry.w $0, $2FFF, $0, $669 ; EHZ act 1
zoneTableEntry.w $0, $2940, $0, $550 ; EHZ act 2
zoneTableEntry.w $0, $3FFF, $0, $720 ; EHZ act 3
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEntry.w $0, $3FFF, $0, $720 ; wood zone
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEntry.w $0, $3FFF, $0, $720 ; $03
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEntry.w $0, $2280, -$100, $800 ; MTZ act 1
zoneTableEntry.w $0, $1E80, -$100, $800 ; MTZ act 2
zoneTableEntry.w $0, $2A80, -$100, $800 ; MTZ act 3
zoneTableEntry.w $0, $3FFF, -$100, $800
zoneTableEntry.w $0, $3FFF, $0, $720 ; WFZ
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEntry.w $0, $2800, $0, $720 ; HTZ act 1
zoneTableEntry.w $0, $3280, $0, $720 ; HTZ act 2
zoneTableEntry.w $0, $3FFF, $0, $720 ; hidden palce
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEntry.w $0, $3FFF, $0, $720 ; $09
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEntry.w $0, $2F80, $0, $680 ; OOZ act 1
zoneTableEntry.w $0, $2D00, $0, $680 ; OOZ act 2
zoneTableEntry.w $0, $2380, $3C0, $720 ; MCZ act 1
zoneTableEntry.w $0, $3FFF, $60, $720 ; MCZ act 2
zoneTableEntry.w $0, $27A0, $0, $720 ; CNZ act 1
zoneTableEntry.w $0, $2A80, $0, $720 ; CNZ act 2
zoneTableEntry.w $0, $2780, $0, $720 ; CPZ act 1
zoneTableEntry.w $0, $2A80, $0, $720 ; CPZ act 2
zoneTableEntry.w $0, $1000, $C8, $C8 ; DEZ
zoneTableEntry.w $0, $1000, $C8, $C8
zoneTableEntry.w $0, $3380, $0, $720 ; ARZ act 1
zoneTableEntry.w $0, $3FFF, $180, $710 ; ARZ act 2
zoneTableEntry.w $0, $3FFF, $0, $000 ; SCZ
zoneTableEntry.w $0, $3FFF, $0, $720
zoneTableEnd
; ===========================================================================
This is the array. Now, let me explain how this works: X-Start: These are all $0 so that the screen boundaries for the level start at the start of the level. Make it a larger value if you want there to be hidden level geometry. X-End: This is the end of the screen boundaries on the x-axis, usually at the end of the level. I'd suggest making it the current x-position of the signpost or egg-capsule plus $A0. Y-Start: This is where the death boundary will be at first. Adjust wisely. If it's greater than $0, than it's likely the Dynamic Level Events adjust this. Y-End: This is the top of the level, where the camera cuts off. This should be self-explanatory. These all reference X and Y coordinates in the level, respectively. In Sonic 2, these are easily accessible in ASM format, however if you are modifying S1, it will be a .bin file instead. Hopefully this helps you understand the basics of this topic.
|Resize Levels in Sonic 2]]