Hi everyone, My name is lafe and I am new to the forums, though ive lurked for a few days, and first I just want to say that
Ive been playing with this game engine for a few weeks now, and i think its pretty great. Its fast, Powerful, and easy to learn.
I just think that if you were to decentralize the way Love2d works into a more organized system with file referencing, you could expand your user base.
Think about it from the perspective of someone completely new to code [not me btw, ive been using lua for about a year, I would consider myself intermediate at it], is it going to be easier for you to understand the language if you have, say, it grouped into one large file like we do now, or divide it into several smaller ones that are specific to a few objects. it would also make the construction of multiroom games more feasible, and bring in more clients who used lua in games as a scripting langue for adding advanced functions to objects, and only needs to handle several entity at once.
Its that kind of convenience that makes the difference between something intuitive like unity, and something slightly harder to learn, like visual C plus plus. either way, I truly like this engine, think it has even better potential, and want to thank you all for what a good job you are doing.
Decentralized Tutorials/Examples
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Decentralized Tutorials/Examples
Can you explain what you just said? I saw something about files...
Re: Decentralized Tutorials/Examples
I mean cracking the tutorials open into several smaller files that are oriented to individual parts of the code to make things abit less cryptic.bartbes wrote:Can you explain what you just said? I saw something about files...
so for say, the avalanche of love tutorial, break it into separate files, one of which handles the balls, one of which handles the floor.
sorry, im terrible at writing cohesively.
- hertzcastle
- Party member
- Posts: 100
- Joined: Sun Jan 04, 2009 4:51 pm
- Location: brighton, uk
Re: Decentralized Tutorials/Examples
oop in lua is very easy to implement, check this stuff out:
http://www.lua.org/pil/16.html
as for splitting it into separate files, just have different files for every class in your .love file and use
lua is more based on flexibility than direct oop, but its really simple to set up.
happy coding.x
http://www.lua.org/pil/16.html
as for splitting it into separate files, just have different files for every class in your .love file and use
Code: Select all
require("filename.lua")
happy coding.x
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Decentralized Tutorials/Examples
You should be able to do
or
(Lua shortcut: if you pass only a literal string or table to a function, you may omit the parentheses.)
Code: Select all
require("mylib")
Code: Select all
require "mylib"
Help us help you: attach a .love.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 5 guests