Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Particle issues

Author
Message
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 9th Jul 2012 21:25
Has anyone run into an issue with Particles that an Image that is already loaded won't work for a bit until it randomly decides to? However if you load an Image for use with particle directly it works immediately? Could this be an issue with only having one Sync call and being too nested? I am in Tier 2. Right before the particle gets created I call a Getspriteimageid so I can grab what images to base my particle on and found that doesn't work as well. It only seems to work correctly with a loadimage.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Jul 2012 22:06
It sounds like we might need to see the code you are doing this in. If it is a nesting issue, then we'll be able to tell.

Keep in mind that if you do something that changes the display that you expect to see and then do another something that 'overwrites' whatever you did and only do one Sync() call, you will never see the first thing.

Cheers,
Ancient Lady
AGK Community Tester
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 10th Jul 2012 06:35
After getting some time to test, I had found that if I created a particle without using an image ether from the Sprite I was colliding with or trying to use a loaded image, the Particle would play correctly.
Not sure why this is the case.
To make sure that my function works I did a click test with my mouse that if I had my left button down while over a sprite, it would fire the particle.
Still working out some of the looping issues. I may have found a spot where I can improve my code and will try that first. We will see if it works.
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 10th Jul 2012 21:15
While the way I tried may or may not work what may work is to build a particle object that is attached to each of the objects I am colliding with. Then fire those when collided with. Will try that when I have a chance.
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 12th Jul 2012 21:18
Still running into this issue. It seems that if I load an image for the particle it will not show but if I leave it without an image a white particle will show. What is the default depth of particles? I wonder if it could be related to that.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 12th Jul 2012 22:49
Let's see some code, but are the images part of an atlas?

My experience is that if the image is not available, you see the black/white checkered image with the red x.

I used to hate the thought of governments having orbital mind control satellites,
but now I can't really seem to care.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 12th Jul 2012 23:01
default particle depth is 10 like all agk sprites.
there is a set particle depth.

you need to supply an IMAGE to the particle NOT a sprite!
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 13th Jul 2012 00:27
Images are not part of an Atlas Texture and Yes I know they need to be an image.Basically I am using the same code out of the Particle Sandbox except instead of the image that I used in that, I am using the image is from my project. And what is strange is that the function I used works outside of where I have it. I'll post what I can but I will obfusicate some stuff.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 13th Jul 2012 05:37 Edited at: 13th Jul 2012 05:39
Never mind, I see you are in Tier 2.

I used to hate the thought of governments having orbital mind control satellites,
but now I can't really seem to care.
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 13th Jul 2012 06:15
Yes the dreadful Tier 2. Actually it's not that bad.
However I found the issue and it's not me! YAY! Or at least I don't think it's me.

I found that with Particles you can't use the same Image ID that you use for any Sprite or at least it doesn't work correctly with using the same Image ID. It has to be a completely different Image ID. Although in some strange cases it works. It's very odd.

Take for example this code. It does not work.
I've Created a Sprite with that Image. Try and Create a Particle with that same Image ID. Nope does not work.
I probably need to report this as a bug unless anyone else has some insight on this.


Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 13th Jul 2012 06:28 Edited at: 13th Jul 2012 06:41
It's working on this end XanthorXIII. You may have answered this but which version of AppGameKit are you using?



I should say that the sprite is in the top left hand corner.

Attachments

Login to view attachments
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 13th Jul 2012 07:15
1.076 is the version that I am running on.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 13th Jul 2012 10:16 Edited at: 13th Jul 2012 10:37
That's the version I'm using.

I'll play around with it a bit more and try to reproduce the problem.

Edit- Which version of Visual Studio are you using?

If you like, upload your demo and I'll download it and test it straight out of the box.

XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 13th Jul 2012 14:33
I'm running Visual C++ 2010 Express.
The only other thing I can think of is that I am using Orac's templates for setup. I'll try a clean template and see if that makes any difference.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Jul 2012 15:53
Test it with the latest AppGameKit templates as they might have changed things in 1076
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Jul 2012 18:02
The Tier 2 templates in AppGameKit don't work properly without doing a bunch of file copies and edits from the interpreter.

There are posts with the fixes needed to make the templates work.

(I'm just back from vacation and have a lot of posts to get through, otherwise I'd find the exact post with the suggested fixes.)

Cheers,
Ancient Lady
AGK Community Tester
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 25th Jul 2012 07:27 Edited at: 25th Jul 2012 07:33
I was playing around some more with this recently.
Here is what I am finding at least when I'm trying to compile a test project. You can't use an Image that is already assigned to a Sprite.

The project was created using the VS 2010 Template.
It loads an Image called Cat.png, creates a sprite from that image and then later in the code it creates a particle from that image.
The particles appear white however the sprite loads.
If you comment out the section where it creates and positions the sprite, the particles show the correct sprite.

I've included a test project on this post so you can try it on your machines.

Attachments

Login to view attachments
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Jul 2012 11:48
I've just looked at your code and you seem to have forgotten to set the particle's image. Try adding this line beneath all of the other 'setParticle' commands.

agk::SetParticlesImage(testID, 1);

XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 25th Jul 2012 14:48 Edited at: 25th Jul 2012 14:49
I've added that and all I get is white squares. If I load the cat image to another id say 2 and switch it to that, they finally display.

Here's the picture of what I am seeing.

Attachments

Login to view attachments
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Jul 2012 15:10
Strange because it works for me.

Attachments

