LBaP! Lesson 6 Overview
Lesson 6: The Platformer+ Plugin
Get ready for a BIG lesson this time around! We will be expanding the player move-set using Hauntology's Platformer+ Plugin and Pau-tomas' Player Fields Plugin as well as exploring all sorts of other topics as we work towards completing the 'Tutorial' scene of the game.
Slopes support has been dropped because the slopes checks in the engine are taking up too much CPU power in Monochrome/DMG Mode and I would rather prioritize the inclusion of projectile based particle effects and other more CPU intensive tutorials. The 'Slopes Option' in the games option menu is now an option to toggle between two dash inputs (double tap D-pad direction or 'B').
The following concepts are explored in the lesson:
- Platformer+ Plugin
- Attaching Scripts to P+ States
- Assigning Animations to Player Moves
- Actor Based One Way Platforms
- Locking the Camera View Along an Axis
- Player Field Plugin
- Updating Engine Fields
- Projectile Based Particle Effects
- Tile Swapping
- Prefab Actors
---
Directions:
Because Lesson 6 expands on the 'Tutorial' scene first built in Lesson 5, I have collapsed all comments pertaining to Lesson 5 within the actors, triggers and the 'On Init' script of the Tutorial Scene so that the comments written for Lesson 6 are more prominent.
1. Play through the Lesson 6 ROM (either by playing the web browser version on the itch page or by opening game.gb in the projects build folder) to familiarize yourself with what has been edited and added to the project.
2. Read through this Devlog Overview, which will introduce some of the more complex concepts covered in this lesson.
3. Jump into the Lesson 6 project file. There are some newly created animation states to look over:
- The player.png animation states
- Expanded on to suit a more varied player move-set thanks to P+.
- The effects.png animation states
- Used to create a dash particle effect as well as an "item collected" particle effect using projectiles.
- The log.png animation state
- A newly created collectible.
The following is a list of where to find the newly added comments in the project file and the concepts covered in each comment:
- The 'On Init' script of the 'Tutorial' scene
- Fixing the "head bonk" problem
- A note on background parallax
- The Platformer+ plugin
- Tile swapping
- Locking the camera horizontally in a platformer scene
- The 'P+ States' custom script
- Attaching scripts to the Platformer+ states
- Using projectiles to create particle effects
- Attaching SFX to P+ states to improve "game feel"
- Adding a 'jump out of dash' mechanic
- Pau-Tomas' Player Fields plugin
- Precise control over player animation states
- Editing engine fields
- The 'Log' prefab actor(s) 'On Hit' and 'On Init' scripts (located in the 'Tutorial' scene)
- Prefab actors
- The benefits of using flags to track boolean (true or false) states
- 'What' vs. 'how many' (flags vs. values)
- Launch projectile presets
- An important note on hidden actors
- The 'One Way Platform 1 & 2' actors (located at (4,12) in the 'Tutorial' scene)
- Creating one-way platforms using actors (P+)
- Changing collision bounding boxes (or hitboxes)
- The triggers associated with Gardener Greg (located at (29,17) & (89,17) in the 'Tutorial' scene)
- Calling variables in character dialogue
Below is a list of assets added to the project and some that have been edited. Have a look through the projects folder directory and explore these assets.
---
A Variant Platformer+ Plugin!
Hauntology's Platformer+ Plugin is a complex and detailed one. For more information on its many facets, I highly recommend you read through the plugins documentation.
A while back, I commissioned Canight to solve a problem I was having with GBS's platformer engine - one that I mentioned in Lesson 5. The player character would snap to a one way platform when approaching from below, making it look like the character teleports up to 4 pixels. It doesn't sound like much, but it can cause all sorts of issues when applying ideas to various level design set ups and it looks especially strange when the player character is relatively small.
To solve this, Canight (who also extensively contributed to the GBS Slopes inititiative that would later add slopes to GBS 3.2) made some edits to the Platformer+ Plugin engine and added a new feature.
The 'One-way Platform Snap Threshold' setting allows you to edit how far away the player character is before snapping to a one-way platform in pixels.
The new 'One-way Platform Snap Threshold (pixels)' setting can be found at the bottom of the Platformer Plus Engine Settings in the Project Settings.
I have been using this version of Platformer+ since I started working on the now released Super Dassalo Land. In fact, it was designing levels for SDL that pushed me to spend some cash to solve this problem as too many level design setups were not working as well as they should for a game that required a high level of polish. This small, but important addition to P+ hasn't been shared publicly. I thought now would be a perfect opportunity to share it, so that others can open up more possibilities with their own level design setups.
To use this version of P+ in your own projects, simply copy and paste the 'PlatformePlus' plugin from the Lesson 6 LBaP! project directory and add it to your own project.*
*Please Note: This variant P+ plugin is an edit to Platformer+ 1.7 and DOES NOT support slopes currently. I did attempt to add this new setting to the V2-Alpha slopes version of P+ but have not been successful yet (This also contributed to my decision to drop the slopes in this course as its already taking a long time to make these lessons).
---
Additional Assets
The following files have been added to the asset directory:
/assets/backgrounds/levels
- home town.png
/assets/sprites
- effects.png
/assets/sprites/level_1
- log.png
/assets/sprites/title_screen
- dash_controls.png
/assets/tilesets
- tileset 1.png
The following files have been edited in the asset directory:
/assets/fonts
- gumpy_var.png (added button input GFX to special characters in Ascii sheet for use in dialogue boxes)
- gumpy_var_inverse.png (added button input GFX to special characters in Ascii sheet for use in dialogue boxes
/assets/sprites
- player.png (added extra animations states for use with P+)
---
Additional Custom Scripts
The following custom scripts have been added to the project:
- Player/P+ States
- SFX/Item/Collect
- SFX/Player/Dash
---
Additional Prefabs
The following Actor Prefabs have been added to the project:
- Dpad Up
- Log
---
Conclusion
This lesson has taken a long time to create as the P+ plugin adds a lot of complexity to a game. Now that we have gone over P+ and in the interest of keeping things moving to provide a more flowing stream of tutorials, Each lesson will now tackle a relatively smaller amount of concepts.
In the next lesson, we will add a Heads Up Display (HUD) to the game, looking at ways to provide information to the player as they progress through the LBaP! game.
Because of additions such as the Platformer+ plugin and projectile based particle effects, both of which are asking a lot of the Game Boys processing power, you will find the CPU is starting to buckle under the pressure in Monochrome Mode and the frame rate is taking a considerable hit as a result. In the interest of exploring as much as we can in this course, we will be switching to Color Mode to relieve this pressure in the next lesson, too.
Until next time, happy coding!
- Tom (Gumpy Function)
Files
Get Let's Build a Platformer!
Let's Build a Platformer!
A comprehensive course for GB Studio 4+
Status | Released |
Author | Gumpy Function |
Genre | Educational |
Tags | Game Boy, Game Boy ROM, gbstudio, Tutorial |
More posts
- LBaP! Translations & Additional "Follow-Along" Docs6 days ago
- LBaP! Lesson 5 Overview46 days ago
- LBaP! Lesson 4 Overview55 days ago
- LBaP! Lesson 3 Overview63 days ago
- LBaP! Lesson 2 Overview76 days ago
- LBaP! Lesson 1 Overview78 days ago
Comments
Log in with itch.io to leave a comment.
I am so excited for this omg!!! I wanted to make a platformer so badly and was really needing something like this!! Thank you so much for making this!
My pleasure! Good to hear it will help.