OK I’ve organized what the responsibilities of all the Classes I have that have any connection with rendering and tried to catalog what exactly they need to do. Maybe this’ll give you a better idea of what I’m dealing with. This should help ME most of all to decide how to organize the code for abstracting all of this. Here it is:
Weapon
- keeps track of the sprite used for its children Ammo(Beams/Projectiles) which are subject to change at any time.
It manages this variable state and gives the Ammo the sprite they need
to use (Java2D - BufferedImage / OpenGL - Sprite)
Beam
- Sprites given by the Weapon
Projectile
- Sprites given by the Weapon
AsteroidManager, FloatingObject, Ship, Thruster, Planet, Explosion
- sprites
IndicatorManager
- sprites saturated with color
- Java2D mode needs to hold on to the saturated creations in a Hashtable,
OpenGL probably doesn’t care for this efficiency work
Console
- text and fading text
MainScreen
- draw sprites
- draw HUD
o text, gradients
All of the Menu implementations
- draw sprites
- draw lines
- be able to do all of this within certain Clip regions if necessary
- Java2D mode should be caching stuff that doesn't change like it currently does, OpenGL mode could juts ignore the
state variables deciding whether or not to update and just draw everything every frame
- NavMenu
o Draws sprites, and lines both saturated with various colors
o Draw text of various colors