Slick Forums

Discuss the Slick 2D Library
It is currently Fri Nov 17, 2017 7:20 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sun Nov 26, 2006 8:19 pm 
Offline
Oldbie

Joined: Sat Nov 18, 2006 3:11 pm
Posts: 254
Location: Helsinki
I tryed to make it working but nothing appears on the screen.
I also had a look at BloodEmitter in Virium's source and i still don't get it :cry: .
Please, what are the steps to set up a particule system and render it ?
Thanks !


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 9:56 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
1) Create a ParticleSystem
2) Add an emitter
3) Call render() on the system every frame
4) Call update() on the system every frame

The emitter gets polled each update to produce any particles it wants to. It then gets polled for every particle it created in case it wants to modify them.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 7:03 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
This might help also:

http://slick.cokeandcode.com/index.php? ... 127-065341

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 7:02 pm 
Offline
Oldbie

Joined: Sat Nov 18, 2006 3:11 pm
Posts: 254
Location: Helsinki
Three letters : OMG

A brand new particle editor :D !
Played with it and it's awesome ! Thanks !

And yeah, you should create the "Slick powered" logo for people to add it in their splash screen then Slick's gonna be a standard ^^ !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 7:11 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Slick Powered logo one day, but I don't want any one to feel they have to even mention Slick unless they feel like it. It's just a simple library after all :)

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 8:04 pm 
Offline
Oldbie

Joined: Sat Nov 18, 2006 3:11 pm
Posts: 254
Location: Helsinki
tx, i made it working ^^.
I just wonder how you can serialize emitters whereas emitters contain some code. Maybe it's a stupid question :P


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 8:34 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I'm not sure I quite understand the question, but serializing the emitter in this case is just dumping out its configuration to an XML file. This only works because the ConfigurableEmitter implementation has a set of known configuration options (those you can see in the editor).

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 9:04 pm 
Offline
Oldbie

Joined: Sat Nov 18, 2006 3:11 pm
Posts: 254
Location: Helsinki
Okay :?
My effects are not as good as yours. Is there a way to get the source of the ParticleDemo ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 9:15 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
The particle demo is in the tests directory of the distributed source. The particle editor source is provided also inside the "tools" directory.

You can browse both here:

ParticleEditor: https://bob.newdawnsoftware.com/svnwebc ... %2Fpeditor

PedigreeTest:
https://bob.newdawnsoftware.com/svnwebc ... eTest.java

Essentially the source for everything should be provided in the package.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 8:36 pm 
Offline
Oldbie

Joined: Sat Nov 18, 2006 3:11 pm
Posts: 254
Location: Helsinki
Ok tx ;-) , but is it possible to have a look the simple webstart demo of particlesystem?
I mean this one :
http://slick.cokeandcode.com/demos/particletest.jnlp
Cause i still have pain to understand how to produce something awesome like in that demo :roll: . When i try to increase the number of particles i get this message :
Quote:
Tue Nov 28 22:20:03 CET 2006 WARN:Ran out of particles (increase the limit)!


edited mispasted quote ;-)


Last edited by orelero on Tue Nov 28, 2006 9:20 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 8:52 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
The particle test demo can be found in org/newdawn/slick/tests/ParticleTest.java and it relies on the FireEmitter which is in org/newdawn/slick/particles/effects/FireEmitter.java (both of which are in the source code provided).

The message you're getting (mispasted above) it probably about the number of particles the system has remaining (i.e. it doesn't have enough to complete what you're trying to do). You can pass a second parameter to the ParticleSystem constructure that specifies how many particles are allowed.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 9:32 pm 
Offline
Oldbie

Joined: Sat Nov 18, 2006 3:11 pm
Posts: 254
Location: Helsinki
yay tx Kevin 8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group