Water, new items, fall damage, new console and more.
Huge improvement this month is upgrading how the interactibility works. Before, the player was using a trigger collider attached to the torso, scaled to detect what’s in front of it. Checking for other colliders that was hitting player’s collider of interaction scripts to can interact with the objects, using OnTriggerStay, which was obviously wasting more than half of the game performance. Now with that being fixed, we’re using raycasts and with this, more things and have been added and opened up the possibility to add multiple choice interactions.
I also added a free of charge asset made by Garry Newman (@Facepunch) called Facepunch.Highlight, which is an extremely good asset which I’m gonna use for multiple things. Like automatically generating upcoming game items icons with a really nice outline.
The plan is to expand interactions to the NPCs, so they can manipulate states and containers as well.
Use these Highlight specific commands:
- visual.highlight (true/false): Enables or disables the highlighting when interacting with environment objects. (This setting is stored in the config file)
- visual.highlightvisualizer (true/false): Turn the debug mode for highlighting object when interacting with things on or off.
Added water and plenty objects are enabled to bounce on it (player and world-models for now). The use of it is mainly to limit the map and the player to do not be able to (easily) leave the map or go through it.
Physical things should bounce and be pushed to the surface. It also opens other doors for the use of it. Parks now can have lakes and player or other NPCs can fall in and drown, same as the player.
Items, Containers and Gifts
This month I started working on the meaningful items and thought-through what I had to do and what the game should have. I did few minor tweaks and removed old crafting code that the item definitions had.
I have worked on original and meaningful items, the list is still being modified. Check it out here.
They aren’t in yet, but added few items along this patch:
These are development items, they’ll have drug effects that will affect player’s vision and control. I have hopes that won’t be a hard thing to implement.
Container loot tables and loot sets have been fully reworked and the randomization has been limited. Loot sets are pretty much a random item collection from the entire loot table, with predefined items noted under. So each bin, dumpster, etc. has a different table variant, based on the same items.
- Dumpster has somewhat more space than the rest of trash containers.
- Bins should always have useless items, and rarely something worth (like a Cigar or bettery).
- Trashcans have a slight better loot than bins.
I added Gifts! They’re meant to be random and rare in maps, spawned in hidden places in cities. They have high loot level and guarateed helpful items, from weapons, ammo and healers to food and money.
Red Gift is the lowerest loot tier of them all. It has good loot but not one of the best. It also has bleach, which helps you to kill yourself whenever.
Yellow Gift is a pretty good loot tier, filled with necessary items that might keep you alive in different situations.
Blue Gift is the best. Has the highest tier of loot, powerful items and very helpful in all cases. Of course, very rare to find it in the environment.
Drug selling, money earning, NPC missions and player lifetime consistency, monthly payments and bills are the most important mechaincs and gameplay key features of the game. That’s what I’m aiming at and that’s what I’m working next.
I personally have never done drugs, so don’t look at me weirdly for outlining the topic too much, but the player will experience and explore how drugs are, how to sell them (in game, FBI calm down). There’s more to it, I’ll let you know when I’m working on it.
GL Wireframe Debugging
Wrote a quick GL wrapper which renders voxels of models in game under certain layers, mainly to visibly see how detailed the models are and what could be done to optimize that, if using this method.
It has 2 style modes for drawing. First is the normal one (only-green lines), and the second one is fancy.
It has a medium performance impact and sometimes spikes (every 20 seconds – by default – it checks for newer rendered models).
Use the following commands to tweak tweakables from the console:
- visual.wireframe (true/false): Enables wireframe visualisation.
- visual.wireframestyle (0/1): Wireframe color style, drawing. 0 is for normal (green), 1 is for fancy (multi-color).
- visual.wireframemaxdistance (meters): The distance between the camera and the rendered object. Recommended to be default, 5 meters or less (performance wise).
- visual.wireframemaxvertex (vertex count): Only draw wireframe for objects that are under this vertex limit.
- visual.wireframerefreshrate (seconds): Refreshing the scene for unvisualised renderers, and registers them.
I slightly updated the UI, especially the loading screens. Along with that, I added level loading cancelling, so if the maps get bigger and you changed your mind, you can close it anytime. Had to rewrite some trouble I had with CoroutineManager and InvokeManager but they’re now fixed and run very well.
(sorry about the Rainymood, I often listen to it)
Finally took the time to scratch this off the list. The new console is much more performant, flexible and easy to add/access or edit functions/field/properties and their values. There’s few little things I might add, but didn’t have time to get all into just this, this month.
Combat log is default now. It holds plenty of information, like the damage type, surface type, who shot the projectile/explosive, what has been hit, distance from the who shot the projectile and who has been hit and the distance between the camera and who has been hit, along with the health information (if available).
You can use these commands to get the combat info per session:
- combat.log: Prints last 20 logs.
- combat.export: Prints all logs to file.
Added falling damage. It was on the to-do list at a major priority and I knew it wouldn’t take long to implement, so here it is.
I have optimized Street Sign variations. That means that the frames should be smoother since they don’t update every single frame for a single non-moving state.
With this patch, all the plugins have been updated with the latest game assembly and Combat Logger has been marked as deprecated on the website (aka removed from the SDK).
As always, side by side with ChaseDown, I updated Humanlights.Unity.x with all it’s components, improved, added new things, and planning to bring few global and plug-and-play features from ChaseDown’s code to the library by the next month (console 5.0, etc).
Upgraded the project to Unity 2018.2.2f1. That means you should see significant changes and more frames.
A lot of behind the scenes happened. Along with updating the interaction mechanism, I correctly rewrote few collision/trigger/interactible scripts which run smoother and are supposed to never throw any errors from now on.
Follow-up from the last month, I optimized some more world objects, specifically street-signs. Significant effect should be noticed, once the pooling manager is done pooling to have somewhat stable 60 fps.
Have a lot of ideas in detail planned. In the next couple of months I might add electricity and signal feature. Might be easy to implement, to be honest, it’s just couple lines of code for the base of it, but right now I have like 50+ more important tasks before all that to be done. Like, rewriting couple of view-model related code, adding melee weapons and revamping the entire item database, adding only original ideas and stripping out temporary items.
Things to be considered, Demo recording is broken since the new view-model system, saving the game only saves objects in the world, their positions, rotations, scales and couple of player informations, definitely not close to work how it’s supposed to, but it has a high priority.
Added combat log
Added fall damage
Added gift containers (Red, Yellow and Blue)
Added GL wireframe debugger
Added new items; Cigar, Xanax, Vomit
Added object bounciness
Added object outlining when interacting VFX
Added plenty commands
Fixed loot table logic
Fixed Screenshots (and force the scale to 2 multiply)
Stripped crafting features from Items and ItemMods
Updated and optimized code
Updated console to 5.0
Updated container loot tables
Updated mod assemblies to latest
Upgraded to Unity 2018.2.5f1