Object systems or LÖVE should have one

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Object systems or LÖVE should have one

Post by Lafolie »

Hexenhammer wrote: Lua actually makes many decisions for you and forces a pretty immutable structure on you.
This is not true, T-Bone even demonstrated this:
vrld wrote:
A fundamental concept in the design of Lua is to provide meta-mechanisms for implementing features, instead of providing a host of features directly in the language.
I cannot perceive of how you could make such a statement when Lua tables are one of the most mutable data structures around. In fact, they're so mutable that one of the first things people learn in Lua is that there are several ways to iterate through them, depending on the chosen format.
Hexenhammer wrote: It only feels "free form" compared to something like Java. If you want "freedom" look at Forth, LISP or C.
That's a largely subjective statement. For many Lua offers freedom in liberation from lower level necessities and clean abstractions.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

Re: Object systems or LÖVE should have one

Post by Hexenhammer »

T-Bone wrote: I didn't miss the part where you said it should be an optional component. How could I choose not to use it if it wasn't optional? :huh:
I thought you meant you wouldn't use LÖVE if it came with an optional class system.
User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

Re: Object systems or LÖVE should have one

Post by Hexenhammer »

Lafolie wrote:
Hexenhammer wrote: Lua actually makes many decisions for you and forces a pretty immutable structure on you.
This is not true
It is ^^
In fact, they're so mutable that one of the first things people learn in Lua is that there are several ways to iterate through them, depending on the chosen format.
Let us talk again in a few years maybe.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Object systems or LÖVE should have one

Post by Lafolie »

I fear that you forget yourself, and that you also forget the very words you just read (assuming you are not so foolish). I cited vrld's citation which clearly states that this is not the case.

There will be no built-in class system in love. Others have lost this pointless battle before you clicked the create topic button.

Furthermore, you should not be so dismissive of those who argue for your own sake. Listen to reason, it is the way forward.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
LuaWeaver
Party member
Posts: 183
Joined: Wed Mar 02, 2011 11:15 pm
Location: Ohio, USA

Re: Object systems or LÖVE should have one

Post by LuaWeaver »

Plu wrote:When I ran my first project in LÖVE, I included the 30log library, which literally took like 5 minutes to find, include and use.

But it's not even required... my current project uses even less class based stuff and I'm just using pure Lua and some tables to get things working. I like the freedom it gives. Personally I think that letting people figure out everything for themselves except the stuff that´s both slow and really complicated and basic is a good choice. It makes LÖVE an excellent choice for people who want to really learn how to build games.

As nice as it is if someone has pre-chewed everything, you won't actually learn anything. Building your own simple object class in a few hours teaches you more about object design than working with an existing library for a few weeks. Actually building a platform game starting with your own physics implementation teaches you a lot more than just clicking on together in gamemaker.

I find LÖVE to be incredibly educational, and that's a trait you don't see in many modern languages. It almost seems designed to teach you by letting you fiddle around, where other languages and programs teach you by making you sit through weeks of tutorials to show you every button and every little thing someone else has already built for you before you can actually try to mess around with it.

For many other languages, learning them is a chore. Learning to use LÖVE is a fun game in itself.
This is a statement I totally agree with. A few years ago, I was still am just a naive kid who wants to make a game, but I've grown and developed so much with this. In an embarrassing failure, I made this. I didn't even understand what OOP was at the time! I struggled to make a connect four game for a while and gave up and now I have about a dozen half finished projects lying about on my computer.

But you know what? I've grown a lot. When I came here, I knew very little, and this engine has seriously helped me. I've now read PiL twice and can say I understand all of it, which is something I wouldn't have been able to do without this engine.

This is to counter the arguments of saying that getting those newbies who don't know anything about programming (yet) shouldn't be here - rather, we should welcome them with open arms and help them. There is no way I would've stayed if the community hadn't been so helpful at the time. Hell, if this community had been rude to me, I probably wouldn't even be programming right now - which is my plan for life. I might be getting an internship at the Cleveland Clinic as a programmer at the age of 14, which just goes to show that being nice to a stranger over the internet can actually change a life for a young person.
"your actions cause me to infer your ego is the size of three houses" -finley
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Object systems or LÖVE should have one

Post by Karai17 »

tl;dr use hump.class and get over it.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: Object systems or LÖVE should have one

Post by qaisjp »

Karai17 wrote:tl;dr use hump.class and get over it.
tl;dr use middleclass and get over it.

point is, any class system is useful. but why should love have one when the lua doesn't have one?

1. It's useful.
2. You don't HAVE to use it. (unless it was mentioned somewhere in here that love.*.* should use oop)

if love would use object libraries/class, what features should be used?
Lua is not an acronym.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Object systems or LÖVE should have one

Post by Karai17 »

If you want to use class-style oop, then use a class system. If you'd rather not, then don't. If you want interoperable code, use one that conforms to class commons. Hard coding a class system into love is just not a good idea.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Object systems or LÖVE should have one

Post by Inny »

This dead horse has probably been well beaten by now, so the last thing I want to chime in with is that I've been experimenting with an Entity-Component style design, and I've determined that not having a class system in the way makes it easier to do the type of things I want to do. Furthermore, the closest thing to "component-style design" that any of the existing class systems offers is Mixins. I'm starting to really get behind the idea that tables are good enough and classes are an unnecessary overhead.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: Object systems or LÖVE should have one

Post by Karai17 »

Tables are amazing.
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: No registered users and 3 guests