deVoid Studios : Value Controller now on the Asset Store

Guys and Gals,

Our first Unity3d asset has just went live on the Unity Asset Store. In the next few days we will put up a few more tutorials and code snippets on our blog to help you get started ASAP.

In the mean time let me give you a quick overview of what this thing is all about.

The whole idea behind the Value Controller is rather simple : get rid of all the mind-numbing, ugly, stinky, messy plumbing code that is needed to support values that need to change over a given length of time.
Although it’s not very complicated to write a few neat functions to deal with some simple timers and whatnot, but what if you wanted to be notified at regular intervals, or perhaps have one value increase and the other decrease?
What if you needed to stack the timer effect ala WoW buffs / debuffs style? For your whole damn raid party!
Anyway, you get the picture.

Head over to the store and check it out. If you have any questions please post them here and we will be sure to answer them as quickly as possible.

As always, criticism, constructive or otherwise, is very welcome.

Happy coding!
deVoid Team

First of all we would like to thank everyone who bought a copy of the Value Controller package. We really appreciate your support.

Since, we haven’t received any hate mail, bug reports, death threats and so on, we decided to continue developing this awesome asset of ours further.

In the upcoming 1.1 release we plan to include :

  • Some new properties to give users greater control over the Controller and Dynamic Value classes;
  • Implementation of a flexible Log system giving users the ability to log changes to Constant and Dynamic values;
  • General code and documentation cleanup;
  • New tutorials;

The Log system will make it easier for users to extract statistics from the VC.
Lets say you are working on a Health Bar system for your game and you use the VC as the backbone for your implementation of it. At some point you would like to display the amount of healing your character received from various sources as well as the amount of damage split into a number of categories: poison, fire and electricity.
All you have to do is supply a new parameter every time you add a value to the VC and that’s all there is to it. Value Controller will then let you get entries from your log matching whatever criteria you want.

Then you simply present the data to your players in the way that matches your requirements Be it in totals, averages or whatevers.

System’s design is quite flexible and you can log anything you want, and we do mean anything!

This is pretty much it for now. We might add some more stuff to this release if we think of anything useful.
If you have some suggestions or would like to request a particular feature please don’t hesitate to contact us or simply reply to this thread.

Happy coding!
deVoid Team

Ladies Gents,

It finally happened, the big big big post about the Value Controller Features just made it to our blog.
If you want to know what VC can do for you head on over there and check it out.

There is a lot more that can be said about it but unfortunately this is all we have time for now.
Version 1.1 is in the works and we will do our best to have it out by Monday.

If you have feedback, complaints, praises or just want to talk…drop us a line. Don’t be shy now :slight_smile:

Last but not least. Hugantic thanks to everyone who bought the package!
We can’t thank you enough.

Regards,
deVoid Team

Very interesting. It’s kind of what I’m looking for, do you have any video tutorials?

Hey kheng,

We don’t have the vids yet. But I can send you a built webplayer so you can see the sort of stuff you can do with it.
In the mean time feel free to send me your questions and I’ll answer them asap.

Hey Guys,

While working on something for our game I needed to destroy some objects after a few seconds. I know there are tons of auto-destructors written in a variety of ways.
I decided to write one using the Value Controller and this is what it looks like:

#region >>>> Usings 

using UnityEngine;
using System.Collections;

#endregion

/// <summary>
/// Simple script to destroy objects after a set period of time.
/// </summary>
public class AutoDestruct : MonoBehaviour
{
    #region >>>> Properties
    
    /// <summary>
    /// Value Controller that will keep track of our timer dynamic value.
    /// </summary>
    private ValueController _controller;

    /// <summary>
    /// The amount of time to wait before destroying the object.
    /// </summary>
    public float WaitSeconds = 1F;

    #endregion

    #region >>>> MonoBehaviour Implementation

    private void Awake()
    {
        // Init
        _controller = gameObject.AddComponent<ValueController>();
    }

    private void Start()
    {
        // Destroy the object immediately
        if (WaitSeconds <= 0)
        {
            Destroy(gameObject);
            return;
        }

        // Destroy after set period
        _controller.AddDynamicValue(WaitSeconds);

        // Handler that will destroy the object when the timer value lapses
        _controller.CallbackValueIntervalLapsed += (value) =>
        { Destroy(gameObject); };

        // Start updates on the controller
        _controller.StartUpdates();
    }

    #endregion

}

Drop this in a fresh C# script and rename the file to AutoDestruct.cs.

Usage is simple. Just drop it on whatever you want killed and set the timer. No muss no fuss…works on everything even the neighbor’s dog!

I’m not sure I understand the point of your example. The same can be accomplished with:

public class DelayedDestroy : MonoBehaviour
{
	public float delay = 1f;

	float mStartTime;

	void Start () { mStartTime = Time.time; }
	void Update () { if (mStartTime + delay < Time.time) Destroy(gameObject); }
}

…and with much less code.

Hey Aren,

Agreed. It is less code.
But the point was just to show one of many possible applications of VC’s dynamic values and callbacks.

Those who have it might as well use it. Right?

[Edit: Decided to take this to PMs.] :slight_smile:

Ladies Gents,

Unfortunately 1.1 will have to wait for another week or so. In the mean time, check out the attached web player build of our Village tutorial…if you’re so inclined.

723699–26258–$VillageWebplayer.rar (340 KB) <<<

It’s a sample of what can be achieved using the Value Controller. It’s not particularly amazing but is pretty cool. The whole thing is run by a few dynamic values and two VCs.
One VC rotates the sun and the moon, and keeps track of game time. The other runs the “economy”.

If you have any questions feel free to post them here or PM me.

Alex

Hi, is there any update on v1.1?

I’m considering using this package, but don’t want to buy it if it’s no longer actively supported/developed.

There is mention of a version 1.1, but the one in the Asset Store is still version 1.0…

Hi, your asset no longer works with the current Unity. It’s a shame, because I had a lot of plans for it. Please fix this or I should deserve a refund.