Login to view attachments
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 25th Jul 2012 15:22
There's gotta be something different.
I'm adding the correct paths to the Include and the Libraries for VS2010.
You're not using Visual Studio 2010 by any chance are you?
I'm on Visual C++ 2010 Express.
This doesn't exactly make sense. Up until this point, everything else is working except the Particles.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 26th Jul 2012 03:55
Quote: "You're not using Visual Studio 2010 by any chance are you?
I'm on Visual C++ 2010 Express."

I'm using Visual Studio 2010 C++ Express Edition. (see attached)

I'm using Windows 7 32 bit.

Attachments

Login to view attachments
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 26th Jul 2012 04:33
I'm running on Windows 64 Bit on both machines I have access to.
Both are 1.076. Same results on the two machines I have. One hasn't even had AppGameKit installed on it.

I'm still trying to figure out why yours is reacting correctly and mine isn't. I think I have everything setup correctly.

Can I have you run an MD5 Hash check on your LIB file and compare with my result?
Thanks.

6D0022767A669F29ADC5FFCAEB341B77
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 26th Jul 2012 11:11
Debug: 6d0022767a669f29adc5ffcaeb341b77

Release: 7ab05b77b893f5f9a82e2541c7e0169f

I compiled your project in Release.

XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 26th Jul 2012 15:15
What steps did you use to setup the template?
I had only pointed to the Include and Libraries for both Debug and Release.
Is there anything else that I need to do?
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 26th Jul 2012 22:07
What video card are you running by chance?
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 27th Jul 2012 00:50
Quote: "What steps did you use to setup the template?"

The ones in this video.

Quote: "I had only pointed to the Include and Libraries for both Debug and Release."

That's exactly what I've done. I haven't done anything extra (that I remember).

Quote: "What video card are you running by chance?"

Nvidia GeForce GT 230M

XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 27th Jul 2012 00:54
I am running an Radeon 5850. I am going to try this on a different video card. I have a funny feeling this is a video card issue.
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 27th Jul 2012 03:21
Yup, just confirmed. Bug with Radeon Graphics Cards. This is going between my laptop and my desktop. Both with updated drivers. Good thing my laptop had switchable graphics so I was able to test on it. Bad thing is that the Intel Display won't extend to my monitor which is a must for me to continue working on it.
So ether this is an issue within AppGameKit displaying to Radeon cards or this is an issue with Radeon cards and OpenGL.
I have three options, ether I go and buy a new video card for my Game Machine and use that to program on, build a new machine to develop on specifically using a Nvidia Based Card or I wait for TGC to fix the issue.
Myself I'd like to go punch AMD in the face for such a poor implementation of a industrial standard.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 27th Jul 2012 03:55 Edited at: 27th Jul 2012 04:07
What happens if you use an image with the dimensions to the power of 2?

Edit I've attached an .exe, if you run it on your computer with the Radeon GPU, are the particles working?

Attachments

Login to view attachments
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 27th Jul 2012 04:28
Same thing.
I've gone ahead and reported this as a bug and included my example.
Thanks though.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 27th Jul 2012 09:16
I can confirm this on Radeon 5700 - Win7 x64 - output 100 Hz.

Same on Radeon 4300 - Win7 32.

I've tried resizing the image to various dimensions - even 32x32 but the particles are still white!

-- Jim
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 27th Jul 2012 21:38
I guess I am surprised this wasn't discovered before. Jim, thanks for checking this out for me. Hopefully TGC can get a fix in for this.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 28th Jul 2012 00:01
Just curious, what happens if you create the particles with the image and then create the sprite? So particles first, sprite last?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Jul 2012 01:03
How about a project that does nothing but one set of particles and absolutely nothing else?

Cheers,
Ancient Lady
AGK Community Tester
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 28th Jul 2012 04:24
@Hodgey - Oddly enough that works but I still consider it a bug as I should be able to create a Particle using an image that had been used to create a sprite first. I will update my Bugboard post to indicate that. Some sort of ordering error for ATI and Textures?

@Ancient Lady - I'm confused what you are asking for. I'm fairly clear on this and Jim confirmed for me that he was running into the same issue with the project. For people running ATI Cards, if you create a Sprite using an Image ID and then go on to try to create a Particle using that same Image ID, the Particle does not show correctly or in some cases starts to randomly play.
If you are on a Nvidia or Intel card this doesn't affect you. It affects you if you are on ATI.
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 28th Jul 2012 04:54
Quote: "Some sort of ordering error for ATI and Textures?"

I wouldn't know. I don't know a lot when it comes to the hardware side of things. I wish I did.

Quote: "@Ancient Lady - I'm confused what you are asking for. "

She's asking for a fresh project, just with particles and no other sprites or anything that might interfere with the particles. You may have answered this already:
Quote: "However if you load an Image for use with particle directly it works immediately?"


For now we're just seeing what works and what doesn't.

What happens if you call agk::Update(0) immediately after you set the particle image?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Jul 2012 05:17
Quote: "I'm confused what you are asking for."

Hodgey is right about what I was looking for. I was wondering if a project that only created a particle set had the same issue as one that did the particle set and something else. But it looks like you can show that it is a creation order issue, so my test isn't necessary.

Cheers,
Ancient Lady
AGK Community Tester
XanthorXIII
AGK Gold Backer
13
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 29th Jul 2012 20:16
The next thing I may try is creating a hidden Particle that fires at the start of the program or displays at the beginning of the game. That may possibly resolve my issue. It seems to work ok once a particle has been created and display. Still torked off that ATI is causing me issues with their crappy drivers. Ancient Lady, Hodgey , Jim, BJ and Rich, thank you for working with me on this. Hopefully I can have an answer for other ATI users.

Login to post a reply

Server time is: 2024-11-23 19:48:33
Your offset time is: 2024-11-23 19:48:33