Newbie question

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
dr.jack
Prole
Posts: 3
Joined: Mon May 08, 2017 12:48 pm

Newbie question

Post 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
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Newbie question

Post 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.
dr.jack
Prole
Posts: 3
Joined: Mon May 08, 2017 12:48 pm

Re: Newbie question

Post 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
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Newbie question

Post 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.
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: Newbie question

Post 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.
dr.jack
Prole
Posts: 3
Joined: Mon May 08, 2017 12:48 pm

Re: Newbie question

Post 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
User avatar
Hydrolek99
Prole
Posts: 4
Joined: Sun Jun 04, 2017 9:38 pm

Re: Newbie question

Post 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?
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Newbie question

Post 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. :3

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
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Hydrolek99
Prole
Posts: 4
Joined: Sun Jun 04, 2017 9:38 pm

Re: Newbie question

Post by Hydrolek99 »

Ah. I see now. Thank you very much zorg. I plan on getting the Lua manual soon as well.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 72 guests