Pages: « 1 2 3
  Print  
Author Topic: Are particles working in ENIGMA? Not for me !  (Read 7052 times)
Offline (Male) Goombert
Reply #30 Posted on: April 22, 2014, 05:36:42 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Quote
Also Robert will probably update the installer later and all will be good with the world. Or we just broke the whole thing *flips table*.
lmfao, I'll update as soon as you can confirm text drawing works while particles are rendering, they wouldn't for me in the example you sent me, but it could also be because I am on an out of date repo.

Edit: I can confirm that they work after pulling Harri's changes and fixing the font ranges to have less than 500 characters, uploading the new Portable ZIP now.


Also, Harri, I want to take a second to mention, we are not going to drop support for the collision detection with particles, we can very easily optimize it out, colliding particles is actually a new feature of Unreal Engine 4 they do it in hardware though using OpenCL.
« Last Edit: April 22, 2014, 05:38:39 PM by Robert B Colton » 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.

Offline (Unknown gender) Darkstar2
Reply #31 Posted on: April 22, 2014, 05:44:30 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Quote
Also Robert will probably update the installer later and all will be good with the world. Or we just broke the whole thing *flips table*.
lmfao, I'll update as soon as you can confirm text drawing works while particles are rendering, they wouldn't for me in the example you sent me, but it could also be because I am on an out of date repo.

Ahhh yes I missed that part.  Here's another funny thing.  In the particle example text drawing was working fine for me on ALL gfx systems :D

But here's the weirdness, I tried making a GML from scratch, and using draw text and whilst particles were being drawn or even image alpha used, text would not be shown :(

I kinda made draw text work by placing draw text inside a draw GUI event and not a Draw event and
it worked.  Keep in mind that testing was after Harri's previous to last fixes :D

When I come home later tonight I will test everything and hopefully ENIGMA is still in one piece lol.
Logged
Offline (Male) Goombert
Reply #32 Posted on: April 22, 2014, 05:51:52 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
I just tested drawing text in an empty game, Harri's example, and Gregs sprite font, and my sprite font, while I was uploading and it all works good so go test yourself with the Portable ZIP and it should be all good.
http://enigma-dev.org/docs/Wiki/Install:Windows
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.

Offline (Unknown gender) TheExDeus
Reply #33 Posted on: April 22, 2014, 06:41:40 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Quote
BTW, wouldn't a person need GL3 compliant hardware to run GL3 ?  I'm assuming most people can run OGL1 :D 
While for some reason this project is some kind of magnet for bad hardware, usually in the wild you will not be able to find anything that cannot run GL3. If you try reading stuff on Stackoverflow, then even back in 2011 people were suggesting targeting GL3.1. So in 3 years I guess there is virtually no reason to. All Intel (the only culprit) GPU's that are built into CPU's also support GL3 just fine. Just like AMD CPU's do. They even support GL4 since about 2012. So there is really no reason not to use GL3. But if you don't do anything GL3 specific (like shaders), then you can run with GL1 and it might even be faster. On Windows you can use DX as well. I just mentioned that because GL is usually better maintained here.

Quote
Also, Harri, I want to take a second to mention, we are not going to drop support for the collision detection with particles, we can very easily optimize it out, colliding particles is actually a new feature of Unreal Engine 4 they do it in hardware though using OpenCL.
We have deflectors and attractors now (I think) and I don't plan to remove anything. I don't think they have general purpose collision detection though. If we want to make GPU based particle system then I suggest it to be a different extension (also for compatibility). UE4 thing is cool, but I am not sure they use OpenCL though. I do know they have a clever use of depth buffer for collisions as seen in this video (https://www.youtube.com/watch?v=RURQSR788Dg), but I think they use the buffer in shaders to update particles.
Logged
Offline (Male) Goombert
Reply #34 Posted on: April 22, 2014, 06:46:57 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
I think it said OpenCL in that video I watched last night, I don't know I can't find anything specific now but it is getting praise for being in the GPU.
https://www.google.com/#q=unreal+engine+4+particle+collision
Quote from: Google
Unreal Engine 4: next-gen gaming effects | fxguide
www.fxguide.com/featured/unreal-engine-4-next-gen-gaming-effects/
Oct 22, 2013 - Unreal Cascade is the Unreal Engine's built-in visual effects editor. ... GPU particle simulation and collision and more in the Unreal Engine 4 ...
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.

Offline (Unknown gender) Darkstar2
Reply #35 Posted on: April 22, 2014, 10:50:35 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Oh my ! what a mess where do I begin :D

There are things not working right, but first:

1) Tested particles, they work in OGL1 and OGL3 same speed as last bench.  DX11 displays black blank screen and so does DX9 !, DX9 worked for particles before.
and I could have sworn DX11 did it  does not matter, I know DX9 did.  So no Harri, particles do not work even in DX9.  Blank screen, so does DX11.  :D

NOW other than particles I found other bugs in ENIGMA;

