Weapon switching logic
I'm working to add weapon switching to the player script. A weapon in the map consists of two important parts. First, you need a pickup weapon that tells the player they have a certain item. Second, you need the visual weapon that is displayed onscreen, along with the various settings that make that weapon unique.
It's a simple thing to program, but I'm trying to make it as easy as possible for the user to manage, so people can add new weapons and have them work with no tinkering and adjustment required. Usually that means trying a few different approaches and then deciding which is best.
I like working on high-level stuff like this. Having a good shotgun blast is very satisfying, and makes my map suddenly feel like a "real" game. (I used the new sprite entity to make the visible pellets.) This kind of stuff is why I got into game development, and I hope to work on more practical and fun things like this over the next year. I want Leadwerks to be an extremely high-level system, but to have the ability to drill down to the next layer when you need to. More pre-made reusable functionality you can use or modify to your heart's content.
- 2
3 Comments
Recommended Comments