I finished the GML code to make the soldier shoot in a isometric environment. The bullet consists of two parts: the graphic bullet and its shadow. The graphic bullet takes care of holding the information about the bullet and how to draw it. The shadow is always at certain distance below the graphic bullet depending on the bullet's height and takes care of collisions (it checks at ground surface for realistic isometric collisions). This is the code to create the bullet in a Game Maker script that runs from the isometric player object's perspective: { the_bullet = instance_create(x,y - height - 5,bullet); the_bullet.direction = point_direction(the_bullet.x,the_bullet.y,user_hud.x,user_hud.y) the_bullet.speed = 5 the_bullet.user_hud = user_hud; the_bullet._height = height - 5; the_bullet._shadow = instance_create(the_bullet.x,the_bullet.y,bullet_shadow); }
A blog about real-world software engineering and development problems and solutions.