V
valryon
Guest
Hello!
I'm doing a little DOOM demake for fun as a 2D run'n'gun game and I'm learning GameMaker Studio 2 with it.
As this is a fun and unfinishable project I want to have a web playable version but I'm encountering several issues with the HTML5 export.
The game is actually playable here, I'm linking for context: https://2doom.itch.io/game
I have two main issues :
1/ Performances are very poor in browsers (FF and Chrome) if I don't add some tricks. The playable version above includes those tricks.
Tricks = I added a "manual culling" (instance_deactivate_all then instance_activate_region) running every frame around the player, but it mess up some collisions (mobs and props going through the floor).
Now, I know that the level is huge and filled with too many things and I'm doing collisions with invisible boxes so I udnerstand this is not optimal :
BUT I have a steady 300 FPS on the Desktop version (PC and Mac) and 5 FPS on the web if both without culling...
2/ When you hit an enemy, they should have a "white hit flash" for few frames. I tried with a shader, it was fine on standalone but not in HTML5.
I switched to gpu_set_fog white and got the same effect but also the same incompatibility in browsers.
Note that :
- The game is 100% functionnal on desktops. It really is the browser export the issue.
- WebGL is required. Performances are mostly the same if WebGL is disabled.
- I tested with Firefox and Chrome up-to-date
I'm not sure 1 is solvable and I managed to get 80% of the level without too much bugs. But point 2 is really annoying.
Any ideas? Thanks!
I'm doing a little DOOM demake for fun as a 2D run'n'gun game and I'm learning GameMaker Studio 2 with it.
As this is a fun and unfinishable project I want to have a web playable version but I'm encountering several issues with the HTML5 export.
The game is actually playable here, I'm linking for context: https://2doom.itch.io/game
I have two main issues :
1/ Performances are very poor in browsers (FF and Chrome) if I don't add some tricks. The playable version above includes those tricks.
Tricks = I added a "manual culling" (instance_deactivate_all then instance_activate_region) running every frame around the player, but it mess up some collisions (mobs and props going through the floor).
Now, I know that the level is huge and filled with too many things and I'm doing collisions with invisible boxes so I udnerstand this is not optimal :
BUT I have a steady 300 FPS on the Desktop version (PC and Mac) and 5 FPS on the web if both without culling...
2/ When you hit an enemy, they should have a "white hit flash" for few frames. I tried with a shader, it was fine on standalone but not in HTML5.
I switched to gpu_set_fog white and got the same effect but also the same incompatibility in browsers.
gpu_set_fog(true,hit_color,0,1)
draw_self()
gpu_set_fog(false,hit_color,0,1)
draw_self()
gpu_set_fog(false,hit_color,0,1)
Note that :
- The game is 100% functionnal on desktops. It really is the browser export the issue.
- WebGL is required. Performances are mostly the same if WebGL is disabled.
- I tested with Firefox and Chrome up-to-date
I'm not sure 1 is solvable and I managed to get 80% of the level without too much bugs. But point 2 is really annoying.
Any ideas? Thanks!