I’ve looked at the documentation for 30log and I’ve been trying it out and it works really well. However, I am just having some trouble wrapping my head around how to turn the class into an object. (sorry if I sound kinda dumb here)
Like for example, how would I create a display object and giving physics and collision to it? That’s not mentioned on the 30log Wiki.
A 30log class is used to create an instance of a class, which is an object.
That object is a Lua table with functions and fields attached to it.
When creating a object you can also create and manage a display object(s), but that display object(s) is separate and NOT the same as a class instance.
Here is some old code based an older version of 30Log that makes buttons:
This is why I steer folks away from using 30log and other solutions. They don’t add anything of value for basic game development and in fact add several layers of complexity and places where errors can occur.
If you’re making a RPG or other data-intensive game or a game with hierarchical systems then using OOP practices may have value, but most games you’ll make to start don’t need them.
PS - So, for learning sake, playing around with 30log is great, but I don’t think you’ll need it for game dev (at least not to start).
A 30log class is used to create an instance of a class, which is an object.
That object is a Lua table with functions and fields attached to it.
When creating a object you can also create and manage a display object(s), but that display object(s) is separate and NOT the same as a class instance.
Here is some old code based an older version of 30Log that makes buttons:
This is why I steer folks away from using 30log and other solutions. They don’t add anything of value for basic game development and in fact add several layers of complexity and places where errors can occur.
If you’re making a RPG or other data-intensive game or a game with hierarchical systems then using OOP practices may have value, but most games you’ll make to start don’t need them.
PS - So, for learning sake, playing around with 30log is great, but I don’t think you’ll need it for game dev (at least not to start).