To have a sense of interactivity and bring the UI alive, I created a few animations and got some corresponding free sounds (CC0) for my main menu.
The basic idea for the main menu was to make it a sign infront of a building, hanging down and swinging around, being pulled up out of sight of the user and lowered back down to change buttons on the sign, like on switching the menu. In the future I want to include a 3D scene, so you have more to look at, but right now I think this is a nice solution.
I am unsure how my choice of wording will work out, as in whether or not people appreciate a more casual approach with unique and creative names for buttons. Some people might like more functional buttons that just have a clear name as to what they do, but then again I can’t please everyone. Upon pressing Enlist in Battle I want to show a list of open Game Lobbies and allow the player to create and enter lobbies sitting on a server. But the networking architecture is still under construction so I load directly into a Singleplayer Test scene right now.
In the game test scene right now we have several buttons you can press to build units. I tried to structure it as cleanly as possible and keep my data as multiple types for scriptable objects, so I can use the existing things I have and quickly combine them or enter new values to generate new things. This will help my progress in a future as a nice foundation. I also keep enough abstraction layers over all so I can add VR support later without having to split up Desktop Input code from gameplay code first.
For the build menu itself, there are multiple types of Placement I made right now.
‘Single‘ – meaning the unit can be placed with left click and can be rotated by dragging the mouse around and holding down the left mouse button.
‘Drag‘ – is the option you choose when you want to make a building method that works like my current wall dragging as you can see in the video below. You can drag from point A to point B and the program will figure how many objects and where they have to be placed inbetween to make a line and dynamically manage them so you don’t have to recreate everything on every frame for performance reasons. This one also allows you to specify units which it can snap to. Useful for making something like a wall, or an electricity grid, or some other system that needs to stay connected.
‘Circle‘ – this will be used to place normal units, since typically you want to place more than one of them and not each one on it’s own. This is not yet in the system though.
Still missing features are: Sounds obviously, ground Texture to show a connection between buildings and the ground, ressources cost for buildings, and blocking building – when there is already something on the spot or if an enemy is nearby.
For the camera, after a few Iterations (including a free move camera) I went with a focus point concept.
Your camera rotates around a fictional point so you can view this point from different angles by holding down the middle mouse button, or you can use WASD or the arrow keys to move the focus point on a 2D plane, and with that the camera itself. Zooming in and out works with the mouse wheel.
For me, I really enjoy how the camera turned out. It always feels right to me and allows me to quickly change to a top-down view, or to zoom in and just inspect things up close. and Always see everything from the angle I want.
As always, the credits for the music is in the corresponding video description, the sounds are free CC0 sounds from freesounds.org, the engine is unity and everything else, like the programming, Art and 3D-Modeling is done by me.