Posts

Showing posts from December, 2022

Tips For Optimizing Collision

Image
Collision In Computers In the world of games the logic for detecting collision can either make or break your game. There are many different methods for detecting collision which are dependent on what you are trying to collide. For instance, if you try to collide two squares then you can just see if the left/right/top/bottom side of either shape simply overlaps the sides of the other which is known as AABB collision detection. The same logic applies in 3D space except instead of having to deal with an XY point you have to handle the Z dimension as well. On the other hand, if you want to collide two circles or spheres then you need to check to see if the distance between the centers of each circle (or sphere in 3D) is less than the radius of the two shapes.  These are pretty simple scenarios, but collision can become rather complex when you have to begin dealing with collision between different shapes such has colliding a square with a circle. You cannot use the circle collision logi...

Tips For Working In The Database - Tip 1. Always Write It Down

Every now and then I have to shift my entire work flow from my standard day-to-day programming to focusing entirely on database queries and performance monitoring. This can be a welcome break from scratching my head as to how to solve applying an alpha change to the parent object of a composite object that doesn't affect any of the children in a reasonable amount of time. However, each time I have to make the switch I have to shake off the cobwebs. Any skill that you aren't actively practicing will slowly move to the back of the line in your brain. For me that's SQL and HTML. Fortunately the amount of SQL I do, albeit not nearly as much as my regular game programming, far exceeds the amount of HTML I do because HTML is the bane of my existence. Whenever I have to get in there and start writing those queries, it's because we have a large amount of data that we suddenly have to look at and we don't know exactly what we're looking for. What I mean by that is we mig...