The Dink Network

Reply to Re: New dink-like game making thingie from RTsoft

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
October 16th 2006, 06:51 PM
seth.gif
Seth
Peasant He/Him Japan
 
Cypry: Well, the new script system is pretty different. It's based on lua which is a pretty big change. But there is a lot of online tutorials and reference for lua already which helps.

One of the things I liked about the Dink system was how each entity could have a script that was sort of sandboxed from the others, for instance, each entity could have a variable called health. This system is kept. So there are three name spaces: Function, Entity, and global. In dink there were only two, something like "script, global".

A big difference is now things are event based. You can no longer do:

DoSomething();
Delay(1000);
DoSomething();

But instead i'd be more like:

DoSomething();
Schedule(this, 1000, "DoSomething();");

Overall this system is more powerful and can handle changing situations better.

However, there is something called a GoalManager that let's you do things sort of like the old way:

GoalManager:AddSay("Hi.", fatherID);
GoalManager:AddSay("What's up?", fatherID);
GoalManager:AddDelay(1000); //we can add extra delay if we want

And it handles a lot of grunt work for you, the character will walk through doors to wherever the father is, approach him, face him, say Hi, wait an appropriate amount of time, then say What's up.

You could also say things to objects like a bed or cabinet, any entity.

But the beauty of this is if we are attacked, we can do:

GoalManager:RemoveAllGoals();
GoalManager:AddSay("Ouch!");

Or something, so we dont' finish whatever we were doing. We could also just push a new goal onto the stack so that will get done, THEN he'll go say the stuff he was going to before.

And there is still the concept of brains, only now they are named and stackable, many brains can work together to create the AI that is needed.

Here's a screenshot of the dink test. One nice thing is you can flip,scale,tint the house and it still works - the vector collision info is scaled/flipped/rotated with it.