adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] schedule test


From: Kai Sterker
Subject: [Adonthell-devel] schedule test
Date: Fri, 14 Jun 2002 10:52:39 +0200

I made a little test for the new schedule stuff. To see it, you'll need
the attached file and the recent 0.4 branch of adonthell. Extract the
tarball inside the src/ directory, then (after compiling adonthell) run
schedtest (from within the src directory).

It's a pretty stupid example, and not very well balanced, but it should
demonstrate the things we can do now. Note that each day passes
(slightly) different, even though no random elements are used.

To see how it works, have a look at schedtest.cc where everything is
initialized. The schedule code is in schedule.cc/.h.
adontest/schedules/student.py is the manager schedule, the other scripts
are the activities.

Note that the acticities are not tied to a special character; they could
easily be reused by a different manager script in a different way.
That's the main idea behind the new schedule system.


While putting together those schedules, I already found a number of
things to improve. Time events that execute a callback instead of a
complete script would be nice to keep track of gametime within a
schedule script without polling the time every cycle. It would further
be nice if the next schedule to run could be set in current schedule's
destructor. Loading and saving the state needs also testing and
corrections.


Anyway, have fun with that stuff,

Kai

Attachment: schedtest.tgz
Description: GNU Unix tar archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]