Darkstar2
|
|
Posted on: April 19, 2014, 01:36:34 am |
|
|
Joined: Jan 2014
Posts: 1238
|
I wanted to use particles in my games but seems that cannot be used in ENIGMA even though ENIGMA claims to be compatible.....even though it was announced in 2013 and said to be complete and tested. Am I missing something or is this broken?
Using this in a control object, create event.
I tried with OGL1, 3, DX9/11, enabled Part API, does not work nothing displays.
fire1 = part_type_create(); part_type_shape(fire1,pt_shape_line); part_type_size(fire1,0.20,0.60,0,0); part_type_scale(fire1,0.65,2.50); part_type_color3(fire1,16749459,33023,255); part_type_alpha3(fire1,0.04,0.06,0.07); part_type_speed(fire1,0.70,2.60,-0.02,0); part_type_direction(fire1,85,95,0,9); part_type_gravity(fire1,0,270); part_type_orientation(fire1,0,0,10,20,1); part_type_blend(fire1,1); part_type_life(fire1,60,80); emitter1 = part_emitter_create(Sname); part_emitter_region(Sname,emitter1,60,-60,10,-10,1,1); part_emitter_stream(Sname,emitter1,particle1,10);
I even tried ready made parts from the D&D actions, same !
|
|
« Last Edit: April 19, 2014, 01:38:47 am by Darkstar2 »
|
Logged
|
|
|
|
|
Darkstar2
|
|
Reply #2 Posted on: April 19, 2014, 11:39:19 am |
|
|
Joined: Jan 2014
Posts: 1238
|
They were done at some point, but then became broken. They no longer work in all of the graphics systems. I would want the original developer of the particle system extension to fix that, but I am not use if that will happen.
lol- holy crap there sure are lots of things broken in ENIGMA as I'm discovering, makes it very difficult to use ENIGMA to make a game as you are limited from many sides. What a shame for the particles though because there are very complex effects you could do with them without requiring pre-rendered stuff all over your game Also I recall the dev post stating it was completed and fully tested and on par with GM's........so I am confused. Wouldn't it be best to REMOVE all these non working features from ENIGMA, it can confuse the fuck out of some people particularly those new to ENIGMA. To me if I see a particles extension and functions, it means they can be used. BTW, I tried the particles functions in every gfx system, dx9, 11, ogl1.1, ogl3, nothing works. If worse comes to worse I will use pre-rendered, it's just time consuming but I'm not going back to using YoYoShit. one thing that is good with ENIGMA is support for many useful functions that were removed due to lazyness by yoyo, but problem is I'm beginning to wonder what kinds of games can you do with ENIGMA, with many reportedly broken or non working things, it's a bit discouraging..... So with lights broken, 3d broken, particles broken, collision/path finding, and few others, what does it leave people to make ? BTW I think the way YYG is heading sucks major dick. I don't expect their new IDE to be anything worthy to begin with, I can see more and more that they are breaking apart GMS further with their new gayness, can't fix it, then either leave it there or remove stuff. No wonder people make shitty games, not because of lack of interest but because of a shitty product they have (GM Studio) with an $800 option to export your shit to other platforms...........
|
|
« Last Edit: April 19, 2014, 11:44:17 am by Darkstar2 »
|
Logged
|
|
|
|
TheExDeus
|
|
Reply #3 Posted on: April 19, 2014, 03:43:21 pm |
|
|
Joined: Apr 2008
Posts: 1860
|
Also I recall the dev post stating it was completed and fully tested and on par with GM's........so I am confused. It was. It has all the features as far as I know and worked perfectly with GM's examples and games that used particles. But that happened some time ago (2012 and early 2013) and since then there has been massive changes in all graphics systems. That is probably why they don't work any more. So with lights broken, 3d broken, particles broken, collision/path finding, and few others, what does it leave people to make ? That sadly is what happens when less than 2 people actually work on ENIGMA. And of course we also lack proper backwards compatibility testing, so when adding new stuff, old one usually breaks without knowing. So all the things you mentioned worked at one point or another, but when new stuff was added it all broke. Lights and 3D should work in GL1 just fine. They were also fixed in GL3, but that has not been merged because of some ATI bugs. Collision works as far as I know. And path finding also works, although we don't have path_start() working (as that allows modifying instance variables which are not possible via extension right now). I actually encourage Robert to drop feature additions and start working on fixing things. That is why I haven't really added features for some time now. I rewrote GL3 (thought not completely), but it didn't add any features as that wasn't the point. Same with matrix function rewrite. forthevin is the one who made the extension. Maybe he can look at the newest GIT master and fix it.
|
|
« Last Edit: April 19, 2014, 03:45:23 pm by TheExDeus »
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #4 Posted on: April 19, 2014, 07:34:05 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
I've been trying to look more into particles, not convinced 100% they are not working at all. Funny but I managed to make them work in GL3, in GL1 they look funny LOL, the snow flakes are squares, in GL3 they have proper shape. Anyhow sometimes they work but eventually as you run, test re-run they fuck up, work and instances disappear, and weird shit happens, but the fact I managed to make them work (the effect D&D part) I suspect it has something to do with opengl init bugs or something not properly initialized ?
I also figured what was causing the endless looping and trailing of instances, you need to turn on a background. lol! fuck me, what was I thinking there. I think now the particles thing might need some tweaking, as it's there and should work but there might be something minor need changing to enable it to work all the time and not intermittent or stop working after several re-runs.
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #5 Posted on: April 19, 2014, 11:27:13 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Ok an update I played around and noticed the following: First, particles ONLY work through the effect D&D (action_effect). ALL particle GML functions are not working in ENIGMA, what a shame. So you can only use pre-made ones under D&D. Second, OGL1 fucks up the effects, example snow flakes are square flakes, smoke is a series of squares, flares are a circle made of squares, etc you get the picture However under OGL1 when an effect is called ,instances remain visible and work. Third, OGL3 seems to display the effects properly, snowflakes, flares, clouds, smoke, explosions, etc, however the annoying fuck of a thing clears all instances in the room and impossible to re-display them, even tried the draw_self and still does not work So this makes effects totally fucking useless lol! Hope this helps ! To summarize: Particles GML functions don't work, they are dead ! Effects (action_effect) works but only under OGL3 and they are useless for the reasons explained above.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #6 Posted on: April 19, 2014, 11:45:42 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
If I get a chance I can look at fixing these bugs, sorry Darkstar, we're just heavily understaffed, find us some more developers!
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
TheExDeus
|
|
Reply #8 Posted on: April 20, 2014, 05:02:50 am |
|
|
Joined: Apr 2008
Posts: 1860
|
Third, OGL3 seems to display the effects properly, snowflakes, flares, clouds, smoke, explosions, etc, however the annoying fuck of a thing clears all instances in the room and impossible to re-display them, even tried the draw_self and still does not work So this makes effects totally fucking useless lol! I think I know why that happens. GL3 now using shaders is mandatory (so we have our own shader that is used all the time), but extension system uses it's own shader and it doesn't set our shader back afterwards. It's actually easy to fix. But the rest probably would take some tinkering.
|
|
|
Logged
|
|
|
|
TheExDeus
|
|
Reply #9 Posted on: April 20, 2014, 07:59:59 am |
|
|
Joined: Apr 2008
Posts: 1860
|
I will do a quick fix that will make the particle system run on all graphics systems. I will do it by forcing on particlesystem_fallback on all systems. That means all particles will be basically drawn with draw_sprite_ext() function. It will be slower, because particle system drawing can often be optimized just for particle systems. On the other hand our sprite drawing is batched and so one particle system should technically draw using one draw call. edit: Also, Darkstar nothing displays because your code is wrong. 1) You need to create a particle system. 2) You call your particle fire1 and not particle1. So your code would display nothing even particles actually worked. This is correct code: Sname = part_system_create();
fire1 = part_type_create(); part_type_shape(fire1,pt_shape_line); part_type_size(fire1,0.20,0.60,0,0); part_type_scale(fire1,0.65,2.50); part_type_color3(fire1,16749459,33023,255); part_type_alpha3(fire1,0.04,0.06,0.07); part_type_speed(fire1,0.70,2.60,-0.02,0); part_type_direction(fire1,85,95,0,9); part_type_gravity(fire1,0,270); part_type_orientation(fire1,0,0,10,20,1); part_type_blend(fire1,1); part_type_life(fire1,60,80); emitter1 = part_emitter_create(Sname); part_emitter_region(Sname,emitter1,400,550,200,250,1,1); part_emitter_stream(Sname,emitter1,fire1,30); edit2: The fixes are in this commit: https://github.com/enigma-dev/enigma-dev/commit/2a914cc52a1f48379c14dc6b46b1b60ddd9e844c in this branch: https://github.com/enigma-dev/enigma-dev/tree/particle_fixI didn't merge into master so people could test and see if it works and doesn't break anything else. Also, as I implemented draw_get_blend_mode* functions I wanted to know if anyone else has a better solution.
|
|
« Last Edit: April 20, 2014, 08:34:37 am by TheExDeus »
|
Logged
|
|
|
|
|
Darkstar2
|
|
Reply #11 Posted on: April 20, 2014, 02:02:49 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Ok tested. 1) BTW, is there a faster way to download files that have been modified instead of opening each file in a text editor copy / pasting ? Is there a way to directly download the modified files? 2) Seems to work All gfx systems, indeed. They look like they are supposed to, no more squares display above / below works now, before it didn't. As far as speed, in a side scroller where I would use streamed particles in areas I would personally have them disabled when they are off view, I guess I see what you mean by "slower"
|
|
|
Logged
|
|
|
|
TheExDeus
|
|
Reply #12 Posted on: April 20, 2014, 02:24:47 pm |
|
|
Joined: Apr 2008
Posts: 1860
|
Thanks I will test this later today. You mentioned a quick fix by setting back shader, so if I understood correctly this would be a faster / more optimized way of displaying particles, but what are the downsides for this compared the the sprite_draw(ext) ? Yes, in GL3 that would technically be faster than using draw_sprite_ext() for every particle. I cannot say any specific number, but it still should be faster. When they are fixed (of if they are fixed) we could do some benchmarks. There are no real downsides besides the fact we would need to maintain more code. The draw_sprite() method also means things like lights work on particles, while if we used a custom shader they wouldn't. Also, it wasn't as "quick" as I thought, as particles in GL3 crashed the game for me (unlike you who only had problems with drawing), so I ended up turning on the fallback. 1) BTW, is there a faster way to download files that have been modified instead of opening each file in a text editor copy / pasting ? Is there a way to directly download the modified files? You can do "View->Raw->Save As", but that is the same as copying. You can also download the whole branch via "Download Zip" from this page https://github.com/enigma-dev/enigma-dev/tree/particle_fix . Then copy all the files. But be careful not to overwrite your own custom changes if there are any. I just often have several version. Like enigma_master and enigma_test folders. In them I just pull all the changes via Git For Windows. As far as speed, in a side scroller where I would use streamed particles in areas I would personally have them disabled when they are off view, I guess I see what you mean by "slower" Is it actually slow/slower for you? Or you cannot notice? Because I think you shouldn't really be able to notice. As I said our sprite rendering is actually quite optimized. Especially when you use the same sprite image to render a lot of sprites (just like particle systems do) and so in both GL3 and GL1 the particle system should use the batcher. Although there is possibly a bug why it doesn't (we call draw_set_blend_mode() before all sprite drawing which could make the batcher flush. I will test this later).
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #13 Posted on: April 20, 2014, 04:25:47 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Yes, in GL3 that would technically be faster than using draw_sprite_ext() for every particle. I cannot say any specific number, but it still should be faster.
But question is, are there still many people who have GFX cards without OGL3 support ? vs. DX9 ? When they are fixed (of if they are fixed) we could do some benchmarks. There are no real downsides besides the fact we would need to maintain more code. The draw_sprite() method also means things like lights work on particles, while if we used a custom shader they wouldn't.
In my opinion, the speed difference will depend on its use. Probably the biggest impact will be with streamed particles particularly (yes I know ) if you use many in your room. But wouldn't that be an issue regardless of whether method used ? I guess in such case it would all come down to how they are used in your game. In cases where there would be many same instances of streamed particles (example a room with walls with several torches, etc....) it would be good to use pre-rendered,(APNG) in this case the same sprite would be used in many places and avoid the processing, on the down side extra memory. Is it actually slow/slower for you? Or you cannot notice? Because I think you shouldn't really be able to notice.
For the pre-made stuff (action_effect) no, did not notice. For my fire1 custom particles, I noticed, but I cannot compare to anything since they did not work for me previously The fire1 example is a streamed particle, first instance does not slow much, but when adding another things start to really slow down. Now I already posted my PC and GPU specs they are up to date and fast, can run all latest games at their full settings. So CPU/GPU is not a limitation.
|
|
|
Logged
|
|
|
|
|
|