Closed ghost closed 10 months ago
my 2 shekels: i'd remove the plugin system altogether. if a game author needs functionality that cannot be provided by the vanilla engine, he can request the lacking functionality here directly.
@rofl0r while many of the things that were implemented as plugins prior to AGS becoming open-source are within the scope of the engine, not all plugins are appropriate for inclusion in the engine's codebase. Namely, AGSteam (Steam API), AGSGalaxy (GOG Galaxy API), and ags2clientstub (stub for both AGSteam and AGSGalaxy) should not be merged into the engine, IMO. It represents an entirely separate array of issues if there are changes in the Steam or Galaxy APIs which I feel go well beyond the scope of the engine developers/maintainers.
Granted, that's just one very specific example, but in order for those plugins to function, there has to be some interoperability between the game engine and the external API libraries. These plugins don't need much functionality directly from the engine (primarily just access to the game loop and key press events (game loop is simulated by the final screen draw event), but the game scripts have to be able to call arbitrary code to set achievements or get leaderboard info, for example.
I shall close this, as the issue is stalling. It was really just a rough starting draft. Some things mentioned in the ticket have been accomplished, others are planned and have their respective issues opened or recorded in wiki, few things are maybe not interesting anymore.
Following is a rough outline of the major things that need to be rewritten/refactored in AGS 4.0. The purpose of this list is to bring attention to significant issues.
Other ideas could be added in comments. But if something is not mentioned here that does not mean you cannot refactor it.
If you are currently planning on starting refactor over a (relatively) large piece of code, please either comment below or open an issue to let other devepers know. Please, do not hesitate to ask questions, or discuss better course of code change, AGS code is rather twisted one, and we'd want to go into one direction when cleaning it out.
Plugin API
Script API
Game objects
Code structure