Banner
The Questionable Level Design Contest ends in…
19 DAYS, 11 HOURS, 9 MINUTES AND 57 SECONDS
Views: 913,016,919
Time:
14 users online: CONLUSH666, Darolac, ExONightZ, Ezel, Friday_D0nat, Jmenig, katun24,  MarioFanGamer, Para_0, qantuum, Renegade763, Segment1Zone2,  Tahixham, WhiteYoshiEgg - Guests: 45 - Bots: 72 Users: 51,132 (2,208 active)
Latest: JoeyDude
Tip: If you make a change to your ROM that you regret, just go to File > Restore > Restore ROM to Previous State in the menu. From there, you can select a restore point and revert your ROM to a previous state.
Not logged in.
Details for Pressure Switch + Gate
SMW Sprites - Pressure Switch + Gate Link - Show random
File Name: Pressure Switch + Gate
Added:
Authors: JamesD28
Tool: PIXI
Type: Standard
Dynamic: No
Disassembly: No
Includes GFX: Yes
Description: This is a pair of sprites: A Switch that can be pressed down by standing on it, and a Gate, that will open when a linked Switch is pressed. You can link Switches and Gates together by giving them the same value in extra byte 1 (allowing you to have one Switch open several Gates, or several Switches open one Gate, or any combination). You can also set timers for how long the Gates stay open (including forever), the manner in which they close, the Gate size, and several other Gate and Switch behaviours.

Usage notes:
- The Gate must be inserted as the very next number after the Switch in PIXI's list.
- The Gates do NOT interact with sprites, nor do the Switches.
- Tile priority should be enabled on tiles that the Gates can overlap with when opening, to ensure the Gate goes behind.
- The "Clipping.asm" file should be inserted in PIXI's "routines" folder.
- The Switch and Gate each take a sprite slot. Considering SA-1 might be a good idea if you plan to make a level based around these sprites.
Tags: gates, lorom, sa-1, switch
Rating: No rating
Download: Download - 25.52 KiB
149 downloads
Screenshots
Previous 
 Next
MarioSonic4life
Reminds me of the gates from Sandopolis Zone Act 2 in Sonic 3 & Knuckles
Posted by: MarioSonic4life - | Link
HammerBrother
Originally posted by KevinM
- The switch tends to "suck you in" as soon as you touch it, no matter if you're already on a solid block/sprite. This can lead to easily dying if a solid block is placed right by the side of the red switch, so try not to do that.


One easy fix is simply checking if the player is on the ground using $77 (assuming the sprite code runs BEFORE clearing $77), then disconnect the player off the switch. I think SMW's platforms does this or at the very least have the hitbox that would snap the player onto the platform be small enough so that even a few pixels off the platform causes the player to disconnect (around 4 pixels extending from the top of the platform?).

Edit, most of SMW solid sprites like platforms and solid block sprites like the message block and light switch checks $77:


The closest sprite to this that don't have this suction bug is the stationary reusable switch.
Posted by: HammerBrother - | Link
KevinM
Tested with: Lunar Magic 3.21, PIXI 1.32, SA-1 1.32, Snes9x 1.60. The sprite works fine, so accepted. Some minor issues I've found:
- The button seems to be 1 pixel lower than it should. This is more noticeable when the red switch is directly on the ground, and it'll cause Mario to sink 1 pixel into the ground when pressed (no big deal though).
- The switch tends to "suck you in" as soon as you touch it, no matter if you're already on a solid block/sprite. This can lead to easily dying if a solid block is placed right by the side of the red switch, so try not to do that.
- If you jump on the bottom of a gate while it's moving down, you can easily clip through the sprite and die crushed.
- If you jump on a Springboard to the bottom of a gate, you'll clip through it and die crushed (even if it's not moving), due to the high vertical speed a spring gives you.
- The horizontal gates won't carry Mario while moving, so he'll "slide" while on them.
Overall a very nice sprite that would be certainly useful for puzzles or timed challenges.
Posted by:  KevinM - | Link
JamesD28
Originally posted by Anas
Very cool! Though instead of having to set the priority of Map16 tiles on, why not make the gate itself go behind the tiles, assuming the gate is a whole sprite?

This is how it was originally, but setting a lower priority also makes it go behind some layer 2 features (such as the distant clouds in the "star" BG).
Posted by:  JamesD28 - | Link
Anas
Very cool! Though instead of having to set the priority of Map16 tiles on, why not make the gate itself go behind the tiles, assuming the gate is a whole sprite?
Posted by: Anas - | Link
HammerBrother
Suggestions:

-I was thinking the switches can be 16x16 instead of 32x32, like these (including the base of those switches).

-I was thinking the gates to shorten so that the spot where it retracts to does not start extending on the opposite side.

-I was thinking the horizontal gates can also open to the right, and vertical opens downwards.
Posted by: HammerBrother - | Link
quietmason
wow, super cool!
Posted by: quietmason - | Link

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks