Basic PHP game engine