July 20th, 2013, 07:45 PM
Game Design: How to draw Sprites in Partial Grid Squares
I have been puzzling over a question for a couple months in regards the system that is used to draw objects for a game. I have thought of using a grid to draw sprites and detect collisions. That scheme makes sense to me.
However, I started to wonder about the possibility of a sprite that takes up half of a square on a grid. I figured there had to be a system where I could draw a two sprites that take up half of the same square on a grid. At that point we really aren't talking about a grid anymore or maybe we are talking about a smaller grid within that square on the grid.
As you can see, I'm rather puzzled by how this is implemented. I'm hoping that there is someone who can point me in the direction of a technique that is used for implementing this.
July 21st, 2013, 04:16 PM
Have you tried to search for game collision detection 2d
IMO, moving object should be controlled at pixel position.
The simple is to have an invisible box and use the x,y value of the four corners to see whether there is a "hit"/collision.
July 22nd, 2013, 01:54 AM
Use some physics engine
Though you can use some simple techniques like bounding box, or bounding circle. But I would suggest that you use some physics engine for some serious game development. Box2D is a famous 2D game physics engine...became famous after its use in Angry Birds. For 3D, you must try something like Unity3D or other free engines and editors.
Comments on this post