How to LÖVE - Now with text-based tutorials

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to LÖVE - A LÖVE tutorial series

Post by Robin »

MadByte wrote:Basically thats what I do for every module, but why should I add an extra line "local Object=require("class")" to every single class, for every single required module I create. I don't see the mysterious big advantage when doing everything local. All my main.lua files look like this:
Sorry to bring the globals thing up again, but IMO that's like saying "The warning lights kept flashing. I thought that was annoying so I turned them off. I don't see the mysterious big advantage for using warning lights."
Help us help you: attach a .love.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: How to LÖVE - A LÖVE tutorial series

Post by s-ol »

Robin wrote:
MadByte wrote:Basically thats what I do for every module, but why should I add an extra line "local Object=require("class")" to every single class, for every single required module I create. I don't see the mysterious big advantage when doing everything local. All my main.lua files look like this:
Sorry to bring the globals thing up again, but IMO that's like saying "The warning lights kept flashing. I thought that was annoying so I turned them off. I don't see the mysterious big advantage for using warning lights."
He emphasized "everything", I totally agree with him. IMO blindly following the "no globals" rule is just as bad as not thinking about scope at all. If he literally uses that throughout all his files, it would be foolish not to have it global.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to LÖVE - A LÖVE tutorial series

Post by Robin »

It's still treating the symptoms of high coupling. Organising your code in a way that leads to more separation of concerns leads to less moving parts, less bugs, less boilerplate and less temptation to use globals.

I never use globals any more and it makes my code healthier, because I can actually see when my code is becoming too highly coupled and needs to be refactored before the technical debt starts accruing.
Help us help you: attach a .love.
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: How to LÖVE - Now with text-based tutorials

Post by Sheepolution »

How to LÖVE is back, now with text-based tutorials!

Check it out!

I will keep writing tutorials till I can't think of anything to write about.
User avatar
D0NM
Party member
Posts: 250
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: How to LÖVE - Now with text-based tutorials

Post by D0NM »

Sheepolution wrote:How to LÖVE is back, now with text-based tutorials!

Check it out!

I will keep writing tutorials till I can't think of anything to write about.
To explain collisions I'd start with easier cases:
- 1 point and another point
- 1 point and a rectangle
- point & circle
- circle & circle

Anyway. Your tutorials are very cool. I've posted links to them here and there. Hope my friends & pupils would love them. :3
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: How to LÖVE - Now with text-based tutorials

Post by Karai17 »

If you're still looking for help writing some chapters, I could write a chapter on why classes suck, and why ECS is master race. I ditched OOP last year and couldn't be happier.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: How to LÖVE - Now with text-based tutorials

Post by Nixola »

Karai17 wrote:If you're still looking for help writing some chapters, I could write a chapter on why classes suck, and why ECS is master race. I ditched OOP last year and couldn't be happier.
I would be interested in this.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: How to LÖVE - Now with text-based tutorials

Post by Sheepolution »

Karai17 wrote:If you're still looking for help writing some chapters, I could write a chapter on why classes suck, and why ECS is master race. I ditched OOP last year and couldn't be happier.
Actually, yes. I think it should be chapter 20+, but once there I was already planning on asking you or one of the ECS master race people to write a chapter about it, since I have never really invested time in ECS myself.

I will probably keep using classes for future chapters, unless your chapter is able to convince me not to.

I could also use help with a chapter for love.physics.

Here's my current list of ideas for future chapters, in no particular order:
  • Distribution
  • Angles and distance
  • Errors
  • Camera
  • Online
  • ECS
  • Audio
  • Tweening
  • Animation
  • Tiles
  • Platformer
  • Terminology
  • Clean code
  • Physics
  • Filesystem
  • Text
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

Re: How to LÖVE - Now with text-based tutorials

Post by Karai17 »

Alright, I'll stay writing something today and link you to a Google doc via pm when I have a draft ready.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

Re: How to LÖVE - Now on Github

Post by Sheepolution »

I put the whole thing on Github.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest