# Littorio

Member

4

254 Neutral

• Rank
Newbie
1. ## Triangle color from code

I have to display some meshes where each triangle color depend from a value in an array that can change each frame. The meshes are loaded when the game run and are not know in advance. The meshes uses shared vertices. Which would be the best way to implement this? Use a geometry shader? I will use this to display the hitpoints on each armor segment of the hull on a vehicle.
2. ## Finding neighbouring agents within interaction range efficiently

With a grid you have to decide the size of the world and the resolution of the grid in advance. For example in a space shooter the grid is mostly empty except a few overcrowded cells. The grid can be efficient in your particolar case if you know the size of the world and critters have uniform distribution.
3. ## Collision Detection of Multi-Part Object

Quote:Original post by jyk 1. 2-d or 3-d? 3-D Quote:Original post by jyk 2. What method (e.g. SAT, etc.) are you using for your narrow-phase collision tests? 3. Are you doing any sort of broad-phase culling? I don't know this details. I'm using OPCODE collision library Quote:Original post by jyk 4. How do you know it's too slow? It's already implemented and the rebuild take about half second for a 7000 triangle ship Quote:Original post by jyk Instead of rebuilding the collision data to account for the movement of the turrets, I would instead represent the ships as composite entities, each element of which has its own collision proxy. That is, as far as the collision detection system is concerned, the hull and each of the turrets is a separate object. If each ship has 10 turrets you must check 100 collision , one for every pair.
4. ## Collision Detection of Multi-Part Object

In my space game i have ships that are composed of a hull and many turrets that can rotate indipendently. When two ship are close and have to check for collision i rebuild the collision data with the current position of the turrets to use the hull and the turrets as a single object. This method is too slow. There is a collision library that manage this situation? If not what else can be done?