DemoProductions / shmup

3 stars 2 forks source link

Use Canvas for Healthbar #140

Open flip40 opened 7 years ago

flip40 commented 7 years ago

Short on description, but there should be a way to set up the healthbar on a canvas instead of having the object be placed in the real world like they are now. This will make editing their positions on screen much easier.

flip40 commented 7 years ago

On second thought, this might not allow for easy modularity. Perhaps we just need to implement relative coordinates instead. For example, having it be x and y from the top left corner or something similar?

ghost commented 7 years ago

x and y from the top left corner sounds like a good idea. What do you mean by having the healthbar on a canvas instead of the real world? Isn't the healthbar already on a canvas and in the screen space? How will this make editing healthbar positions easier?

flip40 commented 7 years ago

You are correct. I think what I was going for was using the inherent canvas editor for placement of the healthbars. Currently I believe healthbar placement is entirely in code. Either way works though, the more important thing is that the UI elements should be relative to the camera in a way that makes sense and creates a proper visual UI across different resolutions / screen sizes. This might have to include options that are more complex and just relative to top left corner, which is good for one player, but how would 2-4 players look? For example, with 4 players you might actually want them all evenly spaced across the top of the screen, with 1 in the top left, and 4 in the top right.