June 2013
Intermediate to advanced
346 pages
8h 42m
English
Let’s start things off by adding a very simple particle system to represent a fountain. We can imagine this as a fountain of water lit up by a light underneath, or we can imagine it as a fireworks fountain, like we might see at a fireworks show. To get this fountain started, we’ll need to take care of a few technical details.
First, we need some way of representing all of the particles in memory. We could use an array of Java objects for this, but it can be expensive to create and delete a bunch of objects during runtime, and there’s no easy way to send the data over to OpenGL. We can store all of the particle data inline instead, inside a single array, such as seen in Figure 49, Layout ...
Read now
Unlock full access