Development Log for Magic Pixel, a game maker using Love2d

Showcase your libraries, tools and other projects that help your fellow love users.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

Hmm, messing around with the plugin architecture and the event coding...

And I think the start of this tool might be better as a meta-editing environment, that is extensible through plugins for various kinds of games, and not just straight up JRPG's right away. It's very doable, and will def let me get it up to usable state for github and itch (not final state, basically beta...enough to make games, but not final in any way). I was thinking the actual scene/map/level editor is basic enough it can work in any number of games, and if plugins can control those bits, it can support all sorts of styles (platform, jrpg, western rpg, etc) through the plugin interface.

I just need to create a good meta-data table style editor, maybe something like Gridless, where you can store group typed variables in a visual way that's object oriented. In the end, the editor can than be "changed" to support all sorts of games, just by dropping in the right plugin. Chrono Trigger style game, plugin installed, enemies table etc, and a combat that is on the same map, including "enemy" event types. Dragon Quest style game plugin installed, enemy table, weapons table, and a table of backgrounds for random combat.

I need to sketch out how this will work, I have a really good idea right now. I just have to hammer down the fiddly bits
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

Spent the holidays off refactoring the code and optimizing some of it, as well as simplifying the UX and UI and making it so it's more intuitive for people to use, esp when it comes to creating sprite objects and events. Here's me messing around in the sprite object editor
Screen Shot 2021-11-26 at 10.56.51 AM.png
Screen Shot 2021-11-26 at 10.56.51 AM.png (200.19 KiB) Viewed 6785 times
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

(ignore the 162, 167, was just debugging some mouse code)
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

I'm thinking about using this

https://love2d.org/forums/viewtopic.php?t=89025

For allowing in editor code editing, just to make some editing simple and similar to Pico 8 (but also allowing people to edit outside of it). This would be for Cutscene scripting, or object scripting (but not plugin scripting). Hmmm

It could be very interesting.
User avatar
Gunroar:Cannon()
Party member
Posts: 1085
Joined: Thu Dec 10, 2020 1:57 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by Gunroar:Cannon() »

Dang, this is really picking up. It's no longer "some thoughts", more like "GB studio like devlog" or something since it's actually something now and not just a dream :ultrashocked: Nice!
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

Haha, yes, I was just thinking "maybe I should start a different thread with something more like "Magic Pixel devlog" or something! Dunno if I mentioned it earlier, but I decided to go with Magic Pixel as the name of the editor and engine.

Oh, speaking of which, I made a rough logo and bought some webspace, nothing there yet, but I like the logo.

http://magicpixel.org/
User avatar
Hugues Ross
Citizen
Posts: 85
Joined: Fri Oct 22, 2021 9:18 pm
Location: Quebec
Contact:

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by Hugues Ross »

This is definitely going somewhere interesting!

One thing I'd note though--I've noticed over the weeks that your project's scope has been expanding pretty rapidly. That's not necessarily a bad thing, but if you want the project to succeed it may help to pin down short-term and long-term goals and figure out the minimum needed to reach the former.

Obviously, this is a personal project and it's up to you to decide how you want to run it. If you're just coding this for fun, it may not be a big deal whether you ship or not! But I've seen enough game engine projects spiral out of control and die from early scope creep (including my own projects on occasion) that I feel like I ought to at least point it out.
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

Naw, I know exactly what I'm doing with some of these ideas.

For example, the meta-tool idea combined with plugins actually creates a smaller scope for me as a coder- I know how to create plugin architectures that are very versatile and powerful, and I've already got one built here that works and is in the editor and engine. It was built from the ground up to support this- so, in one way you could say that this would be feature creep, but in other you could look at it the opposite way-

To get the first beta out, it's actually going to have less features built in *because* there won't be a JRPG combat engine hard coded in, nor any of the other "things" that would limit it. Now, of course, for people who have 0 experience Lua coding, and want to add combat to their game using the Magic Pixel Editor, this is less than ideal.

But that's why the next items I'm doing after the beta release will be a basic combat system plugin (and an example game), for something like DW/DQ style game. This will give people who have no knowledge of code a base to work off of, and it will allow people who do know how to code the ability to create their own custom combat engine, whether it's real time, Chrono Trigger same map style ATB, etc.

