A scenegraph for 2D and 3D graphics for the Piston game engine