View Single Post
Old 03 June 2018, 20:04   #22
Shatterhand
Warhasneverbeensomuchfun

Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 35
Posts: 2,956
Quote:
Yeah it's a bit of a waste but 4 checks per Game Loop is hardly CPU intensive I think a ZX80 could do it.
It's 4 checks when you're check one object against one object. When you are testing 8 objects against 30 (like the example I Gave) it's 960 checks. It does eat a lot of time.

If you only check one object against one object per loop your game won't work properly, missing collisions all the time.

I really think the Grid idea works great with checks against background, since it's easier to keep everything on a grid and you can probably do a whole shift in a grid when the screen moves very quickly (I guess). But with stuff that moves freely on screen to many different directions I am not sure it would help at all.
Shatterhand is offline  
 
Page generated in 0.04075 seconds with 11 queries