I am writing 2D side scrolling bullet hell-like game. I am at a point where I struggle to pull off smooth fps. I have separated loop that manages drawing.
However I want update the position of sprites from game logic(for bullets). Since there are many bullets, waiting for new set of position significantly decreases the speed in which the drawing loop executes itself.
I thought about another approach like this:
I could upload and stack positions of bullets somewhere. So my drawing method can pull off only the previously completely uploaded data, but doing so it can free itself from worrying about waiting for updating since stacked data is already in there. however <- that approach seems counter intuitive.