Hi,
One of our forummembers in our gamestudio community has a problem. I tried to solve it, but i have no clue why it doesnt work.
He's trying to create a paint-like draw function.
The problem: even with 500FPS(my own system) its not possible to draw a connected line while moving the mouse fast.
function malen()
{
if(mouse_left || key_space)
{
pixel = pixel_for_vec(vector(blau,gruen,rot),100,888);
pixel_to_bmap(malbmp,mouse_cursor.x,mouse_cursor.y,pixel);
draw_counter += 1;
if(draw_counter >= 500/25)
{
draw_counter = 0;
bmap_unlock(malbmp);
wait(1);
bmap_lock(malbmp,0);
}
}
}
I change dthe code so that the map is updatet only 25 times a second(500 is my system fps, i'll change the example to a flexible one as soon as it works)
mouse_sync is enabled, and still not possible. When moving the mouse very fast, it draws points here and there but not a connected line(at 500 FPS o.o)
Maybe someone knows how to improve.
Greets
Rackscha