zomgistania

Main page | About | Articles | Previous Posts | Archives

Tuesday, June 20, 2006

Ideas for the Pipeline and GUI

Here are some drafts about things I'm thinking about changing in the batching class, RenderPipeline, I discussed earlier.


Move the Work() method into a separate class. Have this class hold PipelineBuffer-objects.

This way you could have very precise control over what to render, in what order, and when. The workerclasses could have a z-order in themselves or a container class like a game object manager or a GUI manager could contain one and render it if needed etc.


The pipeline would be modified to maybe contain references to these classes. By doing this, the PipelineBuffer could also be abstracted more, for example, to allow a MeshPipelineBuffer and a QuadPipelineBuffer. Though they could probably be more abstracted even the way they are now, but anyway.



Anyway with this method you could have more control over what's rendered, what buffer is associated with what object/objectgroup etc.


Also for the GUI, I was thinking about implementing some kind of a manager as you might've noticed above. The manager would handle positioning the controls and such.
As the screen is moved around, the GUI has to stay in one place obviously.

The GUIManager class could itself be a generic one, which could be inherited from to allow for different handling of input. You could probably also have multiple instances of it, so you could "group" different gui elements.
For example, a "game UI" which would contain the money amount, terrain details and such, and an "Object details UI" which would contain some boxes for showing details on a unit or a structure.


And regarding UI also, over here is a webcast from Microsoft's site about the input and GUI in a game called Rocket Commander. The rest can be found here, quite much intresting stuff in them and also the whole game sourcecode is available too.

Labels:

1 Comments:

  • Interesting links, I've built a GUI but I'd like a better one :D

    The current one sucks because I'm never totally sure if it's disposing all the textures it uses at the correct time.

    Like if I have a button and I dispose it - it should dispose the texture but if I have two buttons using the same texture, well then maybe the parent should handle getting rid of the texture. (Actually at moment I keep a reference to the texture itself and manually dispose on game state changes - not ideal)

    Maybe I just push my texture manager into the bottom of it.

    By Blogger balaam, at 12:51 PM  

Post a Comment

<< Home