Monday, November 22, 2010

PixelDust

Started working on PixelDust, particle animation program:


I'm thinking of what kinds of rules I can set for myself for making particles:

  • There will be "x" amount of particles at any given time. X is a static value that represents how many particles for animations can be shown in a single frame. I don't plan to use very many particles, so I can keep this at about 100-200. The reason I want to keep this static is because of garbage collection. I'm afraid making too many new objects (allocating more memory) a frame will kill my game, so I think it'd be better if I declared this beforehand. As for preventing "unfilled" particles from being drawn? I'll probably just have those particles turned around so the vertice order is clockwise, cull those, and only draw vertices that are set counter-clockwise.
  • All particle animations will run off the same texture file. That's because I'd like to batch all of the particles into a single draw call. I'm told Xbox360 doesn't really like so many draw calls (my scenery is drawing a lot already anyways), so I'll keep this simple. It's no big deal for me anyways, since I'd prefer for my game to have low-res point-sampled graphics.
  • No fancy shader programs. All particles should be rendered with XNA's built-in effects. Anything a Windows Phone can do, an XBox360 and a PC *should* be able to do. So I'll be setting the texture co-ordinates, positions, etc of each particle vertex in CPU.
  • Each particle animation will have it's own sound effects and target effects. If the animation is directed towards a specific target (as in the preview screen), target effects will be played.
  • Although it is previewed in 3D space, particles will really only move along the XY plane. They also won't do any depth reading, so any particles below that target that sinks into the ground will still be visible. Which brings up the question of the layering of particles. Particles will either be sorted before drawing or drawn additively (which is done with most particles anyhow)

No comments:

Post a Comment