(basically this boils down to combat in an RPG being basically actions modify statistics, from there the rest is just a skin laid overtop).

If you mean adding in the code editor- yeah that's a "maybe". I haven't merged that into the code yet, and I might not do that. The nice thing is, because of the way I'm building it, I can add the rest of the stuff in later. I'm just making sure I'm leaving things open for that ability. Flexibility, at this point is important. That way, when it's down to a release, I can withold and add other stuff later (or, since it's open source, other people can).

The in engine code editor is one of those "would be nice, but not necessary". The visual code editor (like what GB Studio uses or RPGMaker) will have to be added in *eventually*, since that's what people expect in a tool like this. But I figure the first few release builds it won't have those, and will have lua scripting for plugins and event scripts/cut scene scripting. Then eventually it might incorporeate something like Yarn (which I already built a lua library for parsing that) or inkscript (I know someone else did, it would be just a matter of mapping it onto this system)
pauljessup
Party member
Posts: 355
Joined: Wed Jul 03, 2013 4:06 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by pauljessup »

LOL yeah, eventually this will be moved to a different thread, since it's gone beyond just a few thoughts, lol. I ended up refactoring and streamlining how it was handling sprite objects and in game entities, to make it more powerful on the user end. And, for those of us who know Lua, being able to create new entity types through a plugin just got super easy, thanks to the plugin system.

Basically, a plugin is a table returned from a file, with several specific functions. The function names follow this pattern- everything has an init, an update, and a draw. To specify, let's say a certain entity type you would just name the function-

entitynameDraw=function(etc)

or

entityNameUpdate=function(etc)

the same with layer names, map names, scene names, etc. That will give the plugin designer some really powerful and yet simple controls for creating their own building blocks in system...

A bit of code from a plugin file (this is all working in the editor and engine, not just theoretical code)

This is all found in the base plugin directory, in a file called static, which is the entity type. It's a non-walking, static animation object

Code: Select all


return {
            --installs the plugin            
            install=function(self)
            --these register the basic entity type
                plugins:registerEntityType("static")
            end,

            staticCreate=function(self, data)
                data.anims=1
                data.anim_type=static
                sprites:create(data)
            end,

            staticCollide=function(self, data)
                --what happens when we collide with something
            end,

            staticUpdate=function(self, me)
                --for static we animate it, if it needs to be animated.
                me.anim_counter=me.anim_counter+0.3
                --tweak this later in case it's too fast.
                if(me.anim_counter>1.5) then
                    me.anim_counter=0
                    me.frame_at=me.frame_at+1
                    if(me.frame_at>#me.frames) then me.frame_at=1 end
                end
            end,

	  --this uses the cameras and the map offsets while drawing
            staticMapDraw=function(self, me)
                sprites:draw(me, 1, true)
            end,

	   --this just draws directly to the screen at x/y
            staticDraw=function(self, me)
                sprites:draw(me, 1)
            end,

}
And that refactored/streamlined entity editor
Screen Shot 2021-11-30 at 11.10.46 AM.png
Screen Shot 2021-11-30 at 11.10.46 AM.png (170.58 KiB) Viewed 6145 times
Screen Shot 2021-11-30 at 11.10.29 AM.png
Screen Shot 2021-11-30 at 11.10.29 AM.png (310.11 KiB) Viewed 6145 times
Screen Shot 2021-11-30 at 11.46.54 AM.png
Screen Shot 2021-11-30 at 11.46.54 AM.png (143.8 KiB) Viewed 6145 times
Last edited by pauljessup on Tue Nov 30, 2021 4:49 pm, edited 1 time in total.
User avatar
Gunroar:Cannon()
Party member
Posts: 1085
Joined: Thu Dec 10, 2020 1:57 am

Re: Some thoughts on a GB Studio style development environment for Love and Lua...

Post by Gunroar:Cannon() »

Maybe you could just rename the thread?
Last edited by Gunroar:Cannon() on Wed Dec 01, 2021 8:39 am, edited 1 time in total.
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests