Dusty Engine Release 5

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Dusty Engine Release 5

Post by roninmagus »

Howdy!

After lots and lots of work I have completed the 5th release of Dusty Engine. Here's what I posted on my site:

----------------------------------------------------------------------
After many hours of work on DE, Release 5 is now ready! There have been many improvements made to the engine. I have removed two classes, HashMap and TaskTreeNode. TaskTreeNode has been combined with Tasks to allow them more flexibility than they ever had before.

The task tree has been retooled to more effectively control deletion of tasks. My largest worry with the last release was that tasks would be deleted possibly at the wrong time, when another task may be using them. However, tasks are now drop()ed and removed from the tree ONLY when DoUpdates() on the task tree is called. If a task is removed from the tree between updates, it will remain on the tree until the tree is updated.

There are 7 new built-in tasks. Most of these new tasks implement time-based interpolation. There is a base interpolation class which can be inherited from to create a task which interpolates itself over time. There are movement/scale/rotate tasks which can now interpolate based upon time.

The major benefit of these interpolation tasks is that they are also based upon Dusty Engine's management of time. This means that when an interpolation time is paused, the amount of time it is paused does NOT reflect upon its interpolation time. If a task is set to run for 10 seconds, then 5 seconds pass and the task gets paused for 10 minutes, once it is unpaused it will continue to finish the last 5 seconds of its interpolation as though nothing had happened.

These and more changes have been made. Check out the new changelog, download the engine, and enjoy!
--------------------------------------------------------------

Here's a copy of the changelog for the new version.

====================
Changes in Release 5
====================
- Thanks to Vash on the Dusty Engine Forum

Modifications:
--------------
* Task and TaskTree classes have been revamped. Details below.

* TaskTree's deletion of tasks is now far better managed. When
a task is removed from the tree, it is not deleted immediately
but instead flagged for deletion. Flagged tasks are destroyed
when DoUpdates() is called and also after all updates have
finished. This eliminates the possibility that a task will be
destroyed while the tree is running (which would segfault) and
ensures safe deletion of tasks when no other task is using
them. If a user-defined task is using another task which has
the possibility of being destroyed, then the user-defined task
should grab() the tasks it use and drop() them when they are
no longer necessary.

* Each task now maintains a pointer to DustyDriver, IrrlichtDevice,
and its own TimeServerEntry. Therefore, the OnUpdate() function
no longer has an parameters. This is a better solution because
those pointers can now be accessed in any function of the task
more easily. They are set automatically by the TaskTree.

* The TaskTreeNode class has been removed. Task class now
includes information from TaskTreeNode. Task also has
get and set functions to change the information from
the old TaskTreeNode class, which allows for much more
control and flexibility in the use of the class.

* HashMap and HashMapNode have been removed from the engine.
The were being used by the TaskTree to map a TaskTreeNode
to a Task, but since those two classes are now one and the
same there is no longer a need for the HashMap class.

* Tasks now have a second lifetime value. Before there was
just lifetime in number of executions. Now there is a
value for lifetime which is measured in milliseconds. You
may now set a task to automatically be deleted once
it has executed a certain amount of times or after a certain
amount of time has passed.

* Task now has three more event functions. OnAddChild,
OnRemoveChild, and OnLifetimeExpired. OnAddChild is called
when the task receives a new child task. OnRemoveChild is
called when a child task is removed from the task.
OnLifetimeExpired is called when the task's lifetime has
passed, either time in milliseconds or number of executions.

* Member variables in the classes MoveTask, RotateTask, and
ScaleTask where changed to protected instead of private.

* Added a new built-in task: CounterTask. This task simply
counts the number of times it has been executed. To count
seconds, set its priority to 1000. To count minutes, set
its priority to 60000, and so on.

* Added a new built-in task: CountDownTask. This task is
like the countertask except it counts down instead of up.
It defaults to quit counting once it reaches zero, but allows
to count past zero through a function call. It has an
IsZero() function to quickly see if time has run out.

* Added a new built-in task: NodeGeneratorTask. This task
takes meshes and will create a new node using a random mesh
each time it is executed. It can create nodes at one single
position or it can be given a range of positions in which to
pick a random one. The nodes created with it can be retrieved
and altered at will.

* Added a new built-in task: InterpolatedTask. This task allows
time-based interpolation. The programmer sets a time for the
task and the task will compute what amount of that time has
passed using a value in the range 0 <= t <= 1. If the time
set for full interpolation is 1000ms and 500ms have passed,
then the interpolation value is .5. If interpolation time
is 750ms and 64ms have passed, then the interpolation value
is 0.08533, and so on. This task begins counting time at the
moment the task is added to the tree. One benefit is that
it does not "blindly" count the amount of time that has
passed. It only counts valid Dusty Engine time-delta,
meaning that if a task is paused for 10 minutes and then
is unpaused, that 10 minutes does NOT figure into the
interpolation value.

* Added 3 new built-in tasks: MoveInterpolatedTask,
ScaleInterpolatedTask, and RotateInterpolatedTask. Each of
these tasks take a vector which represents the beginning
position/scale/rotation of a node, and will rotate/scale/move
towards an end vector based on time.

Bugs Fixed:
-----------
* TaskTree is now guaranteed a safe deletion of tasks that
have not been drop()ed elsewhere.

* Fixed a bug in DustyTimeServerEntry's SetTimer() function
which would segfault if the programmer tried to set a new
timer more than once.

* Fixed a bug in TaskTree's destructor which caused the root
task to not be deallocated when the task tree was destroyed,
a potential memory leak.

* Fixed a potential memory leak in MoveTask, RotateTask, and
ScaleTasks' SetNode() function which could have caused scene
nodes to be grabbed but not dropped.
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Post by roninmagus »

I have put up a new demo on the dusty engine website... it's demo 3. Please check it out! It uses the Sydney model that comes with Irrlicht. It shows the new time-based interpolation tasks used in Dusty Engine.

Download that demo Here.

How's your FPS?
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
eXodus
Posts: 320
Joined: Tue Jan 04, 2005 10:07 am
Location: Canada
Contact:

Post by eXodus »

With 20 sydneys running around I reached an average of 250fps on an ASUS V9950 Ultra 256mb

** I would have added more tasks but the dustyengine.h file is missing. I'll look for it after some sleep I think :roll:
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

Post by roninmagus »

eXodus wrote:With 20 sydneys running around I reached an average of 250fps on an ASUS V9950 Ultra 256mb

** I would have added more tasks but the dustyengine.h file is missing. I'll look for it after some sleep I think :roll:
Do you have the API downloaded and visual studio (or equivalent) pointing to the include directory? you must have the API on your computer in order to recompile.
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

On a P4 3.4 GHZ machine with an ATI Radeon 9800 Pro w. 256mb my FPS ranged from 250 FPS - 500 FPS, depending on how many Sydneys were on the screen at once!
Post Reply