What is a "Good plugin"?

Most of the plugins I use are ones I’ve made myself. It started as a way to duplicate the Maaack Godot Game Template - which was being used a lot in Godot Wild Jam. I took a look at it, and I found the code to be overly clever and obfuscated for no particular reason. It was closely coupled, and hard to modify. So I decided to make my own.

This resulted initially in my own Game Template Plugin. Over time, I ended up splitting that into a number of smaller plugins.

  • Controller to handle mouse/keyboard and gamepad functionality, such as supporting 3rd- and 1st-person looking in 3D, and finding the appropriate icon for an action based on the last input used by the player.
  • Disk which handles saving and loading both game settings and game data.
  • Display to encompass all the display settings a game has like full screen, multiple monitor support, and changing screensresolution.
  • Sound because initially you couldn’t access metadata in songs, and so I made a Song resource to store that info. I also wanted to create a central place to play sounds from. I’ve since gotten rid of the custom resource and implemented what Godot supports. I’ve also learned that the Godot way is better - having AudioStreamPlayers all over the place. However, there are a few benefits of centralized sound, such as a way to change volume levels. And a way to manage a game music player and a pause menu music player. Plus a way to fade music in, out and crossfade music.
  • State Machine is a pull state machine that is used for many different things. It is simple and easy to use, and as lightweight as I can make it.
  • User Interface is a piece that took the longest to pull out. I moved each of the menus into the plugin that manages that area of the game. And User Interface contains a Screen node and a Splash Screen node. The UI plugin handles managing which screen is displayed and hiding all the others.

Over time, I have also made a number of other plugins to use. They’re all what I need, and if they help other people - great. But I use them over and over in multiple projects. I document so that I will remember how to use them later.

  • Character3D is something I’m working on revamping right now. It’s a 3D character controller that uses examples with KayKit models.
  • Camera3D is a plugin for handling multiple supported 3D camera views for a player, switching between them, and supporting 3rd person and 1st person views.
  • Camera2D ended up being very different from Camera3D, in that it is a collection of components that modify a standard Camera2D when added as child nodes to it. In that way you can stack them and even add and remove them during gameplay. One automatically limits the camera to a TileMapLayer - something I need with almost every2D game. Others handle things like panning, zooming, etc for the various input types including touch screens.
  • CurvedTerrain2D simply encapsulates a single piece of functionality, which is making curved terrain for 2D platformers when all you have is blocks.
  • ChibiAnimatedSprite2D handles importing and setting up sprite frames for CraftPix’s Chibi Sprites Collection. Automating an otherwise tedious and time-consuming process. It also saves space by only reading in animations that are provided.
  • Localization just adds a localization drop-down menu with a number of size and display options. It includes flag icons and works seamlessly with Godot’s localization support. The whole thing, while very simple, makes it VERY easy to localize a game.

Every plugin - even the ones that are interdependent, are made as atomic as possible. So while all the Game Template plugins work with the Localization plugin, nothing breaks if it is not used. When a plugin does require another plugin - I add that information to the readme and include it as part of the repo. In fact, it is this dependency of plugins that has kept me from putting my plugins up in the Godot AssetLib.


As for what I think makes an plugin good: it has a specific use, it does what it says it does, it is well-documented, easy to use, and does not cause problems with existing code in projects that it is added to.

5 Likes