games50 / pong

Atari's 1972 classic, implemented in Lua with LÖVE
843 stars 1.12k forks source link

pong-2 renders white screen #14

Open noahhaasis opened 6 years ago

noahhaasis commented 6 years ago

running 'love .' in pong-2 results in a completely white screen. With love.graphics.clear(40, 45, 52, 255) commented out everything works expect the background color is black rather then grey. I'm using love 11.1 on a 32bit Windows 10 machine.

noahhaasis commented 6 years ago

The problem is in the representation of rgb. The code on this repo uses numbers between 0 and 255 to represent a rgb channel. The new love version uses values between 0 and 1. So every channel value x should be replaced with x/255.

noahhaasis commented 6 years ago

Sry just saw this is a duplicate.

mcdougak commented 4 years ago

I was having the same issue, thank you for the information for a quick fix!