Love2D changes so much that old tutorials don't work

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
CraftedPixel
Prole
Posts: 7
Joined: Tue Dec 29, 2015 5:26 pm

Love2D changes so much that old tutorials don't work

Post by CraftedPixel »

The love2d wiki is outdated, and youtube tutorials as well. It makes things very hard to learn.
I am new to love2D
You cant do this anymore:
conf.lua

1 function love.conf()
2 height = 100
3 width = 120
4 end


Width and height commands cause an ERROR, old Love2d code won't even run anymore!
I don't want to give up on love2D, but the updates change way to much! I find it overwhelming.
stabyourself.net was very inspiring to me, and proved the power of love 2d!

Thanks for reading!, (and helping me possibly!)

CraftedPixel
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Love2D changes so much that old tutorials don't work

Post by s-ol »

Just read the documentation/wiki, there aren't that many big changes really. Your syntax is outdated by quite a few versions (= many years?) already, it's supposed to look like this:

Code: Select all

function love.conf(t)
  t.window.height = 100
  t.window.width = 120
end

Also: use

Code: Select all

[code]
code tags to post code.[/size]

Edit: i just took another look, and it seems to me that your syntax was never actually valid. Though there were changes (for example it used to be t.screen.width before 0.9.0), what you wrote didn't ever work as far as I can tell.

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
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests