-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Problem with Love: Pong 2 and beyond #22
Comments
Had the same problem, what happens is that 'getPixelScale' ceased to exist in love above version 0.9. So if you are using a version higher than 0.9, (you probablly got version 11.x) you should use 'getDPIScale'. I did a full "Replace all" on this function using vscode and had no problems with this function anymore. Another problem that i had was about #8, wich thankfully @09jlardinois already found an answer and I didn't have to dig around for days to find a solution like him. See love2d wiki on "Renamed APIs" section |
Hi, maybe you need to update push.lua to the latest version -> v0.4 I have another issue with a completely white screen with nothing on it |
I get the same issue @phervas as I've updated the push.lua |
Hi @Fiain, apparently there was a change in Love somebody mentioned at some other post. What worked for me was do divide the first 3 values at love.graphics.clear by 255: love.graphics.clear(40/255, 45/255, 52/255, 255) |
@srisowmya2000 in the love.graphics.clear function just do this and it will work: love.graphics.clear(40/255, 45/255, 52/255, 255) and similarly in the love.graphics.printf: love.graphics.printf('Hello Pong!', 0, 20, VIRTUAL_WIDTH, 'center') you aren't able to see the right paddle and ball as you are rendering only half the virtual width minus 6 dimensions whereas your ball and right paddle are being placed in the non-rendered area |
@Yaugan thanks for helping me out. But I still am getting an error. |
Thanks evertoncrespin. It works |
@srisowmya2000 use this push file made by @phervas |
i stilll am getting a white screen with FPS |
for which file do we change this in @phervas |
I was greeted with the following upon running Pong 2:
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:49: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I ran the other pongs and only pong1 and pong0 are unaffected. It seems to be a problem with getPixelScale, perhaps the system has changed so that this part of the code is less viable?
The text was updated successfully, but these errors were encountered: