Open jeffchiou opened 2 years ago
Looked in the source a bit, found that if I remove the clear
here I get what I want
function mainloop(g::Game)
...
# Render
#if (debug && debugText) renderFPS(renderer,last_10_frame_times) end
clear(g.screen)
Base.invokelatest(g.render_function, g)
....
Perhaps it would be a good idea to include an option to specify whether you want to auto-clear after every frame?
We could make it default to auto-clear and then allow for a flag that disables it.
function draw(g::Game)
# auto-clears
end
function draw(g::Game, noclear=true)
# no auto-clear
end
For example, I want this to result in tracing a line along
w
's history of positions.For me it just shows the circle moving about as determined by
w
's update function, while I'm expecting many little circles showingw
's trajectory.It seems in certain examples you had to clear the canvas by adding
clear()
orfill()
? But for me I see no difference. https://docs.juliahub.com/GameZero/tTDGf/0.2.1/examples/basic2/https://docs.juliahub.com/GameZero/tTDGf/0.2.1/examples/Breakout/
Is what I'm asking for possible? Sorry if I'm missing something obvious, I'm fairly new to Julia.