Dynamically Generated Calendars
Last night, I was working on the compiled version of a calendar. I got the basics working, including muddling through the swamp that is System.CodeDom. This version was more complicated than the MfGames.Template library, mainly because it does more than the template library.
I feel that the approach is a good one. When you define a cycle in a calendar, such as DayOfMonth, the generated code actually creates a property of that name which gives the calculated results. Thay way, if you create a cycle "LongCycle" or "Calibration", it will create that. This means you have a calendar object specific to your calendar and also with the properties that make sense for that calendar.
Speaking of Calibration, I still need to work on a roaming cycle events (holidays).
But, the project is sound and I think I have a couple good points before I consider it "done" enough to use in Turf Wars:
- Date Formatting
- Date Parsing
- Hours of Day
- Non-Looped Calculations
- Rendering
- Chooser (Gtk# and SWF)
- Offset (since the rest of the world isn't zero-based)
I also found a potential calendar for Itrifore that I'll propose to fightertype. That way, I can have pretty formatted dates and times on my game while I'm debugging instead of looking at a decimal number.
Metadata
Categories:
Tags: