|
|
|
|
|
by diath
199 days ago
|
|
> A picking texture is a very simple idea. As the name says, it’s used to handle picking in the game, when you click somewhere on the screen (e.g. to select an unit), I use this texture to know what you clicked on. Instead of colors, every object instance writes their EntityID to this texture. Then, when you click the mouse, you check what id is in the pixel under the mouse position. Unrelated, but why? Querying a point in a basic quad tree takes microseconds, is there any benefit to overengineering a solved problem this way? What do you gain from this? |
|
The reason the game is 3D has to do with partially visible things being way easier than with isometric textures layered in the right order.
Also, now that i just grab a pixel back from the GPU, it's no overhead at all (to construct or get the data for it).