June’s Progress: Reducing Physics

Jon: Hello! It’s been a while hasn’t it?

I have been continuing to work on cleaning up many systems and continuing to move data to external XML files. It never ends… ⚰

Anyway, here’s the details:


Reducing Physics Performance

Upon profiling the game recently, we have found that the CPU time for calculating physics has been quite a problem. Scenes with lots of objects/items such as the Town are especially troublesome. Consequently, we have decided to make some changes.

  • New weapon hit detection: we are moving away from using rigidbody/triggers to a custom hit detection (Boxcasting). Collisions actually seem better after swapping to this setup! It’s easier to hit small items on a surface such as gems on a table.
  • New item physics: Previously, most items were rigidbodies (using dynamic physics), but now we are using a custom system for emulating physics. I call it “cheap” physics. This is a WIP, but looks promising. There will probably be some issues with this in the next release, but it’s a step in the right direction, I think.

It’s still a bit early but maybe next month I’ll be able to divulge more details. 😀


Crests

Crests are coming along! The shader seems to be working.

The choice of crests, however, is questionable…


Misc.
  • Sleep Improvements:
    • Characters snort instead of playing standard hurt/attack vocalizations when asleep.
    • Sleep effect, from a potion, will recover health and fatigue now too.
  • Continued to move a lot of game data to external XML files. Notably, magic spells and certain color sets.
  • Setup a note item to load in place of an item that fails to load, probably due to an incorrect tag/missing in item database. Displays information when read on what item tag failed to load.
  • Music tracks now load in background. This should reduce hitches when a new clip is loading.
  • Saved ColorData now stores float values, not bytes, allowing for HDR colors to be saved. Alpha has also been added.

Andrew has been working on loot tables (what items appear in containers and people…) & continued widening building walls.

The Apothecary’s walls have widened just a bit.


In other news, our other game has nearly reached the point of revealing!

Until next time… and have a happy 4th of July, tomorrow! 🎆

Advertisements

April’s Progress: Random Data

Jon: Hello all!

This past month has been productive, although it’s been more technical stuff. Not many pictures… I will try to spare you the wall of text and keep things brief. Brace yourself.


Random Systems

Previously, setting up any random selections, such as items in containers, has used a pretty simple setup. We wanted to expand its capabilities and have more control over what could be done. There were things such as nesting loot tables or modifying a loot table result (varying gold and bolt amounts) which weren’t possible. We also wanted to utilize random seeds so, for example, the same loot/enemy rolls could appear, if desired (good for testing). This has been mainly what I’ve been working on and is still a WIP. It’s coming along nicely, though. 💤

I may eventually share more details about what I come up with once it’s completed…

It is nice to see more than a few pieces of gold appear in a container, that’s for sure.


External Data

If you’re still awake, this will put you to sleep:

Another semi-related task has been shifting various data into external XML files, using a more data-driven design. The new item loot tables utilize this setup.

This is a noticeable step towards being able to customize various aspects of the game. This can also help reduce our build times, as certain tweaks can be made externally without having to rebuild in Unity. This is a slow but beneficial process.


Misc.

We have updated the project to v2018 of Unity. We have, and are, spending time to resolve issues that have appeared in the new version, but are excited about some of the new features! Overall, the transition has been smoother than previous version updates.

Lastly, we have been working on a side-project as well. Needless to say, it has taken some time away from TAR, but is nearly finished. It has certainly taught us some things and has helped us with clarifying some design decisions for TAR. We will reveal it, once it’s ready!

If you’re still there, have a good one! 🛌

P.S. Andrew has continued working on the Lava Cave.

March’s Progress: Hot Stuff

Jon: Hi, everyone! Time for March’s update.


This past month I’ve spent most of my TAR time on AI, and have a few things to mention:

  • We are now using  a different AI system than GOAP. GOAP planning was taking up too much CPU, and was getting too difficult to debug… I have been reading Mat Buckland’s book, Programming Game AI by Example, & have found his Goal-Driven system to be quite insightful. I have the new system up and running and it’s using a lot less CPU than the previous system!
  • Continuing in the book, I decided to work on a weapon selection system for NPCs utilizing the chapter on fuzzy numbers. The basic idea is that they’ll choose the most desired weapon they have based upon various inputs, such as distance (Swapping from a bow to sword, for example). It’s coming along.

Swing-Throughs

I have started the possibility of hitting multiple targets with one swing. We have wanted to have Strength, along with larger weapons, to allow for sweeping through multiple opponents, or at least smaller ones like bats, with one swing for a while. This is a step towards that. In the process, I may have fixed the bug where weapons could remain active if an attack animation was interrupted as well.


Potions

I’ve also dabbled in potions, continuing work to make them more modular. Previously, I would have to make 3 new prefabs for each potion type we would want to add. This was taking too long… Now, I only need to make one prefab per type. I have added some new potion types including a Sleep Potion. 😀

I have also been experimenting with coloring the potions programmatically based on their elemental compositions.


Now, Andrew has been working on things that might be a bit more exciting, putting aside the Castle temporarily to work on the old Water Cave…

~

April Fools! 🤡 It’s a Lava cave! There’s a method to the madness I assure you. Here’s a peek:

“Can’t get enough!”

This is a new area, and will not be replacing the Water Cave.


A couple more things before farewell. I wanted to share some useful Unity discoveries we’ve made this past month that have helped out quite a bit, for other devs out there:


Happy Easter!