Here is what I have set up. 
1 sprite ( a block square 64x64)
1 object
1 room
1 instance placed in room

keyboard up increases image alpha by .5
keyboard down decreases image alpha by .5
draw event draw text "image alpha: " and the value of image alpha.

In DX9, the word image alpha is not displayed correctly on screen, the last few characters are gibberish, but strangely I can see the numbers increasing but when it arrives at 1, the 1 does not display correctly.

In OGL1, the text is displayed correctly.

But that's not all...... When increasing/decreasing with keyboard I can see the draw text change but there is no sprite being shown on screen !  Not when there is a draw event.

If I were to remove the draw event completely,

the up/down would control image alpha and the white square would fade in/out and display correctly.

I'm assuming draw text can only be placed in draw events right ?

The only way to make it work is using draw GUI
instead of draw....why ?  The square is fixed and not moving.

I am including my project
https://www.dropbox.com/s/hfdikmyxqz7yw92/ImageAlpha1.egm

I explained all the repro steps above.
by default I set it at DX9, when you run it
pay close attention to how image alpha is displayed
on the screen.  use up / down, you notice
nothing is shown on screen, there should be a white square !

Now use OGL 1.1, text is displayed properly, still no white square.

Now delete draw event (don't just remove the draw text code but delete the draw event completely as leaving draw event blank will also cause the white box not to show !

Once you delete draw event, run and use up/down, the white square fades in/out and displays fine.

So we have 2 problems here.

:D

oh I forgot to add this in, before I get asked, yes I deleted the programdata and temp folders and re-installed ENIGMA using the latest portable!


// update:

Ok figured out why the sprite was invisible when draw event is used, forgot the draw_self();
Please add draw_self(); to the draw event
after the draw text.  This function is not even documented or even mentioned in the wiki ;)

The other issue with text not displaying right still stands, in DX9.

« Last Edit: April 23, 2014, 12:13:55 AM by Darkstar2 » Logged
Offline (Male) Goombert
Reply #36 Posted on: April 23, 2014, 01:41:57 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
I was so confused by your post, you mean the 7.45058e-010 shit Darkstar2? Yeah that is normal, it is called scientific notation and you see it on calculators too with numbers that are too high precision, e is just the logarithmic base. GM however has never displayed scientific notation, I was confused by this as well, basically just use string_format if you don't want that good of an accuracy with printing floating point variables.

Here is the documentation for string format.
http://enigma-dev.org/docs/Wiki/String_format

https://en.wikipedia.org/wiki/Scientific_notation#E_notation

Originally I was opposed to ENIGMA doing scientific notation until I realized how retarded Studio is by drawing really precise numbers, this was a support ticket I used to have open.
https://github.com/enigma-dev/enigma-dev/issues/471

Anyway, the text disappears when you minimize or unfocus the frame in Direct3D because models are destroyed in memory. I am still having trouble getting that shit coded properly, it does not occur in OGL and will never be an issue.

Anyway, as Harri said there is no real point in using Direct3D except that on Windows the runtime is usually installed on the end users PC, so your game will be like 1mb smaller at max because OGL binaries are not included. On certain hardware Direct3D may also perform better, I notice on my hardware it is better with static models, but OGL appears to be better with dynamically batching things.
« Last Edit: April 23, 2014, 01:47:57 AM by Robert B Colton » 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.

Offline (Unknown gender) Darkstar2
Reply #37 Posted on: April 23, 2014, 02:13:48 AM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Nope that's not what I meant lol and sorry for confusing you I thought I had explained it well  ;D ;D ;D
Yes I noticed the scientific shit but I figured why, and so I did not mention it :P

Re-read my post.

the last few bytes don't display properly.

should have posted a screenshot :D

Run my EGM and raise the alpha way up to 1, look at how 1 is displayed - in dx9 it does not show "1" but some garbled text.

the last letter in alpha (the a is garbled too).

In OGL it renders fine.

Here is the screenshot:



I underlined the part I am talking about

it is supposed to read image alpha: 1

Clearly that weird letter at the end is not an a, and that 1 is not a 1.

in OGL it displays fine.

Only does this in DX.

Did you run my EGM file ?

Was I right to add draw_self(); in draw event after the draw_text ? That's the only
thing that allows the sprite to display properly, otherwise only the text gets drawn and no sprite, and yes even without the draw self the text still exhibits the bug.

Also draw_self() is not listed on your wiki.




« Last Edit: April 23, 2014, 02:30:25 AM by Darkstar2 » Logged
Offline (Male) Goombert
Reply #38 Posted on: April 23, 2014, 02:37:19 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Well anyway, I pretty wrote all of the Direct3D code, so I don't necessarily guarantee that any of it works at all :)

But I filed a bug report as this is too trivial to look at for now, OGL works perfect.


You are welcome to add details if you like.
https://github.com/enigma-dev/enigma-dev/issues/702
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.

Offline (Unknown gender) Darkstar2
Reply #39 Posted on: April 23, 2014, 04:04:41 AM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
So you are telling me it works on your end.
:P

What about the draw_self()
it is not documented on the wiki :)

Logged
Offline (Male) Goombert
Reply #40 Posted on: April 23, 2014, 04:09:19 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
No look closely the m is fucking up for me, where as the number 1 is fucking up for you. Which is wierd, but it's doing it in D3D9 for both of us.

Anyway, draw_self is documented.
http://enigma-dev.org/docs/Wiki/Draw_self

For some reason it is listed on the Sprite Functions page.
http://enigma-dev.org/docs/Wiki/Sprite_Functions
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.

Offline (Unknown gender) TheExDeus
Reply #41 Posted on: April 23, 2014, 04:38:03 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Quote
Was I right to add draw_self(); in draw event after the draw_text ? That's the only
thing that allows the sprite to display properly, otherwise only the text gets drawn and no sprite, and yes even without the draw self the text still exhibits the bug.

Also draw_self() is not listed on your wiki.
Yes, you need to draw the sprite when using the draw event. This has been true since the very beginning of GM (I guess version 1.0) and is clearly documented. http://docs.yoyogames.com/source/dadiospice/000_using%20gamemaker/events/draw%20event.html
Quote
the default draw, which is when you define the sprite in the object properties and place no actions or code in the normal draw event, in which case GameMaker: Studio will draw that sprite, but note that any transforms you perform in other events to change the image scale, index, blending etc... will be reflected too as long as the draw event is empty.

        the custom draw, which is when you place code or actions in the draw event. This is telling GameMaker: Studio "I want to control what you draw for instances of this object" and it completely over-rides the default draw. This means that you can have an object with a sprite assigned, then set the draw event to draw text and the sprite will not be drawn as you have not told GameMaker: Studio to draw it.
It even describes exactly your example in the "Custom draw" part.
Also, a lot of things are not documented in ENIGMA wiki.

Quote
Blank screen, so does DX11.  :D
We already determined that blank screen is all you will ever get in DX11. It just doesn't have any code associated with drawing. It cannot load textures, it cannot draw sprites. So you just hallucinated previously. So testing with DX11 is not required as you will not ever see anything until it's properly finished (which can be in a time frame from "a month" to "never").

Robert, can you test DX9 in the newest master? I cannot replicate his blank screen in the particle example. I can replicate it in 3D examples, but that was like that before I touched anything.
Logged
Offline (Unknown gender) Darkstar2
Reply #42 Posted on: April 23, 2014, 02:14:10 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Yes, you need to draw the sprite when using the draw event. This has been true since the very beginning of GM (I guess version 1.0) and is clearly documented.

I only started using GM at version 7, but used it more officially since GM8.  Previous to that I was aware of GM5/6, and wasn't GM1 an animation program and not actually a GM tool ? :P

When I didn't see the sprite I somehow remembered reading somewhere about this and applied it.  I don't recall ever using draw self in GM8.1.

Also, if using Draw GUI instead of Draw, you don't need draw_self :)


Quote
  So you just hallucinated previously. So testing with DX11 is not required as you will not ever see anything until it's properly finished (which can be in a time frame from "a month" to "never").

I'm sure nobody is in a rush to use DX11 anyway :D  And no I did not hallucinate, not reached that stage yet lol.  Perhaps it was automatically reverting to DX9 ? I'm quite sure I saw drawing on ALL engines, because originally when I first used ENIGMA I was curious to experiment with all systems, and sure I used all gfx systems and they all worked.

Logged
Offline (Unknown gender) Darkstar2
Reply #43 Posted on: April 23, 2014, 02:16:57 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
No look closely the m is fucking up for me, where as the number 1 is fucking up for you. Which is wierd, but it's doing it in D3D9 for both of us.

Anyway, draw_self is documented.
http://enigma-dev.org/docs/Wiki/Draw_self

For some reason it is listed on the Sprite Functions page.
http://enigma-dev.org/docs/Wiki/Sprite_Functions

Ok made further tests today, I managed to fix it, well sort of.

If you use the draw_text plain without specifying fonts, it will exhibit weird shit.
So I went in and added a font resources in LGM, inputed Image Alpha:0123456789
and saved. 

In Create event I added the line
draw_set_font(font_0);

(Since font_0 is the name I used in this example).

Setting up and specifying fonts made it work and display properly.

I hope this gives you some clues as to how to fix the problem. 

It's funny that in OGL you don't specify a font and it works.

Perhaps an issue with default settings of something?

Hope this helps.

Just would like to add that with his original fix DX9 was working for particles.
the blank dx9 for parts only occurred during latest changes.
« Last Edit: April 23, 2014, 03:16:39 PM by Darkstar2 » Logged
Offline (Male) Goombert
Reply #44 Posted on: April 23, 2014, 02:52:12 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
TheExDeus, yes I can, Direct 9.0 does not draw anything in this particular example, not the particles, not even the text.
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.

Pages: « 1 2 3
  Print