Engine System Write-up
A downloadable game
Show us what your project does:
The project I was working on is UI-System, mainly for Buttons.
- Show us what your classmates would have to do to use your project
The usage for this system is simply for adding UI to your game. You can make as many buttons as you want. you can add HP bar, MP bar. You can also customize the shape of buttons and change color of the button when you click if you know shader.
- Show us how you used what we have learned this semester to do your project (refer to the project requirements for ideas about what I am looking for)
For this project, since I have to partly deal with graphics, I have to go over almost everything I have learned during the class including Asset builder, Lua, Binary, Project setting, platform independent/ specific implementation, handler/manager,
- Tell us anything interesting you learned or struggled with while working on the project (refer to the write-up guidelines for ideas about what I am looking for)
There wasn't anything particular taking a lot of time, but if I give one example finding the way to show UI no matter what the camera position was taught.
Instruction:
To add this UI system is very simple. You just need to add tow projects which is UI_package and UI_builder. After including those projects to solution files, setting up references properly, and add one function to Graphic.cpp. The function will be somehow look like below.
As you can see, the function is almost exactly identical to submit render object.
After hooking up everything, you need to set up the buttons size through lua file. The setting is pretty easy, As show in the picture below, you just need to decide xy coordination from -1 to 1
Below are the one of the examples.
After that, you need register it to AssetsTobuild.lua file and build assets.
For a program file, First you declare UI class and handle, and initialize at init functions
Now you have a button on your game.
If you want to add a functionality to a button, you can use Bind() function to bind it.
**** After a teacher's point out, I noticed that my system only work out if the 3dgeometry class and effect class have exact the same class name. The fortunate thing is that the 3d geometry class and the effect class is only used in certain limited part, so if you want to use my system, you also want to make a change to 2 parts of my UI base system code to whatever your geometry class and effect class. shown below
Status | Released |
Author | dropanddrop |
Leave a comment
Log in with itch.io to leave a comment.