Feb. 5-11: Horseback Control & Traps

Jon: Hello, everyone! Lots of stuff this past week:


Horseback Control

Over the past few months I’ve been working here and there on the revised horseback controls and finally they are at a point we can call sufficient for the 1st public demo.

tar_screen-shot-2017-02-11-at-11-54-43-am

  • Pressing ‘forward’ causes the horse to accelerate. The horse will maintain its current speed even when ‘forward’ is released, ‘back’ slows the horse down.
  • ‘left/right’ steers the horse, which is more effective at slower speeds.
  • Holding ‘back’ while stationary will make the horse step backwards.
  • If you attack, you will attack on the side your camera is facing relative to the horse.

Traps & Locks

Treasure chests throughout Terradim can now be locked and/or trapped!

tarboomtrap

Previously, I had setup a simple trap in the Playground scene, but have now come up with a better solution for randomizing traps/locks everywhere.


Per-Player Camera SunLight

In the Grand Arena, players that are in one of the indoor sections have the sunlight culled from their view. This has caused a couple of issues for a while, but I have finally found the solution!

I found that deactivating the sun (deactivating the sun’s GameObject) per camera was causing the sun to unassign itself from the lighting settings, so I tried disabling the Light component. When disabling the sunlight per camera, the normal light would work, but reflected light would not be correct.

tar_perplayercamsun

Reflected light!

The solution – for each player camera, use OnPreCull to disable the sun, sun default state must be enabled, and use OnPostRender to turn it back on. The sun seems to cull and have reflected light correctly on each player’s camera.


Misc Improvements & Bug Fixes

tar_beltfitting

  • Setup belt equip BlendShapes for all tunics. (They fit under the belt now.)

tar_homestead_roadsndirt

  • Homestead paths now have some curviness to them, looking a bit more natural.
  • Dirt patches have appeared in the Homestead. What could this entail?
  • Doors can now be locked or unlocked by interacting with their locks.
  • Crossbow improvements:
    • Crossbow firing sound now in.
    • Bolts use a more reliable hit detection system now. The bolts fly more predictably and face forward, unlike before, when fired.
  • Dialog will now exit if the player or the chat target ragdolls, is forced too far away, or is incapacitated.
  • Fixed issue with incorrect head mounting angles, especially for horses. Mount angle was always the same for people and horses.
  • Setup a different cursor icon when targeting doors.

Take care!

Advertisements

Dec. 25-31: Happy New Year!

Jon: Well, hello again! It’s getting close to a new year, and we’ve got some things to show you. But, first:

tar_happynewyear2017

Models of cutlery and tankards courtesy of our good friend, Emil Ritter.

Here’s some stuff we’ve been working on this past week, besides the props:


Revive Potion
tar_revivepotion

I forgive you.

There’s now a quicker way to resuscitate your friends, the revive potion! Simply whip one at the cadaver or, if you’re the corpse, open up your inventory and guzzle it down. They are quite expensive at the moment, but can be found as treasures throughout Terradim.


Console & In-Game Messages

This past week I worked on improving the in-game console and messages. Previously, the console used a single string and Text component to display its contents, which proved to be a problem. In Unity, there’s a cap of ~65k vertices per mesh and if that single Text component exceeds that, which isn’t that hard to reach with a long string like a command list, a spam of errors will litter your Unity console window and the text will fail to be displayed. I’ve finally addressed this.

tar_console

That’s some exciting stuff, right there.

Now, each console entry is a separate Text component, and rather than instancing a new one for each entry, I am using a Text component pool. What’s that you say? That’s beyond the scope of this post. Now each console entry can show more information! I also added the real time (not Terradim time) as a prefix of console entries as well.

tar_pickingup

I picked up Blueberry, nine times. 😀

After the console, I figured I’d setup the in-game messages similarly as well. Now since they are not a single string and Text component, they can be accessed individually! What does that mean? Well, it means I can do the following:

  • Certain messages now stack, such as acquiring items. The tally amount of the item will increase and the message will be moved to the bottom, becoming the last message to disappear. Previously, each item pickup would result in a new message even if the item matches one that’s in the list of messages.
  • Added a delay per message so even if the messages are triggered at the exact same time, they will still pop away one by one with a delay. A bit easier on the eyes, I’d say.

Misc Improvements & Bug Fixes
  • GOAP Progress: Shields no longer count as a valid weapon for NPCs when they are deciding to arm themselves.
  • Optimization: Andrew continues to setup LODs, now on small edibles. Mmmm, delectable.
  • Added some pickup sounds on items that were overlooked.
  • Moonlight now interpolates per day towards next moon phase instead of a jarring change per phase.
  • Added a realtime shadows toggle in graphics settings.
  • Fixed bug that would result when 2 players talk to the same NPC. The result would be an incorrect camera target until talking again.
  • Dialog now cleans up/closes before a scene transition.
  • Shifted NPC spawn point for arena matches, as they’d sometimes get pushed behind the entrance door.

See you next year!

Sept. 25-Oct. 1 : Defense Mechanics

Jon: Hello, here we go!


Defense Mechanics

This past week I started working on the varying block effectivenesses based on the used item, for blocking. Some notables:

  • Every shield and weapon has a block effectiveness rating, which will reduce the received Stamina damage when blocking an attack. Shields are generally the most effective.
  • A character’s Strength now adds onto the Stamina damage they’ll inflict on a blocking opponent, however the opponent’s Strength will also counteract this.
  • Certain items, such as weapons, may not block 100% damage of a particular damage type (e.g. fire) even with a successful block. Imagine holding your dagger out in front of you for defense as a dragon breathes fire upon you… Probably wouldn’t do much.

Props

Reworked the crate’s textures and made a couple of bowls.

tar_crates

tar_bowls


Audio Manager

The overhauled audio manager is nearly complete, for the public demo anyway. Here are some of the new features:

  • Players can enter different reverb zones causing sound effects emitted nearby them to possess the reverb of the zone they’re in. Previously, only one reverb zone was possible at a time for all players.
  • Ability to crossfade music tracks. We’ve setup a music crossfade in the Town when near the Tavern.
  • As stated in an earlier post, all local player’s vocals and footsteps can be heard even if they’re quite a distance away from Player 1.

Unity Tip: I noticed when coding music fading between scene loads that I was using Time.unscaledDeltaTime and there would still be a noticeable pop, probably due to a frame hitch on load. Switching to Time.realtimeSinceStartup seems to be much smoother. I would recommend using the realtimeSinceStartup for any interpolation between scene transitions.


Bug Fixes & Misc Improvements

tar_grass

  • Added a grass particle when striking grassy surfaces.
  • Tavern progress: Chandelier supports and rafters.

    tar_tavern_screen-shot-2016-10-01-at-11-41-33-am

    WIP

  • Reworked equipment positioning system: now different characters, like male and female, can have different equipment placements, helping with appearance and reducing clipping.
  • Reworked female tunic to look better. tar_femaletunic
  • Traveling to a new scene with a box in hand, or any heftable, will correctly clean up the hefting status. Previously, you’d still play the hefting animations in the new scene, even though the object was removed.
  • Added more battlements to some town walls.
  • As mentioned earlier to test out music crossfading, we added tavern music when near the tavern.
  • Added console command ‘condition popups’ to see number popups for any item condition damage.

Have a great weekend. 🙂