Game Development Reference
In-Depth Information
This will now move the particle emitter to the location of the mouse cursor. If you want to remove the
pointer, add this line to the love.load function:
love.mouse.setVisible(false)
As shown in Figure 11-11 , this creates a particle emitter that spews particles. You can play with
the various setGravity values; for example, a negative number will make the particles float. You can
also play with setSize to make the particles bigger or smaller, and setColor to change the color of
the particles.
Figure 11-11. Particle effects following the mouse pointer
Tip If you want to visually create particle effects, there is an application written in LÖVE that allows
for interactive particle creation. It can be found at https://love2d.org/forums/viewtopic.php
?f=5&t=8747&sid=9bf680d6ed9857549d63fb2ba63fc078 .
Physics
Box2D is the common thread across all of these frameworks when it comes to physics. As
mentioned earlier, Box2D is a very complex and large library. While some frameworks wrap and offer
a few functions to work with the library, LÖVE offers developers complete access, so there are a
couple of extra steps involved to create a physics body.
 
Search WWH ::




Custom Search