HUD

Published November 03, 2014
Advertisement
[color=rgb(51,51,51)][font=Georgia]

Last month has seen little development as I needed to move to another city in the UK where I'm going to start a new job. So for the last weeks I have been living among boxes (and still am to some extents). Further, the new development machine I built had to have some faulty components so development has been delayed.

[/font][/color]

[color=rgb(51,51,51)][font=Georgia]

I am still busy implementing some features needed for the introductory cutscene. I have refactored the UI so that it is scalable. The size of every control is expressed in "Units". At 1920x1080 a unit is 32 pixels long. At different resolutions, the basic unit is scaled accordingly. For example 2560x1440 is 1.333 times bigger than 1920x1080, so a unit would become about 42.6 pixels.

[/font][/color]
[color=rgb(51,51,51)][font=Georgia]

VQsEqDI.png

[/font][/color]

[color=rgb(51,51,51)][font=Georgia]

The picture is supposed to represent the Commander's HUD as the ship travels near Mars towards Saturn. The game itself will not be in first person. The rendering seemed a bit empty so I added an "atmospheric" HUD control in the lower right, the one with the caption "Singularity Phase". It is a simple column chart implemented in DirectX. The control derives from the basic ItemsControl in my UI library that allows generating templated child control based on its ItemsSource property, just like in WPF. For now, you can simply assign an array of float values and it will create the appropriate number of columns in the chart, giving a relative height depending on the chart's width, height and minimum and maximum values set for it.

[/font][/color]

[color=rgb(51,51,51)][font=Georgia]

While animated, the chart looks like this:

[/font][/color]

[color=rgb(51,51,51)][font=Georgia]

hrrjYiJ.gif

[/font][/color]

[color=rgb(51,51,51)][font=Georgia]

It was really simple to implement and animate. Basically the RandomColumnChart derives from the base ColumnChart and exposes a Period property. The period represent the number of seconds before new random values are generated. During each update, each column is interpolated from the current start values and the next array of values. After the specified period of time has elapsed, those values are used as the new starting values and new ones are generated. Then the cycle runs again.

[/font][/color]

[color=rgb(51,51,51)][font=Georgia]

I might need another of these controls to display some kind of sin waves for example... But I shouldn't let myself be too distracted, I'd like to start working on the main part of the game soon!

[/font][/color]
Previous Entry Animation test video
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement