This library adds the "fake wall" effect from New Super Mario Bros. Wii to SMBX. In this effect, there were non-solid blocks. While the player was in contact with these blocks, a circular effect appeared allowing him/her to see through them.
Requires imagic.lua which is only included in SMBX2, and colliders.lua which is already included in LunaLua
The library can be downloaded here.
Once you have downloaded the zip, place its contents in either your level's custom graphics folder for use in a level, along with a lunadll.lua file, or in the same directory as your .wld file along with a lunaworld.lua file for use throughout an entire episode.
Adding to your level
To use this in a level or episode, add this line to the top of your lunadll.lua file:
This library functions automatically once loaded. Please note that PNG graphics are needed for this to work.
The effect layer
To make the effect work, simply create a new layer in your level named "nsmbwalls". Place all of the "fake blocks" that you want to use on this layer, then hide the layer. Note that all non-block objects on this layer will be ignored. PGE wasn't designed for this, and this can lead to difficulty in use. The best way the creator found for using this was to:
- Place all the solid blocks in the area where you wish to use the effect.
- Copy these blocks and paste them to a different area, then activate overwrite mode.
- Switch to the nsmbwalls layer and place the desired fake blocks on top of your copied blocks.
- Hide the nsmbwalls layer and delete all other copied blocks.
- Show the nsmbwalls layer, move your blocks to the desired position, then hide the layer again.
Dummy block images
If the library is unable to load a block image, the dummy block image from PGE will be rendered. This most likely indicates that a PNG graphic could not be found. Gifs2png can be used to easily convert the masked .GIF images used in vanilla SMBX into .PNG format.
- Heavy use of the effect layer may cause a decrease in performance. The draw load can be lightened by creating a larger block with a tiled texture from a filler block and replacing as many filler blocks with it as possible.
- PGE doesn't have direct support for this. Once the PGE Plugin System is fully implemented, it is planned to add a plugin that will make this easier to use.
- In 2-player mode, the circle effect resizes more rapidly than in 1-player mode. This can cause strange behavior when entering warp pipes.