Page 1 of 2

Self-hosting Löve2d Environment for Educational Purposes

Posted: Mon Jul 31, 2023 1:12 pm
by nagydani
Hello,
I have just started an open-source project that aims at creating an interactive environment where children (of any age between 6 and 106) can create löve2d games (or other software) on the same computer on which they are going to run them, much like the 8-bit micros of the 1980's. The targeted hardware is something like this.
The point is that the user is going to get a Lua console with the full power of löve2d where they can type Lua statements and launch other software, including an editor for writing Lua code and other programs for creating assets such as graphics and music. Given the interactive nature of the console, it would be possible to try and test parts of the program separately.
We want to develop the graphical console ourselves, but for the rest of the supporting sofware, we would be glad to use something open source that is already available.
I am wondering, if there are already Lua-based editors for graphics and music that we could include?
Also looking for interested collaborators with löve2d experience.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Mon Jul 31, 2023 9:24 pm
by ivan
It is an interesting idea although most children that I know are not going to be interested in learning to use a CLI. Kids like colorful graphics not text terminals.
Regarding your source code - are coming from a language like C++? I noticed your dequeue.lua file which is basically a wrapper of a table. You do not have to wrap your tables, right out of the box Lua tables can already work like arrays/stacks/dequeues/lists/maps/etc.
Also, your terminal doesn't account for UTF8. If you plan on using textinput you should be aware that love.textinput may return UTF8 characters.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 6:01 pm
by zorg
I have dabbled and still am trying to make some music editors, although i'm not sure what exactly do you have in mind regarding this... (GUI? CLI? any specific limitations? if GUI, what kind of interface? if CLI, how complicated should it be? Like the play statement in BASIC?)

