1 decade ago by ape
I know slope collision works with sloped collision tiles within collision maps (or at least it has in recent versions).
I'm curious if anyone is using the same collision routines with entities.
I need to be able to dynamically insert slopes ahead of a player on a infinitely scrolling repeated background and I'm thinking that entities are going to help a lot with performance.
I was able to dynamically insert collision map "columns" ahead of the player (similar to how the Drop example game adds rows), removing them once they were off screen, but the performance hit was pretty big. Lot's of choppiness as the new columns were added (I tried adding single columns, columns in batches ranging from 2 to 200 - no getting rid of the choppiness).
A while back I ported a version of Box2D that was more up to date with the latest Box2D API to Impact as a plugin (I'll post a link to the github repo in another post) but that currently only supports entity collision with collision maps as well. It also breaks within Impact 1.20, so I'll need to work on that. Creating entity to entity collision is trickier since entity shapes are likely to be much more dynamic (for example, my test entity is a car with wheels - a lot more different then a bouncing ball).
I'll dig into the slope related code to see what I can find - hopefully I'm not the first to want to do this.
I'm curious if anyone is using the same collision routines with entities.
I need to be able to dynamically insert slopes ahead of a player on a infinitely scrolling repeated background and I'm thinking that entities are going to help a lot with performance.
I was able to dynamically insert collision map "columns" ahead of the player (similar to how the Drop example game adds rows), removing them once they were off screen, but the performance hit was pretty big. Lot's of choppiness as the new columns were added (I tried adding single columns, columns in batches ranging from 2 to 200 - no getting rid of the choppiness).
A while back I ported a version of Box2D that was more up to date with the latest Box2D API to Impact as a plugin (I'll post a link to the github repo in another post) but that currently only supports entity collision with collision maps as well. It also breaks within Impact 1.20, so I'll need to work on that. Creating entity to entity collision is trickier since entity shapes are likely to be much more dynamic (for example, my test entity is a car with wheels - a lot more different then a bouncing ball).
I'll dig into the slope related code to see what I can find - hopefully I'm not the first to want to do this.