Update v0.6.1 - Vape Dealing and X Ray Shader
Whats new?
- Students who have a high interest in vaping and who are very rebellious have started dealing nicotine products... IN SCHOOL... IN THE MIDDLE OF THE HALLWAYS! The nerve of these kids. Time to start cracking down on these broad daylight deals!
- The outside of the school is starting to come into place. Previously only the inside walls of the school were rendered and there was no roof. Now there are outside walls and a room. "But this is a top down game," you may be thinking to yourself, "How am i going to see inside of the building?" With the new X Ray Shader!. This shader makes all outside walls and roof tiles within a certain distance from the player and the cursor transparent.
Dealing system
When a student is low on supply, it sends a request to the student manager to arrange a deal. The Student Manager takes into consideration all students who are currently selling, all the spots where deals can happen, and at what time the deal can happen. The manager also looks at pending deals so there are no overlap in spot/time and time/dealer. After the deal details have been finalized, it is sent to both the buyer and seller.
X Ray Shader
Originally the school had nor roof and no outside walls. I thought it would look fine once the outside environment was put into place. But then I was watching some videos on shaders and a video about sphere masks came up (https://www.youtube.com/watch?v=Ws4ukvCgTOU&t=61s). I always looking for ways to work on my shader skills so I decided to implement a sphere mask shader that modifies the materials alpha value, to give the impression that the walls and ceiling around the player dissolved away so you can see inside.
This shader was build using Unity's Shader Graph. You can see the whole shader graph in the images section. Every object that will dissolve away when the player is nearby is painted with a material that has the X Ray shader on it, and is attached with an XRayable script. A controller script called XRay updates every child's XRayable with the player's and cursor's position, and XRayable updates the material.
In the future, I will rewrite the shader using ShaderLab so I can utilize global variables for the player's and cursor's location. There are hundreds of XRayable objects, so iterating over every one of them every update is costly.
Files
Get (Open Alpha v0.11) NicPatrol
(Open Alpha v0.11) NicPatrol
Play as a school administrator in a vape-ridden school.
Status | In development |
Author | Cable Stayed Studios |
Genre | Simulation |
Tags | 3D, Management, Top-Down, Unity |
More posts
- Update v0.7.2 - Bathrooms, Gym, and Better VisualsMar 22, 2020
Leave a comment
Log in with itch.io to leave a comment.