Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push.lua #2

Closed
blaisek opened this issue Apr 17, 2018 · 9 comments
Closed

push.lua #2

blaisek opened this issue Apr 17, 2018 · 9 comments

Comments

@blaisek
Copy link

blaisek commented Apr 17, 2018

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
Copy link
Author

blaisek commented Apr 18, 2018

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

@bhattsameer
Copy link

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()'.

@w-A-L-L-e
Copy link

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
Copy link

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).

@Nightshadder
Copy link

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

@hshimshon
Copy link

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

polarbeargo added a commit to polarbeargo/GD50_assignments that referenced this issue Jan 19, 2020
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'
cs50/mario-demo#2
@sanju1989
Copy link

new in game development with lua . finally run this.

@zorggn
Copy link

zorggn commented May 7, 2020

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

@NotMorphus
Copy link

NotMorphus commented Jun 29, 2020

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

@blaisek blaisek closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants