2021. Happy new yeah.

While still working on perfecting my Interaction Project, a little framework to easily create interaction between objects based on a easy to manage flag system, I am running into old problems when creating a WebGL Build for the current mini-game.

  1. The script at (localhost:x) embroid1.framework.js.gz was loaded, even if its MIME-Typ („application/gzip“) is no valid MIME-Type for JavaScript
  2. Uncaught SyntaxError: illegal character U+001F embroid1.framework.js.gz:1
  3. Uncaught ReferenceError: unityFramework is not defined onload http://localhost:x/Build/embroid1.loader.js:1

I had this before. I solved it. But it was quite a long time ago last year.

I will find the solution again and then post it here.

Also hopefully more posts about my Interaction Project this month and some cc0 textures / materials I made with the Substance Suite, with which I have fallen in love.

The flag of Interaction – more about the FlagSystem of Interaction Project

To speed up the whole flag system handling, I wrote a custom inspector for the ActionableObject class.

The flags for the Actionable Object can easily be created/deleted in the custom inspector. Also the initial status can be set.

Important is here that by creating/deleting Flags for that ActionableObject they automatically get registered in the Flag System Manager.

With this other ActionableObjects as well every other Object that uses the flag system can access the flags in their Actions.

Every AO or any object that wants to use Flags need a FlagDependency List.

A custom property drawer for it handles everything inside it, so there is no need for any calls to the class which the FlagDependency List is part of.

But how to keep track of all the flags of all objects ? Here comes the „Add Flag Dependency“ Button into play. This button opens a menu that has a list of all available flags for all Objects that have registered flags.

So much for that now.

Footsteps on terrain.

While the basic system of the InterAction Project is now working fine and bug free (as far as I can tell) and with A LOT of error preventing checks and feedback on them (no automated test for now, but this will come), I actually try to implement footsteps on terrain.

For normal meshes I have done a working solution with a custom FeetSoundMaterial.

I also found a way to get the dominant texture at the position of the terrain where the player (or any other moving entity) stands as an index.

BUT since I am using the experimental terrain tools, I was curious if I could use the enhanced layer system of the terrain tools package.

I drove deep into the source of the terrain tool packages, actually very interesting.

Would it not be cool if I just could enhance the scriptables Layer and add there my footstep audio files as list ? Then I just would need to retrieve the layer (not the TerrainLayer, that class is a sealed object, so I sadly can not make a derived class from it, which would be the coolest way.)

But I would have to change a lot in the editor implementation of the terrain tools to be able to use my own Layer scriptables. So it seems I have to go the boring way and just make another class which combines the TerrainLayer index with the fitting footsteps. Which also means I have to keep track of the indexes and changes there by hand, which is very boring.

Make some noise (with your feet) (InterAction Project Status Update)

The InterAction Project has two different kinds of Player steering modes : One for Adventure-like games and one that is more the classic FPS steering. But despite which is used : You probably need footsteps.

The character controller I am writing for the InterAction Project (which of course does not have to be used) makes use of a set of components that provide foot step sounds, depending on the material the player is walking on.

For now it is supporting only meshes, but the terrain support is nearly done.

If you want to have foot steps while moving on a surface, you simply assign a FeetSoundMaterial component to it. Then you can assing multiple footstep sounds to this Material. Everything else is done by the FeetSoundManager component attached to the player.

The feet sound manager casts a ray down to the surface and retrieves the FeetSoundMaterial. It then takes the AudioClip[] array it gets from the FeetSoundMaterial and plays a random footstep sound IF no other footstep is playing.

Of course this could be done much better. Like a library of footsteps groups and then using the mesh material to select which group to use, just as an example.

But for now this works fine. 😀

[InterAction Project] Quest Nodes and FlagDependentObstacles

After hardening the whole system and capseling it into its own project, I can move on with other needed functionalites for it. Ah yes, also I versioned it with git, since my ultimate goal is it, to publish InterAction System on GitHub.

I needed for my adventure game the Quest Nodes and obstacles. The Quest Nodes (you could also call them location triggers) were allready in places, but not using the Flag System.

A QuestNode is a box collider set to a trigger, that, for now plays a sound and shows a message, optionally depending on flag settings.

A FlagDependent Obstacle is basicly the same, but instead of triggern it blocks passage depending on flags.

More about Actionable Objects. ( InterAction Project Series )

Let’s have a look how this little system I am doing enables the player to open and close this power block door, as a simple example.

The orange door you see in the scene view in the picture above has a component called ActionableObject. If the layer „ActionableObjects“ exists, a GameObject with this component on it will be set to this layer. This is needed because the raytracing of the EyeModule only hits on objects in this layer. (If the layer does not exist, errors will be thrown, but there is a convient editor menu where you can create all needed layers without having to add them manually.)

„More about Actionable Objects. ( InterAction Project Series )“ weiterlesen

New : My (hopefully) weekly Unity3D news and thoughts

Dear diary. Hmm. No. But : I try to do a weekly series of, well, news and thoughts about, around and for Unity3D and stuff for it.

Unity 2020.1 is out. A lot of neat new features. Like editing Prefabs inside a level. Heres a two minute video from them showing some of(f) the new things.

Now let me talk a bit about some assets I recommend or at least use them myself or will use them myself.

„New : My (hopefully) weekly Unity3D news and thoughts“ weiterlesen

Re-Usability or what was that about the Wheel ? (just a few thoughts)

I decided to use the preview animation rigging package from Unity. After a few problems with importing the rigged Blender models as FBX I could easily use this quite good package. (Mainly MakeHuman screwed the scaling, but thats for another time)

I started a small new project to practice the use of it. And while doing that I also decided to export my game system for the main project I am currently working on, which I described in the previous articles a bit.

When you do something like this, you can easily see how reusable and how independed it is from the project you first implemented it in.

„Re-Usability or what was that about the Wheel ? (just a few thoughts)“ weiterlesen

Rigging or Scripting – that is here the question.

My character is holding a flashlight.

My character is holding a flashlight. But I also have two animations in the animation controller running. One for the idle animation or walking in one layer, and one for the hand actions in another layer, seperated by a layer mask.

„Rigging or Scripting – that is here the question.“ weiterlesen

The ActionableObjects and the User Input

When the player has focused an object that, or, on that an action can be performed, a menu with the action options is shown. (see last entries)

Overview of the flow of user input to actionable objects

In the character controller, which handles the player input, the event functions in the scene controller for these two actions are registered to event delegates in the character controller.

„The ActionableObjects and the User Input“ weiterlesen