Development Log for Magic Pixel, a game maker using Love2d
Posted: Fri Oct 15, 2021 4:00 pm
Something I'm thinking about, and running it here in case anyone has any ideas/improvements/crits/etc, since this is still in the super meta planning stage. I was messing around with GB Studio, esp the latest version that extends a lot of what it does and adds a more robust event system. Now, in my last few games and engines I've been coding I've been moving more towards a scene based structure, even before messing around with GB Studio. It just felt like a natural, simple way to help me build games.
And I was thinking, after messing around with GB Studio, you could probably easily create a front end that is a scene stack and an object stack (objects being anything really that interactable in game). Each scene then has it's own object stack that pulls from the global object stack, basically you create global objects, and then instantiate them in scenes. Could also have a variable stack for global and scene specific variables, etc for ease of loading/saving game states and editing/accessing them from the IDE itself.
Then, each object, scene, etc has a lua file that run at certain points using hooks. For example, each object can have an update function, draw function, etc. Each scene would also have an update function, draw function, etc. There could be modules that could be attached that would simplify sprite animation, so if the walk_sprite module is loaded and attached to the main player object, they don't have to actually edit the draw routine (unless it does something funky).
The same could be done with adding a Tiled module and attaching it to a scene, and it would then used TIled maps for the background art. I've seen a lot of visual editors created these days with Electron (GB Studio, Yarn, etc) so it might be a good idea to go that route (esp since I do development for web apps at my dayjob).
Of course, there would need to be an engine built that could parse the output of this. Could easily be done with something like Love, I think, with the meta game content stored in JSON files and then loaded into the love environment. This could allow this to be very abstract, and in the future allow for importing of the meta code into other game engines that support it, etc.
Just an idea I'm tooling around with. At this point I want to keep it very meta, and make it as extensible as possible, which needs to be done on the ground floor. After all, the minute any coding gets done the game starts edging away from extensibility and edging towards a more rigid vision...
Anyway, any thoughts, improvements, possible future issues that you think I'm ignoring?
And I was thinking, after messing around with GB Studio, you could probably easily create a front end that is a scene stack and an object stack (objects being anything really that interactable in game). Each scene then has it's own object stack that pulls from the global object stack, basically you create global objects, and then instantiate them in scenes. Could also have a variable stack for global and scene specific variables, etc for ease of loading/saving game states and editing/accessing them from the IDE itself.
Then, each object, scene, etc has a lua file that run at certain points using hooks. For example, each object can have an update function, draw function, etc. Each scene would also have an update function, draw function, etc. There could be modules that could be attached that would simplify sprite animation, so if the walk_sprite module is loaded and attached to the main player object, they don't have to actually edit the draw routine (unless it does something funky).
The same could be done with adding a Tiled module and attaching it to a scene, and it would then used TIled maps for the background art. I've seen a lot of visual editors created these days with Electron (GB Studio, Yarn, etc) so it might be a good idea to go that route (esp since I do development for web apps at my dayjob).
Of course, there would need to be an engine built that could parse the output of this. Could easily be done with something like Love, I think, with the meta game content stored in JSON files and then loaded into the love environment. This could allow this to be very abstract, and in the future allow for importing of the meta code into other game engines that support it, etc.
Just an idea I'm tooling around with. At this point I want to keep it very meta, and make it as extensible as possible, which needs to be done on the ground floor. After all, the minute any coding gets done the game starts edging away from extensibility and edging towards a more rigid vision...
Anyway, any thoughts, improvements, possible future issues that you think I'm ignoring?