This does fill for the 3x3 ring of light, 5x5 ring of light and the player's head.
Light Game - Small Ring Fill.zip (54.7 KB)
Indoors area was great, outdoors area was BAD.
Here only the head is using
Light Game - Head Fill.zip (55.6 KB)
Still tanking, about a second between input and the player actually moving.
Next we removed all fill, and just used
draw for the player's head.
Light Game - Transition Effect - NO FILL.zip (54.3 KB)
1 fps as you stand there idling over the course of about 15-20 seconds whether you do anything or not
At this point, we wonder if the issue is the camera follow....
No Camera Follow
Light Game FPS Test - No Camera Follow.zip (53.7 KB)
So something in the code is causing issues on real hardware but not in pulp.
My first thought is the loops I use to draw the black squares around the player.
// This whole section controls the light around the player if lightRadius<0 then lightRadius = 0 elseif lightRadius>lightRadiusMax then lightRadius = lightRadiusMax end redraw_x = 0 while redraw_x<screen_width do redraw_y = 0 while redraw_y<screen_height do check_x = centre_x check_x -= lightRadius if redraw_x<check_x then draw "black" at redraw_x,redraw_y end check_x = centre_x check_x += lightRadius if redraw_x>check_x then draw "black" at redraw_x,redraw_y end check_y = centre_y check_y -= lightRadius if redraw_y<check_y then draw "black" at redraw_x,redraw_y end check_y = centre_y check_y += lightRadius if redraw_y>check_y then draw "black" at redraw_x,redraw_y end redraw_y++ end redraw_x++ end
Is there something wrong with this?
Any help is greatly welcomed!