Page 1 of 1
Newbie question
Posted: Mon May 08, 2017 1:04 pm
by dr.jack
Hello,
I am very interested in realizing a little retro game in the style of Maniac Mansion, would anyone have examples, demos etc to tell me.
Some links or others to put me on the right way
thank you
Re: Newbie question
Posted: Mon May 08, 2017 1:13 pm
by raidho36
That looks like a compex game with a lot of stuff going on. Chances are, as a newbie, you won't be able to pull that off. Try building up programming experience with simpler projects. There are plenty of tutorials on making simple games and specific game elements.
Re: Newbie question
Posted: Mon May 08, 2017 1:19 pm
by dr.jack
Hello Raidho36,
Thanks for reply.
I want to mean that i'm a newbie in LUA/LOVE but i'm a experienced coder (Java, C and other langages for 20 years), with good maths skills.
So i can understand some pieces of code or examples/demo to make a small game.
I search only a start point in fact
Re: Newbie question
Posted: Mon May 08, 2017 2:16 pm
by raidho36
Ah! Sheepollution I heard has a number of good tutorials.
But in fact all you need to get started is user manual. Need to draw a sprite? Consult the manual. Need to grab input? Consult the manual. Need to update gamestate? Consult the manual. In fact I suggest you browse the manual to see what the engine can do. Same goes with the language itself (by the way it's called Lua, it's not an abbreviation, it means "Moon" in portugese). With your experience you should have absolutely no problem with figuring out algorithms to accomplish the things you want to accomplish.
You'll need to know of a few quirks though. Drawing a lot of sprites is faster if you use a sprite batch, and drawing from sprite atlas is faster than drawing multiple individual sprites. The physics engine (box2d) doesn't likes variable timestep, and is hard coded to work with objects of "average" size (0.1 to 10 meters) and reasonably low velocities. Strings are immutable, and only one copy of any unique string exists at a time while all text objects simply reference it. Creating and disposing of tables and other objects produces garbage, and it can and will very heavily impact performance (i've tested "normal" math library against the one that doesn't produce garbage and it's 10 to 50 times slower). Tables have two storage parts, hash part and array part - only consecutive integer keys greater than 0 go into array part, everything else goes to hash part; hash part is slower to operate so that's a concern in performance critical code. Table access just in general is slower than local variables. Additionally, Lua has no real global variables, instead it has a globally accessible table and all "globals" go into that table, hence it's also slower than locals. And finally, LÖVE uses LuaJIT implementation of Lua, which has additional quriks of its own (some functions are not compiled and are slow etc.) and also allows using C structs instead of Lua tables. As the name suggests, structs can only be defined once and cannot be modified in the future, access to nonexistent struct element crashes the game, and they are greatly faster than Lua tables; C structs can be assigned a metatable as normal tables can, so they can be effectively structs with methods; there is no performance difference between array-type and struct-type key access with C data, obviously. You can otherwise use C features using LuaJIT's FFI, consult the manual.
Re: Newbie question
Posted: Mon May 08, 2017 3:11 pm
by Sheepolution
raidho36 wrote: ↑Mon May 08, 2017 2:16 pm
Ah! Sheepollution I heard has a number of good tutorials.
You can find them here:
http://www.sheepolution.com/learn/book/contents
Since you're an experienced programmer you should be able to go through them very fast.
Re: Newbie question
Posted: Mon May 08, 2017 3:55 pm
by dr.jack
thanks raidho36 and Sheepolution !
I'm going to read the manuel, and read the sheepolution tut's. Thanks for precious tech tricks
See you soon
Re: Newbie question
Posted: Sun Jun 04, 2017 10:00 pm
by Hydrolek99
raidho36 wrote: ↑Mon May 08, 2017 2:16 pm
But in fact all you need to get started is user manual. Need to draw a sprite? Consult the manual. Need to grab input? Consult the manual. Need to update gamestate? Consult the manual. In fact I suggest you browse the manual to see what the engine can do.
By Manual are you saying that there is a Manual for LOVE2d's engine or are you talking about Lua in general?
I've been searching for a LOVE User Manual or at least something with all of the LOVE commands I can use for reference.
The old programming software I use to use had a help file with all of the diffrent commands and a short explanation of how they would work in a program. Like to move a sprite you would use the spritemovexy command. Does something like that even exist for LOVE or would I have to look in the LUA manual for that?
Re: Newbie question
Posted: Sun Jun 04, 2017 10:41 pm
by zorg
Hydrolek99 wrote: ↑Sun Jun 04, 2017 10:00 pm
By Manual are you saying that there is a Manual for LOVE2d's engine or are you talking about Lua in general?
I've been searching for a LOVE User Manual or at least something with all of the LOVE commands I can use for reference.
The old programming software I use to use had a help file with all of the diffrent commands and a short explanation of how they would work in a program. Like to move a sprite you would use the spritemovexy command. Does something like that even exist for LOVE or would I have to look in the LUA manual for that?
Hi and welcome to the forums (since this is your first post).
By manual, we mean that humongous green button on top of the forums, between the black one saying HOME and the blue one saying FORUMS:
WIKI <- Which
has the reference documentation of Löve.
You can find almost everything that the framework is capable of in there, including filters for specific versions of Löve; selector's in the top-right corner of each page.
For everything else, lua has its own manual, online (this is the 5.0 version though, Löve uses LuaJIT, which uses 5.1 + some additions from 5.2, so there are some irrelevant/deprecated things in there like modules and table.getn:
PiL
Re: Newbie question
Posted: Mon Jun 05, 2017 2:24 pm
by Hydrolek99
Ah. I see now. Thank you very much zorg. I plan on getting the Lua manual soon as well.