#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2012
    Posts
    103
    Rep Power
    3

    Game Design: How to draw Sprites in Partial Grid Squares


    Hello,

    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.

    Cheers, Cam.
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,696
    Rep Power
    1959
    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.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Lightbulb 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

    • Cameron0960 agrees : Thanks for the info. I started looking into Box2D. Tutorial away!

IMN logo majestic logo threadwatch logo seochat tools logo