New answers tagged


You would need a higher bit-depth to achieve the same quality if you store the textures in linear. See Is the cost of the conversion completely negligible? I don't know but I've read that it is very cheap on current GPUs. You could try profiling to find out.


No, it is not safe. You can see this by building in debug mode. The extra time it takes to log data prevents it from calling these methods before the OS takes back control. One solution is to implement an auto-save feature that saves on a timer and/or key events.


Just use modulo operation on edges. It works in both positive and negative values. Your update() function would call something like: entity->posX = (entity->posX + entity->velocity * dt ) % screen_width entity->posY = (entity->posY + entity->velocity * dt ) % screen_height Creating a warp_object() function like you did, is the path to ...

Top 50 recent answers are included