i am developing an Isometric golf, I have made it to isometric part and have the ball move around.
my question now is this, what approach should I use in placing some objects (obstacles) on the map, and also i have plans of screen scrolling on it, can I use a tile based approach? or any other approach you can suggest.
circle with circle collisions is next to bounding box intersections one of the easiest.
You just check for the distance of booth circles centers (not in screen coordinates but top coordintes). if its smaler as booth´s cicrles radians multiplied you have a collision,
eg.:
PHP Code:
var dx = ball.x - circle.x;//delta X
var dy = ball.y - circle.y;//delta Y
var d = Math.sqrt( dx*dx + dy*dy);//distance of the 2 to each other hint: Pythagoras
if ( d <= (ball.radius + circle.radius ){
trace("hit!!");
}
that depends how you´ve written your engine. In the past when I was more into static isometric stuff I always coded the engine so that it operated in world X,Y and perhaps Z axis so that collision, physics, placement, AI and many many more things were easier to imagine and solve.
Working with screen coordinates is not efficient at all for iso stuff because you´d push more and more bricks in your way making things in the end just more complicated.
kind of like this stuff: http://www.kirupa.com/developer/acti...ransforms3.htm
the same applies to console iso or 3d game engines, where objects are placed using X,Y,Z coordinates and volume is defined with width, height and depth. The engine itselfs then plots those information to the 2d screen - just like in that tutorial.
if you did your engine similar to what I just described it should be no problem.
If the isometric tile ratio was 2:1 then you could simply half the y distance or, of course, double the x distance (but that would be a little less accurate)..
The above method that render is talking about is even more acurate since then you'll have you x, y & z coordinates!!
i am developing an Isometric golf, I have made it to isometric part and have the golf ball move around.
my question now is this, what approach should I use in placing some objects (obstacles) on the map, and also i have plans of screen scrolling on it, can I use a tile based approach? or any other approach you can suggest.
thanks in advanced..
Which approach you had applied at that time. Tile based or the other one?
wow an ancient thread, well that shouldn't stop you from helping the user, I asked the developer a year ago on a thread to fix something and im still looking forward to that reply. Probably never the owner of the programs last logins 2 years ago.