Few ContentManager questions

Nah… Sleep’s overrated.
:smile:

1 Like

@raizam, I know that components are the way to go in fact the first time I saw the GameComponent and DrawableGameComponent classes I thought “what a good idea!” but a few weeks after that I read that post and I thought that he said that because Microsoft will remove those classes from the XNA. I read that post a long time ago that’s why I told you in my first reply

In fact yesterday I was reading the XNA demo ParticleSample_4_0.zip (a 2D particle engine) and it was written as a DrawableGameComponent. I’ve separated the particle systems to a new class library project so I can use it in any game writing a very few lines of code. If somebody is interested in the demo I can share the code. I ported it to VS 2015.

Well… I think I learned something new today :slight_smile:

Thank you guys.

hehe no worry @vcRobe. I know that I also tend to overeact with these kind of discussions, I tend to be too passionate =)

I’d be interested indeed! Especialy that the particule engine from Monogame.Extended, while looking very well done, isn’t implemented as a component. and I’d like to see how they compare.

Here’s the 2D particle system that I ported to MonoGame. I did minimal changes to the original

Here’s a 3D particle system from the XNA community. This is more advanced because it uses HLSL to animate the particles. I tried to port it to MonoGame but for some unknown reason the particles aren’t displayed (they’re displayed in the original project using XNA) but I don’t know how HLSL work so I gave up (for now). It’s a DrawableGameComponent too.

I Hope this help!

Hey @vcRobe,

About the 3D version, I’ve read somewhere here about someone that was having hard times to port his HLSL effect from XNA to Monogame (can’t find the thread) but in the end he could resolve it by changing the way he assigns the uniform parameters.

So he was able to solve it by replacing from:
effect["parameterName"] = value;
to
effect["parameterName"].SetValue(value);

hope it helps

I checked all the parameters of the effects and all are set with .SetValue()