Monthly Archives: August 2013

Farseer Physics Engine

Recently, I have started to get ready to create a retro inspired 2D platformer game and as part of this I was looking for a physics engine suitable for use with MonoGame.

It seems that Farseer is the most popular library for these kind of things out there and there are samples included in MonoGame Samples project on GitHub. Those samples are targetting OS X, but adapting them for iOS is not difficult:

  • I had to re-generate some of content files to get them to load (it seems that spritefonts are a bit quirky on iOS) which is easy to do with MonoGame Content Project. But you better do so on a Windows 7 machine as it requires some parts of XNA Game Studio that require a bit of hacking to get them to work on a Windows 8 machine. I prefer to leave my Windows Phone development environment as it is so I used a Windows 7 virtual machine.
  • And you have to touch enable everything which was a breeze as the samples are beautifully written and easy to read.
    • The end result is this:

      Very nice! and all the collision detections and bouncing of the car and so forth is managed by Farseer! All you have to do is define a World, define its gravity, add some bodies to the world and specify their weight, define any relationships between objects such as how the tyres of the car are related to car chassis and so on. Very neatly done!

Berrydore

A while ago I read about a guy who used a C64 case as a Raspberry Pi case.

I thought the idea was brilliant, but was unsure if I need a Raspberry Pi. A few months later I found a purpose for it, I needed a media center and that is one of the things Raspberry Pi does rather well.

When I was on holiday at my parents I dug out the old C64 I had as a kid. It was later given to my cousins, but once they got bored of it I got it back. Unfortunately it wasn’t working properly but my friend had another non working C64 and I managed to build one good specimen. And that left me with an empty C64 case, perfect for Raspberry Pi!

The working C64 has been given a new lease on life as a retro gaming machine. And Turbo Chameleon makes it possible to load games from an SD card, since all of my tapes are damaged.

C64 in action

The people at awesome Vesalia also sell Keyrah keyboard adapters which allows you to connect a C64 keyboard to a PC (well, in this case Mac). And since they sell Raspberry Pi as well I ordered one from them.

C64 PC keyboard

Unfortunately the second C64 case lost its shine. Somewhere along the way it must have been stored on the sun which made the case very yellowish. Retro Bright to the rescue! Turns out you can reverse that process (caused by exposure to ultraviolet rays) with a mix of Hydrogen Peroxide and Vanish Oxy Action. I emptied Hydorgen Peroxide supplies from two local chemist shops, bought some Vanish Oxy Action and by doing this:

Retro Bright in action

I was ready to turn this yellow thing:

C64 Before

into this bright thing:

C64 after

Pretty impressive, eh?

Getting the Raspberry Pi inside C64 case was a piece of cake. I sourced the cables from Jaycar and used some super glue to fix the “ports” into place.

Berrydore inside

"Ports"

Right now the Berrydore serves as a media center, but I intend to install a C64 emulator on it as well which pretty much makes it a competition to XBox One 😀