GameMaker - Particles: Fire
Description YT
PLEASE LIKE, COMMENT & SUBSCRIBE!
Continuing our look into particles in Game Maker: Studio. We use multi particles within the same system, including using sprites as particles to create a multilayered fire effect.
OBJECT CREATE:
x = room_width/2;
y = room_height/2;
//Particle System
partFire_sys = part_system_create();
//Fire Particle
partFire = part_type_create();
part_type_sprite(partFire,spr_partFire,0,0,1);
part_type_size(partFire,1,2,0,0);
part_type_color2(partFire,c_orange,c_red);
part_type_alpha3(partFire,1,1,0);
part_type_speed(partFire,4,10,0,0);
part_type_direction(partFire,85,95,0,5);
part_type_orientation(partFire,0,359,0,0,0);
part_type_blend(partFire,1);
part_type_life(partFire,20,40);
//Cinder Particle
partCinder = part_type_create();
part_type_shape(partCinder,pt_shape_flare);
part_type_size(partCinder,0.5,1,0,0);
part_type_color2(partCinder,c_orange,c_red);
part_type_alpha3(partCinder,1,1,0);
part_type_speed(partCinder,1,2,0,0);
part_type_direction(partCinder,85,95,0,0);
part_type_blend(partCinder,1);
part_type_life(partCinder,240,320);
//Particle Emitter
partFire_emit = part_emitter_create(partFire_sys);
part_emitter_region(partFire_sys,partFire_emit,x-100,x+100,y-20,y+20,ps_shape_ellipse,ps_distr_linear);
OBJECT STEP:
part_emitter_burst(partFire_sys,partFire_emit,partFire,5);
part_emitter_burst(partFire_sys,partFire_emit,partCinder,-10);
For our complete game tutorial series, click here: http://bit.ly/1yK6XtF
This channel is part of the Geekism Network, for more information on this and other channels visit http://www.geekism-network.com
--- GameMaker: Studio
GameMaker: Studio by YoYo Games is a fantastic free software (with premium paid options) for creating video games in an easy to use workspace. Get it here: https://www.yoyogames.com/studio
--- Music Credits:
"Jazzy Frenchy", "Little Idea" - Bensound.com
Licensed under Creative Commons: By Attribution 3.0
http://creativecommons.org/licenses/by/3.0/