Tag Info

New answers tagged

1

I posted recently a response to a similar question http://stackoverflow.com/questions/24231389/struct-or-class-for-matrix-4x4-object Basically valuetypes are the way to go for storing matrices, more benefits than downsides. You may also organize a matrix to be more GPU friendly by transposing the fields directly into the matrix struct (SharpDX is not doing ...


1

What I would try to do is get rid of the draw depth calculation by drawing your tiles in the correct order to start with. What this means is, you'll be drawing your back layer first, then the middle layer, then the top layer. If your tile sprites overlap (e.g. isometric view) you may also need to draw the back row first, then the next and so on and ...


2

This is a good question. I was trying to express that instead of holding an array of pointers to game objects, you can hold an array of game objects themselves, as pointed out by API-Beast in the comments of your question. You can implement this swap operation like this, assuming the array holds structs with simple data (structs with ints, floats, etc., no ...


0

It really depends on what you're trying to render. For example, if you're rendering layers of clouds that are transparent to the background but not necessarily to each other, one useful trick is to draw the background, then non-transparent cloud layers, then draw the background again at 50% transparency over the other layers.


4

Games will not benefit that much by having 4 cores instead of two. Here's why. Basic Game Engine: 1 Thread The problem with graphics API like DirectX and OpenGL is that it must be runned on one thread, and one thread only. So a basic game engine will run all of the logic and render logic into a single thread. These engines will often use a time delta to ...


3

For your first question you can optimize your method by only checking collisions with the border bubbles (only the bubbles that are actually exposed and not ones that are entirely surrounded). However, you can optimize this even further by using the fact that you know the coordinates of the bubble to find out approximately (or precisely, with some math) ...



Top 50 recent answers are included