Should I release Luvnit?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Should I release Luvnit?

Post by Tjakka5 »

So lately I've been working on some kind of "Mega library" named Luvnit, which has a bunch of stuff to help me develop, and even changes how I program by a lot.

At this points it:
- Adds classes
- Turns love into a Event based system, instead of love.draw you instead add a function to the "_draw" event.
- Adds a few nice to have math functions (Rounding, random bool, clamping, etc).
- Adds a property handler: obj:newProperty("Value", 5) adds a variable _Value with a value of 5, and a set and get function for it.
- Adds a bunch of utility functions (Table copying, simple collision detection).
- Adds a easy to use and flexible timer system.
- Potentially adds auto updating. (If I can get it to work well)
- Potentially adds tweening. (Im currently just adding Flux)
- Adds a full blown GUI library named Clue, which will be released as stand alone also.

At this point, completion is coming near, and Im starting to wonder if I should release it; It does a lot of stuff which would very long to document properly, but if enough people showed interest I'd be willing to do that.

So hereby I ask for your opinion, if you want to see and/or use it, if it's something you're interested in.
I've created some code to showoff how the systems would be used; if you want more examples, feel free to ask:
http://pastebin.com/mR871vuD
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Should I release Luvnit?

Post by Karai17 »

I feel like a lot of this stuff isn't terribly useful, or already exists.

- OOP sucks, ECS is much better for game development, so classes aren't all that useful
- Again, ECS is great for game development, so this isn't necessary
- These are useful as a quick utils module
- This is over-engineered. Why can't you just do obj.Value = 5? Why do you need a get and set? Pointless cruft, really
- Deep table copying would be handy, simple collision detection is already handled by several libraries (HC, Bump, CPML.Intersect, love.physics)
- HUMP.Timer already exists and is quite good
- I don't quite understand this one
- HUMP.Timer handles tweening and has lots of different curves, not just linear
- LOVE doesn't really have any good GUI libraries so I look forward to seeing what you're offering here

You have a few things in here that are handy, but I feel like you went out of your way to over-engineer and do in-house design instead of using tools already available.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: Should I release Luvnit?

Post by Tjakka5 »

Karai17 wrote:I feel like a lot of this stuff isn't terribly useful, or already exists.

-Snip-

You have a few things in here that are handy, but I feel like you went out of your way to over-engineer and do in-house design instead of using tools already available.
You're completely right that I might've over-engineered.
It started with the Class code, and from there I just made it so any other code I made was allowed to use that; which, in my opinion, made for both space and time efficient code; There's a certain kind of synergy between them all.

In repondse to your points:
-I haven't actually looked into ECS, so I dont have a opinion about that. If you refuse to use Classes this would be useless for you.
-The property library is quite nice to have; for me atleast, as I tend to use a lot of gets and sets.
-As for auto updating; it's still something that is in a experimental state, in which Love uses LuaSocket to check for updates on a server, and if there's a update availible, potentially download it.
- GUI stuff, I have been working on this for a lot of time, so I really hope I can satisfy everyone with the stuff it does; Designing a system that feels both good to use, and has efficient code is quite hard.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Should I release Luvnit?

Post by Karai17 »

I highly recommend taking a look at ECS (there is a lua library called tiny-ecs that is very good), it might really change how you code
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Should I release Luvnit?

Post by airstruck »

- OOP sucks, ECS is much better for game development, so classes aren't all that useful
OOP and ECS are not mutually exclusive. I'm sure you'll notice that your ECS library of choice is rather firmly entrenched in OOP mentality, for example. ECS is great for game entities, but that shouldn't preclude anyone from using an OOP approach to anything unrelated to game entities. Events can also co-exist with ECS perfectly well.
- This is over-engineered. Why can't you just do obj.Value = 5? Why do you need a get and set? Pointless cruft, really
You can just do obj.value = 5, rather than obj:setValue(5). That's the point of properties. Properties are not "pointless cruft," they give your APIs an elegant alternative to exposing zillions of get/set functions (which are themselves "pointless cruft" once you have properties). Having properties available lets you use plain fields without having to rework your API when you realize you need to do some validation or manipulation of values when they're set. Whether a particular properties implementation is "over-engineered" depends on that implementation.
Last edited by airstruck on Thu Jun 09, 2016 8:06 pm, edited 1 time in total.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Should I release Luvnit?

Post by Karai17 »

1) I know OOP and ECS are not mutually exclusive, but generally ECS deprecated the "need" for OOP. I don't really think tiny-ecs has an OOP mentality.

2) You are reiterating my point. There is no need to generate get/set functions every time you add a new property to an object. That is wholely pointless. Simply doing things "the Lua way" is far more elegant. obj.Value = 5 is built right into the language, whereas creating a setProperty method and generating a setValue and getValue method is forcefully importing ideologies from Java where they are 1) pointless to begin with, and 2) unnecessary in Lua.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Should I release Luvnit?

Post by airstruck »

Karai17 wrote:I don't really think tiny-ecs has an OOP mentality.
I'm not sure what your idea of OOP is, then. ECS could be done in a functional way, or a procedural way. Tiny does it the OOP way; that should be obvious by taking a quick look at the API docs.

Regarding 2: again, properties are not pointless. You're just missing the point (or possibly misunderstanding properties; there shouldn't be any setValue and getValue methods generated, the point is you can use properties like you use plain fields).
Last edited by airstruck on Thu Jun 09, 2016 8:11 pm, edited 1 time in total.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Should I release Luvnit?

Post by Karai17 »

Properties are not pointless, the functions used to interact with them are. You can just interact with it directly, no need for setters or getters.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

Re: Should I release Luvnit?

Post by airstruck »

See my edit. I don't think you understand what is meant by properties.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Should I release Luvnit?

Post by Karai17 »

Yes, I know, but his library here specifically says that it generates setters and getters for you when you use the setProperty thingy, which I think is pointless.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 119 guests