Slow moving particles on XBox

Mar 22, 2009 at 1:53 PM
Edited Mar 22, 2009 at 1:55 PM
It's me again, moaning about an awesome project :S

I have some really slow moving 2D particles (about 15-20px/s) descending over the whole screen (think "slow falling snowflakes"). Those also have a rather random acceleration along the x axis.

My problem is that on the XBox (and only the xbox) the particles that should move slowly, don't move at all until their velocity exceeds the 20px/s. 

I assume it's because of the limited 16bit floating point range and therefore to rounding errors. ("When small numbers (velocity / 60Hz) are added to large numbers (position)").
The effect is visibly worse on the right side of the (1080p) screen. This supports the theory, since "position.x" gets larger on the right side. Altough, it's a while since I did the last time floating point math (and I hated it), so I'm not sure...

I can't really tell the designer that "we need to change the script and music, the snowflakes can't move that slow!", so I have to come up with a solution or work-around. ; )

Do you know any "on the fly" solution? 
I've tried to lower the refresh rate to 30Hz (for bigger delta values), but that didn't help a lot. 
I thought about having the screen vertically split in 4 texture render targets to lower the possible "position.x" values, but that would mean to restrict the movement of the particles or having them misteriously disappear at the edges of the render targets (which wouldn't really be an improvement over the momentary situation).

Do you have plans about implementing CPU particles on the xbox? In any future release? I assume that 32bit floats would solve my problem. If so, I could simply ignore the faltering at the moment and implement cpu particles when they are ready.
If not, I probably will implement some particle system for myself, it's just that your xml interface is so nice :D

thank you in advance for any response

: )
Mar 22, 2009 at 10:15 PM
Edited Mar 22, 2009 at 10:40 PM
Tut 23 demonstrates how user values can be used to store the original position of the particle (as set during the Once process). From then, the stored position is 0,0,0, and velocity is modifying this value. During rendering, the values are added together.
The 'particle bursts' effect does exactly this. You can see in the definition for the particle type it has 'gpu_buffer_position' set to true. The disadvantage is you lose access to user1,user2 and user3.

For a number of reasons implementing CPU particle processing on the xbox would be very tricky. It may be possible to implement an opt-in system, the problem is it requires temporary files to be created on the storage device.

Another method, would be to render a number of instances of the same particle system - tiled over the screen to cover a smaller area. You wouldn't need a render target for this, although that would work as well.

Mar 27, 2009 at 11:49 AM

works like a charm : )