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

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

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

Post by Sheepolution »

Go to the tutorials



How to LÖVE is a tutorial series that teaches you how to make a game with LÖVE. All videos/chapters are very short and straight to the point. The video series is on a hold, but I'm still writing new chapters.

Why are you making these tutorials?
Because I've struggled a lot with learning LÖVE and learning programming in general. I've wanted to make a tutorial series for a long time, and I finally decided to actually do it. I'm making the tutorial that I wish would've existed when I started learning LÖVE.
Also a friend challenged me to make a Youtube channel which will get more subscribers than his

How many chapters will you make?
Till I can't think of anything new to explain. I also want to invite people to help me write tutorials on certain subjects, like online play or ECS.
Last edited by Sheepolution on Sat Nov 12, 2016 12:45 pm, edited 4 times in total.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

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

Post by davisdude »

Nice! More tutorials are always a good thing, and I like tutorials that are direct.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

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

Post by Ulydev »

Haha, good job on that first video! I'm waiting for the Pong tutorial!
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

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

Post by Sheepolution »

I added a bunch of new episodes. The most notable is the Classes tutorial. I notice a lot of people don't use classes so this might be interesting even if you already have some experience with LÖVE.

User avatar
AC Vis
Prole
Posts: 9
Joined: Thu Aug 20, 2015 2:35 am

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

Post by AC Vis »

I LOVE these. Simple, and they get you right into it - with no rambling. Plus, you're tackling important topics like scope, objects, libraries, classes...without turning them into 30 minute long videos. Awesome job!
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

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

Post by airstruck »

No offense, but why the use of globals instead of proper encapsulation for modules? People who are new to software dev may not know this is bad design, and people who are new to Lua might not realize there's any alternative. I've noticed this trend in a lot of Love tutorials, not just yours.
User avatar
Vimm
Party member
Posts: 113
Joined: Wed Mar 16, 2016 8:14 pm

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

Post by Vimm »

Suggestion: episode 16+ - 2D platformer
User avatar
Sheepolution
Party member
Posts: 264
Joined: Mon Mar 04, 2013 9:31 am
Location: The Netherlands
Contact:

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

Post by Sheepolution »

airstruck wrote:No offense, but why the use of globals instead of proper encapsulation for modules? People who are new to software dev may not know this is bad design, and people who are new to Lua might not realize there's any alternative. I've noticed this trend in a lot of Love tutorials, not just yours.
To be honest, I don't use proper encapsulation myself. Please educate me why I should use it, and if you can convince me I will teach it in my videos.

Also could you show an example? I might be mixing things up here.
User avatar
airstruck
Party member
Posts: 650
Joined: Thu Jun 04, 2015 7:11 pm
Location: Not being time thief.

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

Post by airstruck »

There are lots of good reasons avoid globals; google for something like why not globals and you'll find someone explaining it better than I probably can. The top result from that search sums it up pretty well, I think. There are a small number of cases where it's worth making an exception, but use of globals should really be the exception rather than the rule.

Personally, I sometimes make an exception for cross-cutting concerns. When something is used in many unrelated parts of the program, a global might make sense; for example a boolean "DEBUG" global. Your "Object" global might fall into this category if you make heavy use of classical OOP throughout your program, but "Rectangle" certainly wouldn't.

In a tutorial for beginners, I wouldn't expect the audience to be able to make this distinction; I'd just avoid globals everywhere at that level.
Sheepolution wrote:could you show an example?
Instead of this:

Code: Select all

-- main.lua
Object = require 'class'

-- rectangle.lua
Rectangle = Object:extend()
You'd have something like this:

Code: Select all

-- rectangle.lua
local Object = require 'class'
local Rectangle = Object:extend()
-- ...
return Rectangle
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

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

Post by MadByte »

Instead of this:

Code: Select all

-- main.lua
Object = require 'class'

-- rectangle.lua
Rectangle = Object:extend()
You'd have something like this:

Code: Select all

-- rectangle.lua
local Object = require 'class'
local Rectangle = Object:extend()
-- ...
return Rectangle
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:

Code: Select all


---------------------------------------------------------------------------------------------
-- Air Taxi --
---------------------------------------------------------------------------------------------
love.mouse.setVisible(false)
love.graphics.setBackgroundColor(50, 55, 60)
screenWidth, screenHeight = love.graphics.getDimensions()


-- Lib --
Anim8           = require("source.lib.anim8")
Assets          = require("source.assets")
Bump            = require("source.lib.bump")
Camera          = require("source.lib.camera")
Serialize       = require("source.lib.ser")
Object          = require("source.lib.classic")
Gamestate       = require("source.lib.gamestate")

-- System --
Container       = require("source.system.Container")
StateManager    = require("source.system.StateManager")
Level           = require("source.system.Level")

-- Actor --
Actor           = require("source.actor.Actor")
TaxiStation     = require("source.actor.TaxiStation")
GasStation      = require("source.actor.GasStation")
Wall            = require("source.actor.Wall")
Passenger       = require("source.actor.Passenger")
Taxi            = require("source.actor.Taxi")
Bird            = require("source.actor.Bird")

-- States --
Menu            = require("source.state.Menu")
Game            = require("source.state.Game")
Editor          = require("source.state.Editor")

function love.load()
  Gamestate.switch(Editor)
  Gamestate.registerEvents()
end
Thats it.. no more globals, I personally think this should be fine or is this considered messy?. If I imagine how much more code I would need to write just to have everything local (when using an OOP approach)...:death: :death:
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests