i am working on a program in Python and using Pygame. this is what the basic code looks like:
while 1:
screen.blit(background, (0,0))
for event in pyg
You need to redraw the whole list after your blit(it covers the whole screen with the surface 'background' and 'erases' it), its not conditional, you need to iterate over the whole list and draw it. Them in the event part you decides who enters and who leaves the list.
Loop:
Blit,starting new
Event, here you decide who moves, who begin or cease to exist(append/remove)
Redraw whole list, everyone in the circle_list.
To draw all the circles in your list, just iterate through them and draw them before each call to update:
for circle in circle_list:
circle.draw_circle()
Edit: the OP had posted incorrectly formatted code, but says the actual code is fine, so removed that suggestion
edit: I thought you already tried : https://stackoverflow.com/a/11172885/341744
The program, works, it draws the circles upon user input but the update problem is the only issue i need to solve. Is there any possible way to have all elements in the list of objects being updated by the while loop?
You could iterate on a temporary list, for example, if you kill actors while iterating.
for circle in circles[:]:
circle.update()