• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Action scene - Animated background like in megaman or manags

1up Indie

Member
GM Version: GMS2
Target Platform: All

Summary:
This video tutorial shows you a very neat way how to make an action screen with particles in gamemaker studio. Technically you would call this vfx (visual effects) but action screen has more punch in the wording.

Where have you seen such a thing before?

In good old mangas or animes where you have an action sequence or in video games where something is shown in a flashy way (megaman etc.). Here I will guide you very fast how to recreate such a cool effect with only a few steps.


Video:



First the animation object:

Create:
Code:
display_Width  = camera_get_view_width(view_camera[0]);
display_Height = camera_get_view_height(view_camera[0]);

center = display_Height/2;

spread_Close      = display_Height/5;
spread_Near       = display_Height/4;
spread_Distant    = display_Height/3;
spread_Everywhere = display_Height/2;
Step:
Code:
var cluster = choose(1,1,2,2,3,3,4);
var yCenter = 0;
   switch (cluster)   {
       case 1:  yCenter = irandom_range(-spread_Close, spread_Close     ); break;
       case 2:  yCenter = irandom_range(-spread_Near, spread_Near       ); break;
       case 3:  yCenter = irandom_range(-spread_Distant, spread_Distant ); break;        
       case 4:  yCenter = irandom_range(-display_Height, display_Height ); break;  }

part_particles_create(obj_ParticleSystem.ParticleSystem,
            display_Width + 100, center + yCenter, obj_ParticleSystem.particle_Stripe, 1 );
Draw:
Code:
gpu_set_blendmode(bm_add);
draw_sprite_ext(spr_Particle_Stripe, 0,  display_Width/2, center, 5, random_range(5.8,6), 0,c_white , 0.7 );
gpu_set_blendmode(bm_normal);



Second the particle setup object:

Create:
Code:
ParticleSystem = part_system_create();

particle_Stripe = part_type_create();


part_type_sprite(particle_Stripe, spr_Particle_Stripe, 0,0,0 );
part_type_size(particle_Stripe, 0.1,2, 0, 0);
part_type_scale(particle_Stripe, 1,0.4);

part_type_direction(particle_Stripe, 180,180,0,0);
part_type_speed(particle_Stripe, 5,10, 2, 0);
part_type_blend(particle_Stripe, 1);
part_type_alpha1(particle_Stripe, 0.1);

part_type_life(particle_Stripe, 60,60 );
 
Top