• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Particles and HTML5

M

mjadev

Guest
I have created a game for GMC#8.
I have used some particles FX which are working well in the WINDOWS version.

After the jam, I have compiled the HTML5 version and the particles FX are not working.
I had a look in the GMS2 manual and forum but didn't find why it does not work...

I have implemented the code in my player object as follow:

code in create event of player
// part system creation
ps = part_system_create();
part_system_depth(ps, -1);

// part. types
global.pt_Effect1 = part_type_create();
part_type_shape(global.pt_Effect1, pt_shape_flare);
part_type_size(global.pt_Effect1, 1, 1, 0, 0);
part_type_scale(global.pt_Effect1, 1, 1);
part_type_orientation(global.pt_Effect1, 217, 309, 0, 0, 0);
part_type_color3(global.pt_Effect1, 255, 4227327, 8454143);
part_type_alpha3(global.pt_Effect1, 1, 1, 1);
part_type_blend(global.pt_Effect1, 0);
part_type_life(global.pt_Effect1, 80, 80);
part_type_speed(global.pt_Effect1, 4, 6, 0, 0);
part_type_direction(global.pt_Effect1, 128, 174, 0, 0);
part_type_gravity(global.pt_Effect1, 0.10, 265);

and in the step event:
// Emitters
global.pe_Effect1 = part_emitter_create(ps);
part_emitter_region(ps, global.pe_Effect1, x-8, x+8, y-8, y+8, ps_shape_rectangle, ps_distr_linear);
part_emitter_burst(ps, global.pe_Effect1, global.pt_Effect1, 1);
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Have you checked the option "Use built in particles" in the HTML5 Game Options? If you do not, then the particles will not be drawn unless you set their sprite to be a sprite resource.
 
M

mjadev

Guest
Have you checked the option "Use built in particles" in the HTML5 Game Options? If you do not, then the particles will not be drawn unless you set their sprite to be a sprite resource.
yes it is the case (done by default)

If nothing is visible, I guess you're facing the same issue than this user in this thread:
https://forum.yoyogames.com/index.php?threads/html5-particle-issues.48147/

You should fill in a bug report.
thanks for the link, similar issue
I will do some tests before and post a bug if I can't find a root cause in my code

thanks
 
M

mjadev

Guest
update after some tests

I have
- reduced my particle system to the minimum (removing most of part_type_xxx functions) => still not working in HTML5
- changed part_type_shape() to part_type_sprite() to no more use built-in particles system => still not working in HTML5
- use different depth values in part_system_depth() => still not working in HTML5

and tested with Chrome / Firefox / Edge

I'm using IDE 2.1.4.295 and runtime 2.1.4.218

EDIT:
so also tried to use previous runtimes (2.1.4.212 or 2.1.4.203) and I have following build error :
Missing or corrupt GameMaker build tools : 0x4F030002
(I have cleaned before to recompile)

You confim that particles should work in HTML 5 ?
And why when reverting to previous runtime, I have this error (even when trying to clean the project) ?
 
Last edited by a moderator:
M

mjadev

Guest
I have also tested in GMS1-HTML5 with exactly the same code than GMS2, and it's working... so, certainly a GMS2 pb

as I can not revert the GMS2 runtime to an older version due to the error "Missing or corrupt GameMaker build tools : 0x4F030002" (I'm not alone in this case, and I also filled a bug for that...), I don't know if it is a regression in last runtime
 
Top