Boo-boos and Blunders Bared
As you likely figured from the title, adding a second level exposed a boatload of not-so smart design and implementation moves.
For starters, placing a dozen enemies on the second level revealed that having all enemies do pathfinding in the same frame is a recipe for poor frame rate. I answered this by tracking the set of enemies and staggering their pathfinding. This way, only one enemy per frame is doing that expensive operation.
Another "DOH!" came in carrying the set of weapons and ammo from one level to the next. In order to keep the weapons from disappearing when a new level was loaded, I had to, for each weapon
- save the position and orientation info relative to the player in a static set structure
- uncouple the weapon from the player, so that DontDestroyOnLoad() will take effect on it
- upon starting the next scene, reattach the weapon to the player, and
- Apply those "local transformation" data so that the weapon manifests as being physically with the player.
Finally, I hadn't properly dealt with the mouse handling, meaning that the user had to rely on the computer's window-management system to close the program. I answered this by toggling the "cursor lock" setting with the Escape key
Files
Get TBD FPS
TBD FPS
FPS proof-of-concept
Status | Prototype |
Author | fljohnson3 |
Genre | Shooter |
Tags | demo, FPS, proof-of-concept |
More posts
- Falling into SPAAAAACE!Jul 10, 2022
- Notes on Level DesignJul 10, 2022
- Like "Home Improvement", MORE POWER(ups)!Jun 17, 2022
- GenesisMay 24, 2022
Leave a comment
Log in with itch.io to leave a comment.