Steam Until the Last Plane

Flaick

Member
This is the trailer of my next game. Is a management of a WW2 airfield. The core part of coding was the Path; i make lot of them to show the mechanics and planes travel all round the airfield. It will take another 6 months to finish.




 
Last edited:

Flaick

Member
The hard part in this game were Paths. For planes moving around, i went with Paths created into Room IDE; but for mechanics (those black little pixel) i've created a runtime path. This is the code:


Code:
if(target != noone) {
    //Check if target need repair
    if target.damage != enum_damage.fixed {
        //Get the collision grid
        var m = instance_find(o_grid,0);       
        if m != noone && my_path < 0 {
            my_path = path_add();
            //Check if can go
            var can_run = mp_grid_path(m.collision_grid, my_path, x, y, target.x, target.y, GRID_DIAGONAL);
            if(can_run) {
                //Start path
                path_start(my_path, 1, path_action_stop, true);               
            }
        }
    }
}
o_grid.Create():
Code:
collision_grid = -1;
collision_grid = mp_grid_create(0,0,room_width, room_height, room_width / GRID_TILE, room_height / GRID_TILE);
if collision_grid >= 0 {
    mp_grid_add_instances(collision_grid, o_hq, false);
    mp_grid_add_instances(collision_grid, o_workshop, false);
    mp_grid_add_instances(collision_grid, o_warehouse, false);
}
Where "target" is the instance_id of the plane.
Tell me if you think there is some big mistake.
 

Flaick

Member
I've added the light effects coming out from windows. It's a white circular sprite drawn with sprite_draw_ext() and setting color yellow and alpha 0.3. I know is simple, but for a guy like me is a big step :)

What do you prefer? Small, medium or large?

lights.gif
 

Flaick

Member
Hi guys, just to tell that my demo is ready to download from Steam:

I would be happy if you can give your technical feedback.
 
Top