Hi!
Is there a maximum number of point objects that may be drawn at the same time?
I get the impression that the engine doesnt allow more than ~1000 calls to love.graphics.point(x,y) per frame. Is that right?
maximum number of points drawn?
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: maximum number of points drawn?
Points? That's where it just draws a pixel, right? I guess it depends on the speed of your computer. Löve can draw a LOT of stuff and still keep a nice 60~FPS. As long as you aren't hoping to draw all 307,200 pixels on a 640x480 screen every frame.
Use a For loop and draw a point every loop. Up the maximum number by a few hundred over time and see how and at what point the FPS drops too low to be usable.
Edit: Sample code to start with:
I can get 5500 points drawn at once before I lose FPS. 6000 puts it at 50 and 10000 puts it at 30.
Use a For loop and draw a point every loop. Up the maximum number by a few hundred over time and see how and at what point the FPS drops too low to be usable.
Edit: Sample code to start with:
Code: Select all
for i=1,5000 do
local r = math.random(0,255/5)*5
gr.setColor(r,r,r)
gr.point(math.random(0,799), math.random(0,499))
end
Re: maximum number of points drawn?
youre right. i think my mistake is that i draw points over points and therefore i cant see them anymore. I want to write a snowglobe where it snows and once the flakes hit the ground, they remain there. therefore i have to update the ground level in integer steps. however the flakes have a given speed which is floating point. once they hit the ground, they are probably overlapping which gave me the wrong impression that they would be cleared at some point.
Heres a fileupload with the program and a more detailed explanation of the problems I'm having:
http://www.2shared.com/file/TVJ5JC_i/Sc ... 0love.html
Heres a fileupload with the program and a more detailed explanation of the problems I'm having:
http://www.2shared.com/file/TVJ5JC_i/Sc ... 0love.html
Who is online
Users browsing this forum: No registered users and 2 guests