• 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!

Legacy GM [Help] 'Breaks' in particle chain

L

Lewis Hammond

Guest
Hey GMC, I've been having an issue creating my particle system. At slow speeds it is fine but as I start to speed up there appear to be 'breaks' in the particle chain. You can see a YouTube video of the issue here:

and the Code here:
Create Event:
Code:
///Engine Particle Intialisation

var EmittDirection

//Creates the particle system
EngineParticles = part_system_create();
part_system_depth(EngineParticles, 1)

//Fragments and their shape, size, ect.
EngineFlame = part_type_create();
part_type_shape(EngineFlame, pt_shape_square);
part_type_orientation(EngineFlame, 180, 0, 1, 0.25,1)
part_type_size(EngineFlame, 0.1, 0.05, 0,-0.005)
part_type_speed(EngineFlame, 11, 20, -0.1, 0.1)
part_type_life(EngineFlame, 70, 100)
part_type_colour3(EngineFlame,c_red,c_orange,c_yellow)
part_type_alpha3(EngineFlame, 1, 1, 0)

//Start
EngineEmitter = part_emitter_create(EngineParticles)
And Draw Event:
Code:
///Engine Particles

draw_self()

//Works out how much the engine needs to be offset by, Change LENX for X offplancement and LENY for Y offplacement
EmittDirection = image_angle - 180
EngineOffsetX = x + lengthdir_x(Engine_LenX,image_angle) - lengthdir_y(Engine_LenY,image_angle)
EngineOffsetY = y + lengthdir_y(Engine_LenX, image_angle) + lengthdir_x(Engine_LenY,image_angle)

part_type_direction(EngineFlame, EmittDirection-5, EmittDirection+5, 0, 2)
part_emitter_region(EngineParticles,EngineEmitter,EngineOffsetX,EngineOffsetX,EngineOffsetY,EngineOffsetY,ps_shape_ellipse, ps_distr_linear)

//EngineOffsetX = x + lengthdir_x(Engine_LenX,image_angle) - lengthdir_y(Engine_LenY,image_angle)  This Creates the bullet always at the gun point, this can be modifed by only having to change what LENX and LENY are Equal to

part_emitter_stream(EngineParticles, EngineEmitter, EngineFlame, (1 * (speed* 0.3)))
 
Last edited by a moderator:
L

Lewis Hammond

Guest
Fixes Tried:
  • Increasing Room Speed to be greater than the ship speed
  • Increasing the number of particles emitted per second
 
Top