View Single Post
Old 24 November 2019, 07:30   #19
deimos
It's coming back!
 
deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
Quote:
Originally Posted by geldo79 View Post
Up to now, the cpu does not seem to be able to calculate everything in time. I use a bresenham algorithm to calculate the positions. And in order to be able to detect collisions, i do an update pixel by pixel. Otherwise i could increase or decrease x or y of the bob by a larger amount (depending on its speed), but then collision detection will be difficult. Its a bit frustrating at the moment.
I think you should consider changing your approach, calculate positions, physics, collisions, etc. at whatever accuracy is needed and using line intersections, bounding boxes, etc. for efficiency, then convert to screen resolution to draw as a separate step.
deimos is offline  
 
Page generated in 0.04268 seconds with 11 queries