View Single Post
Old 27 December 2018, 22:57   #6
Shatterhand
Warhasneverbeensomuchfun
 
Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
If you blit everything at the end of the frame and do no CPU operations inbetween you are wasting CPU cycles.

I usually try to blit between CPU operations. Execute AI code for the object, then blit, then move to next one, excute AI code, etc.

From what people told me, and I also have seen, when you ask the blitter to blit something, the program continue its flow up until it finds another blitter request, regardless if the Blitter is still doing its stuff or not. If the next blitter request happens while the blitter is still busy, program flow will stop and wait until blitter is available.

So if you just blit a lot of stuff at the end of the frame, CPU will be hanging waiting until all the blitter stuff is done.

I am pretty sure Blitter experts can use this to have very optimized use of the blitter. But it seems to be a good idea to have instructions between each blit you do.
Shatterhand is offline  
 
Page generated in 0.07400 seconds with 11 queries