Also, some of the listed principles might necessitate rewrites even if you do find open source "software", which usually would be standalone (unless we're talking about libraries instead), and integrating them into your project would probably be just as difficult as making them by scratch.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 7:01 pm
by ddabrahim
I had a similar idea for creating a Love2D powered learning environment for kids to learn game dev and coding. However as I was working on my tools, I have realised it is not possible to run multiple instances of Love2D at the same time. So if you have a sound, level and code editor powered with Love2D as separate tools, it is not possible to run them side by side.

As far as I know, the only solution is that if all the tools are integrated in one Love2D application. As such the best example is Liko-12:
https://liko-12.github.io
It has everything. Code editor, sound editor, level editor. if you want to develop your own tools powered with Love2D to teach kids, it is the best place to start imo.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 7:12 pm
by nagydani
Thanks for the feedback, much appreciated!
ivan wrote: Mon Jul 31, 2023 9:24 pm It is an interesting idea although most children that I know are not going to be interested in learning to use a CLI. Kids like colorful graphics not text terminals.
It will be colorful text and colorful graphics. Hence the division of the screen into a "console" and a "canvas" part, with the latter being a container of not only text but arbitrary graphics. The CLI, however, is important, I think. The bandwidth of typing is orders of magnitude higher than that of picking items from a displayed set and the whole idea is to make the child feel empowered, because that is what ultimately motivates children, I think. But we'll see. I am very open to trying different things.
Regarding your source code - are coming from a language like C++? I noticed your dequeue.lua file which is basically a wrapper of a table. You do not have to wrap your tables, right out of the box Lua tables can already work like arrays/stacks/dequeues/lists/maps/etc.
Indeed, neither of us are very experienced with Lua. Hopefully, as we gain more experience, the code will become more Luaesque. Such suggestions are always very welcome. Thank you!
Also, your terminal doesn't account for UTF8. If you plan on using textinput you should be aware that love.textinput may return UTF8 characters.
Could you please be more specific on this one? It seems to work with UTF8 and it was certainly part of acceptance testing. Where exactly does it not account for UTF8?

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 7:19 pm
by nagydani
ddabrahim wrote: Tue Aug 01, 2023 7:01 pm I had a similar idea for creating a Love2D powered learning environment for kids to learn game dev and coding. However as I was working on my tools, I have realised it is not possible to run multiple instances of Love2D at the same time. So if you have a sound, level and code editor powered with Love2D as separate tools, it is not possible to run them side by side.

As far as I know, the only solution is that if all the tools are integrated in one Love2D application. As such the best example is Liko-12:
https://liko-12.github.io
It has everything. Code editor, sound editor, level editor. if you want to develop your own tools powered with Love2D to teach kids, it is the best place to start imo.
I have looked at Liko-12, but I feel that it is unnecessarily limiting. As for running things side by side, I am not sure what you mean. Could you please elaborate?

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 7:24 pm
by aldum
ivan wrote: Mon Jul 31, 2023 9:24 pm Regarding your source code - are coming from a language like C++? I noticed your dequeue.lua file which is basically a wrapper of a table. You do not have to wrap your tables, right out of the box Lua tables can already work like arrays/stacks/dequeues/lists/maps/etc.
Hi, author the particular snippet here: My main language is Scala, and I dabble with Haskell and similar, I have not touched C++ in 10+ years. The dequeue is indeed a wrapper, that's partly because I was not yet familiar with table best practices when writing that, but the main reason is so that the implementation can be changed (for example if performance reasons make it necessary later) without needing to modify code outside the file, because everything else uses it's interface.
ivan wrote: Mon Jul 31, 2023 9:24 pm Also, your terminal doesn't account for UTF8. If you plan on using textinput you should be aware that love.textinput may return UTF8 characters.
This might not have been merged yet at the time you were looking at it, but it is in fact tested with UTF-8 inputs.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 7:28 pm
by ddabrahim
nagydani wrote:I have looked at Liko-12, but I feel that it is unnecessarily limiting. As for running things side by side, I am not sure what you mean. Could you please elaborate?
Yes, the limitations in Liko-12 are actually very useful to help kids to think within the boundaries. It helps with creativity. If the possibilities are endless, kids can easily get lost in ideas they could never make, at least not at first.

Side by side I mean to run the code editor and the level editor at the same time for example. You simply can not launch the code editor and the level editor if they are running on the same instance of Love2D. At least I think this is what you mean by "self hosting" Love2D, to run your tools on a local instance of Love2D.

Anyway if you integrate all your tools in to a single application like Liko-12, it is not a problem. Or if you package all your tools as an independent application.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Tue Aug 01, 2023 7:28 pm
by nagydani
zorg wrote: Tue Aug 01, 2023 6:01 pm I have dabbled and still am trying to make some music editors, although i'm not sure what exactly do you have in mind regarding this... (GUI? CLI? any specific limitations? if GUI, what kind of interface? if CLI, how complicated should it be? Like the play statement in BASIC?)
I think that these editors should have a GUI, especially the one for graphics. To be honest, I don't know what exactly do I need. Something like the PLAY statement in BASIC would also be nice, but this is not what I had in mind.

How do people currently make music and graphics for their love2d games?
Also, some of the listed principles might necessitate rewrites even if you do find open source "software", which usually would be standalone (unless we're talking about libraries instead), and integrating them into your project would probably be just as difficult as making them by scratch.
Even if that were the case (which it might well be), having something to look at would probably speed up development significantly.

Re: Self-hosting Löve2d Environment for Educational Purposes

Posted: Wed Aug 02, 2023 5:05 am
by zorg
nagydani wrote: Tue Aug 01, 2023 7:28 pm How do people currently make music and graphics for their love2d games?
Most likely using external applications, and there's a lot of those, considering the formats löve supports.
(for audio: wav/mp3/ogg/all formats modplugtracker supports loading/importing)
(for images: jpg,png,bmp,tga,hdr/pic,exr plus compressed(-on-gpu) formats i.e. dxt/bc/etc/eac/pvr/astc variants)