mario-demo icon indicating copy to clipboard operation
mario-demo copied to clipboard

push.lua

Open blaisek opened this issue 6 years ago • 9 comments

anybody have this running the github lovedemo ? :

Error

push.lua:101: attempt to call field 'getPixelScale' (a nil value)

Traceback

push.lua:101: in function 'initValues' push.lua:48: in function 'setupScreen' main.lua:26: in function 'load' [C]: in function 'xpcall' [C]: in function 'xpcall'

blaisek avatar Apr 17 '18 17:04 blaisek

the problem appears with löve 11.1 not with the previous version löve 0.10

blaisek avatar Apr 18 '18 13:04 blaisek

yes because in love 0.11.1 'love.window.getPixelScale()' is replaced with 'love.window.getDPIScale()'. so open up push.lua in IDE and replace 'love.window.getPixelScale()' with 'love.window.getDPIScale()'.

bhattsameer avatar May 30 '18 05:05 bhattsameer

Yes, then it starts without errors, but screen is all messed up (with 0.10.2 it all works fine). So there have been more breaking changes between 0.10.2 and 11.1. Would be nice to know what else changed between versions (maybe the love.graphics.newQuad is also different?). Initially you get a blank screen (scaled wrongly), but when resizing it becomes visible again but the empty blocks are not blue but white instead see screenshot. screen shot 2018-08-27 at 12 59 40

w-A-L-L-e avatar Aug 27 '18 11:08 w-A-L-L-e

Tweaked it a bit for love 11.2:
changing love.graphics.clear(108/255, 140/255, 255/255, 255/255) in main.lua makes background blue again and changing setPixelScale into getDPIScale avoids runtime errors. Still a grey border around the quads/tiles though and also starting in fullscreen or resizing draws ok but the initial screen is still messed op (seems zoomed in too far somehow, imho push.lua needs some more tweaks for it to work with latest love libs).

w-A-L-L-e avatar Aug 27 '18 11:08 w-A-L-L-e

it does not work for me. still the same push.lua 101 error Any help.

Nightshadder avatar May 01 '19 13:05 Nightshadder

You can find Love 0.10 here https://bitbucket.org/rude/love/downloads/

hayimsamson avatar Oct 19 '19 16:10 hayimsamson

new in game development with lua . finally run this.

sanju1989 avatar Apr 25 '20 14:04 sanju1989

For those that want to make the effort of knowing what changed between Löve versions, the wiki offers a handy page for that: https://love2d.org/wiki/Version_History

zorggn avatar May 07 '20 20:05 zorggn

Just update to the latest push.lua from the github page for new Love2d users! It worked for pretty fine after that for all the codes! I suppose it is push.lua v0.2 we're using with the code but for using with the new Love2d we need to have push.lua v0.4 Cheers! @blaisek

NotMorphus avatar Jun 29 '20 12:06 NotMorphus