TimeSys

 

User’s Guide

 

 

TimeSys is a collection of interrelated modules that provide a mechanism for time-based game play, as opposed to the usual turn-based system.

 

Thanks to Michael J. Roberts for his many suggestions.

 

Copyright © 2001-2004 by Kevin Forchione. All rights reserved.


Contents

 

Getting Started.. 4

Tracking. 4

Actions. 8

Events. 13

Misc. 17

TimeSys Overview... 25

The TimePiece Class.. 27

TimePiece Properties Associated With Tracking. 27

setInitDateTime. 27

getInitJdn. 27

getInitClockRatio. 27

getInitDateTime. 28

getInitDateTimeString. 28

setCurrDateTime. 28

getCurrJdn. 28

getCurrClockRatio. 28

getCurrDateTime. 28

getCurrDateTimeString. 28

setCalendar. 28

setClock. 28

setTimeRate. 28

setDateVals. 28

setDayOfWeek. 28

setTimeVals. 28

getCalendar. 29

getClock. 29

getTimeRate. 29

getDateTime. 29

getDateVals. 29

getDayOfWeek. 29

getTimeVals. 29

cvtMinToGctu. 29

cvtGctuToMin. 29

TimePiece Properties Associated With Actions. 29

cvtValsToDateTime. 29

addToTime. 29

subtractFromTime. 29

addDateTimeToTime. 30

subtractDateTimeFromTime. 30

TimePiece Properties Associated With Events. 30

getInitDateTimeVals. 30

getCurrDateTimeVals. 30

getDateTimeVals. 30

cvtDtToGctu. 30

The Calendar Classes.. 31

Calendar Properties Associated With Tracking. 31

toDayOfWeek. 31

toDate. 31

toJulianDayNumber. 31

toDateTime. 31

The Clock Class.. 32

Clock Properties Associated With Tracking. 32

toTime. 32

toClockRatio. 32

toDateTime. 32

Clock Properties Associated With Actions. 32

compareRatios. 32

Clock Properties Associated With Events. 32

toSeconds. 32

toMinutes. 32

toHours. 32

secondsToNxtClockRatio. 32

minutesToNxtClockRatio. 33

hoursToNxtClockRatio. 33

The WallClock Class.. 34

Accessing the Global WallClock Instance. 34

The New Tokenizer Token Rule. 34

Setting the Date and Time Zero-point.. 34

Waiting.. 36

Actors and Waiting States. 36

Breaking the Waiting State. 37

Ways of Issuing the stopWaiting() Message. 37

Reacting to the Waiting State. 37

Waiting Events.. 38

Fuses and Daemons Defined in Events. 38