Hey all,
I’m new in game design so i want to start with a simple turn based rpg-like game. The grid itself is 2d, the graphics will make it have a isometric effect.
Now i must choose a tile format. Originally i was thinking of a simple square grid: |_|, but for the 3d feel diamand shape tiles look better: \/. The problem with that is that way i cant use the rect function for collision detection. If the stylus touches a specific tile f.e.
What’s the best method to do collision detection on the tiles when they are not sqaure?
I use now:
Where m_position is the rectangle that i use for collision detection.
Gr,
jeemig
I’m new in game design so i want to start with a simple turn based rpg-like game. The grid itself is 2d, the graphics will make it have a isometric effect.
Now i must choose a tile format. Originally i was thinking of a simple square grid: |_|, but for the 3d feel diamand shape tiles look better: \/. The problem with that is that way i cant use the rect function for collision detection. If the stylus touches a specific tile f.e.
What’s the best method to do collision detection on the tiles when they are not sqaure?
I use now:
- Code:
void HekkusSample::DrawTile(Surface *image, int x, int y)
{
int h = x*80;
int v = y*80;
Display* display = GetDisplay();
display->Blit( h, v, image);
m_position[x][y].Set(h,v,h+80,v+80);
}
Where m_position is the rectangle that i use for collision detection.
Gr,
jeemig