quickHub.lua is an easy-to-use API that generates an entire hub level and allows for quick gameplay of multiple levels through the editor. It also supports hubs through the normal engine as episodes, however a .wld file must be added with the hub level as the start. It also allows for some customisable features, more of which will be made available in the future. Pretty much all that you need is a player start position and a list of levels, then quickHub.lua does the rest! Shout-out to Horikawa who wrote the level loading script for Mario Challenge which is also used in this.
The download includes all of the needed assets plus a test world which can be played through the editor or the normal engine as a world.
How to use in 10 easy steps: show
How to use other customisable features: show - quickHub.levelNamesList
- Allows for levels to be named differently than their original filenames.
- Desired names can be listed in a table as strings and their positions in the table MUST correspond to those in quickHub.levelsList.
- Example:
Code: Select all
quickHub.levelNamesList = {[1] = "Dungeonous Gold Crab", [3] = "Pear Tree Snow Land"};
- quickHub.powerups:
- Allows for the player to collect power-ups at the beginning of the hub each time they enter it.
- The following are the values it accepts:
- Mushroom: 2 or POWERUP_MUSHROOM
- Fire flower: 3 or POWERUP_FIREFLOWER
- Leaf: 4 or POWERUP_LEAF
- Tanooki: 5 or POWERUP_TANOOKI
- Hammer suit: 6 or POWERUP_HAMMER
- Ice flower: 7 or POWERUP_ICEFLOWER
- Example:
- quickHub.items
- Similar to quickHub.powerups except instead it accepts items that the player can collect at the beginning of the hub each time they enter it.
- The following are the values it accepts:
- Yoshi: 1 or ITEM_YOSHI
- Green boot: 2 or ITEM_GREENBOOT
- Red boot: 3 or ITEM_REDBOOT
- Blue boot: 4 or ITEM_BLUEBOOT
- Example:
- quickHub.musicPath
- Sets the music for the hub.
- By default this is:
Code: Select all
quickHub.musicPath = Misc.resolveFile("quickHub/default-music.mp3");
- quickHub.doorImg
- Sets the image used for the door in the hub (at this time must be 32x64).
- By default this is:
Code: Select all
quickHub.doorImg = Graphics.loadImage(Misc.resolveFile("quickHub/background-92.png"));
Download: https://www.dropbox.com/s/qvanoeb0s5o0y ... a.zip?dl=0
Please tell me what you think and give me some ideas of what I should add to it, as well as mention any issues you find with it. Enjoy!