All posts by JoSe

Installing Nginx, PHP5 and SQLite3 on a Raspberry Pi

If you have a Raspberry Pi then you are probably going to run a web server on it. You have a couple of options, but I found that Nginx runs like a charm and is super easy to setup. If all you want is to serve up static files then you can wrap up there. But considering you have a Raspberry Pi, you probably also have some interesting projects that will require dynamic pages and probably a database. Enter PHP and SQLite. Continue reading Installing Nginx, PHP5 and SQLite3 on a Raspberry Pi

Tracking Missile in Box2D

If you have been playing around with Box2D then chances are you have already figured out how to simulate linear projectile motion or maybe even tried to simulate arrow flight. These are all great places to start, but maybe you are looking for something more advanced? How about a projectile that scans for targets and when it has locked on to one follows it to the bitter end? Continue reading Tracking Missile in Box2D

Simulating Multiple Sources of Gravity in Box2D

Simulating a single source of gravity is a sinch in  Box2D. You can even switch gravity off if you like. But what about simulating multiple gravity sources, like planets? This isn’t as hard as it sounds, but requires some additional work. Something to consider is that when simulating radial gravity, or planet gravity, we don’t work with the same scales as in, um, the universe. Instead of orbits that are thousands kilometers we’re working with ten to fifty meters, depending on the canvas size and pixel to meter ratio you are using. Continue reading Simulating Multiple Sources of Gravity in Box2D