Tag Info

New answers tagged

2

I don't know what you want to use to render the games, but in general, that is possible. In Monogame for example it is just changing the "Color.White" to the color you want (e. g. Color.Green) What you are trying to archive in the image above won't be possible using a pure tile-based approach: Some tiles on the border between the green and the original are ...


2

in your Tile.render function you are multiplying the coordinates with the (half) width and height of the current image. But keep in mind that the grid-size of your world is fixed to the size of a normal tile. When you move an object 2 units to the left, its own size is irrelevant. Only the size of the unit matters. Calculate the position based on the size ...


1

I'm not sure how you have your axes set up, so this will work for any situation where the faces are parallel. Subtract ax from bx. (ax is any point/vertex on face/edge a, bx is any point/vertex on face/edge b) This gives you a vector. Then do a vector projection onto the normal of the face you are testing (which is a unit vector). I.e.: #pseudocode v = bx ...



Top 50 recent answers are included