• Register
Post news Report RSS Fourth week of development, working on building highlighting

This week was mainly focused on adding an optional visual element: highlighting for buildings.

Posted by on

I n this fourth week of development for our mobile game Loot Nubs I primarily worked on documentation regarding the project and adding highlighting for the buildings.

The documentation I am speaking of are a Game Design Document, a Project Management plan, and a Marketing plan. All three had to be finished by last friday, so our team had to put all our time into getting them done. For us the most challenging proved to be the Marketing plan, as none of us had ever written anything similar to it. Thankfully our tutor gave us a lot of things to work with so the final result hopefully isn't too bad.

But now on to games stuff: The first thing I did this week related to the game were bugfixes and some changes regarding the interface interactivity. One thing was that building would inconsistenly be selected when their construction was started, due to some Raycasting frm the mouse button/tapping. I changed it so that it always selects the construction site after the player has selected which building he wants to build.

SelectConstruction


The next fix I did was related to the inventory, which will also carry over into every other tab. I had forgotten to disable Raycasting when the inventory was open, so while the player was interacting with the inventory he could press buttons and activate things in the background. I therefore made a statement in the script which controls the raycasting that disables all raycasts, and this can easily be accessed from other scripts, so it will be easy to integrate into all future tabs and windows.

Finally I worked on the most interesting part: building highlighting. This is something that is very common in many strategy games and other games like Left4 Dead.


The main reason for this is to show the player what he has selected, otherwise he might be confused about whether he actually interacted with the building. This became a much more challenging task than originally expected. There are different ways of doing it, including paying for a completely made one from the Unity asset store. But I decided to go with a shader taken from the official Unity resources page. This shader turned out to be quite successful at what I wanted it to do, especially after tweaking some numbers. It works by pushing out the vertices of the object it is outlining, and then redrawing them in a solid colour.


Of ocurse it's not perfect, as you can see there are problems on corners where it doesn't always draw. It generally does the job however, and I will leave it lik this for now. I will revisit this to maybe create a better system, which might involve creating a copy of the object and then drawing it behind the main building.

However my main task for this coming week is to add unit training so that we have a version of the game that can be properly tested, as at the moment it is just a combination of random objects and scripts.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: