Tag Info

New answers tagged

1

The solution was a lot simpler than the other things I was thinking of. I store all CollisionPairs in a separate collection and iterate over that collection. This allows me to do what I was doing before with partitioning, setting a boolean for the CollisionPair to true to represent that the involved bodies are in the same partition.


0

A common way to solve this is to have the concept of "islands" which are just groups of objects that might collide with each other. Objects from different islands are guaranteed to be far enough away that they can never collide. Objects can change islands as they move around and islands can join and separate. Even though this is a common technique, its ...


0

There's a trick to this: Selecting Areas: As you move the mouse, the only tiles you need to check for new impassable tiles are the newly highlighted tiles. If the mouse is dragged from X=25 to X=26, then you only need to iterate over the tiles at the X=26 column from the Y of the starting tile to the Y of the tile the mouse is over. The worst case scenario ...


-1

Not sure where those numbers come from (I didn't make the image), but as new techniques are discovered, some allow us to do more with less. For instance temporal anti aliasing can get you a LOT of samples per pixel to improve image quality, but does so by using samples from previous frames.


0

Rather than polling for events, where the only option for higher precision is to poll faster, you could try listening for the events directly. You can attach an event listener to the windows event queue like so: // Define a message filter which all messages will pass through private class Filter : IMessageFilter { public bool PreFilterMessage(ref ...


2

A class is a chunk of code that can be reused as an object. An object is a single instance of something that can have certain properties (e.g. an integer representing a characters intelligence or money amount). Now that we have that settled... Going light on object creation and heavy on object reuse is generally better. It uses significantly less RAM to ...


1

Try using CacheProceduralProperty to specify at runtime what properties you want to cache and which ones you don't.


0

A major bottleneck here is syncing the CPU & GPU to shuttle the texture back and forth - to the CPU for modification with SetPixels(), and to the GPU for display. Also, the CPU is typically working on just one pixel at a time, while the GPU can churn through them in huge batches. So, we can often greatly improve performance by keeping the texture work ...


0

In the words of one Icefox here, Collaborative diffusion using agents and an anti-object is useful for when you are not trying to find a path from a specific node to another specific node. ...Confirming my suspicions as given in the question's example situation. The meaning being that when you need a member of one group to find any member of ...



Top 50 recent answers are included