Fishwars: OpenGL Yes, Minimap Meh

Switching over to OpenGL to do the scaling and presenting was almost criminally easy: rather than inherit QWidget the pixelated view object inherits QGLWidget. That’s it. The CPU load is alleviated without any other changes.

With some simple benchmark animation going on (not accelerated with OpenGL) the total CPU load is fairly reasonable. I believe this configuration (software drawing with hardware pixelation-scaling) is efficient enough for Fishwars, but I intend to look into using OpenGL more. If it’s convenient enough I’ll use hardware acceleration in drawing the fishtank scene itself.

I implemented the context menu minimap in its most superficial form, but I’m having doubts about the utility of such a thing. One major issue is precision of panning control; in my current prototype each screen pixel in the minimap corresponds to 36 screen pixels in the main view. Also, the context menu must be called up to even access this minimap, making panning the scene a two or three step process at least. I think I’ll remove the map from the context menu and make click-drag the primary panning control. The minimap could automatically appear in an appropriate window corner during panning to provide necessary context for the user e.g. what portion of the total scene is visible, whether any interesting action is out of view, etc.

Source for the current prototype:

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.