Hedgerow Hall

by Hedgemistress
Hedgerow Hall
Serious role-playing-oriented game world, with animals.
ID:2079953
 
So, I have the skeleton for the world. If the map generator needs some refinement to produce attractive and complex results, it fundamentally works. The game makes a map, you can move around it, it saves and loads turfs and items on the fly.

That's space taken care of. The next step in laying out the groundwork for the game is time.

Hedgerow Hall uses a timescale of 5 IRL minutes = 1 in-game hour. This means 2 IRL hours = 1 calendar day. A month consists of 28 of these (56 IRL hours), and three months (7 IRL days) makes a season, with four such seasons making a year.

Original Hedgerow Hall used a lot of counters for things like buff effects and the amount of fuel in fire and such, which meant things had to constantly be incremented and decremented, and a fire wouldn't burn if it wasn't active in the world. Since the entire world map stayed active in the old version, that wasn't a huge deal, though. Apart from not being the best practice for what is meant to be a large, complex, persistent world, it's not going to cut it with the map swapping.

Fortunately, I already have a solution in mind.

World.realtime lacks the precision needed, but for the rare things where time could pass independently of whether a thing was loaded or the game was even running, old HrH had a timestamp system that used a combination of world.realtime for the day and world.timeofday for everything more precise.

I don't quite remember how I implemented it, but I mean to do so again. A timestamp datum with two vars, .day and .time, seems like a good, quick way to do it. The New() proc for the datum would have a parameter that adds to the current time to derive the actual value, so if you make timestamp for something that's set to expire in one hour or whatever, you could specify it thusly. Timestamps would have procs for checking if they've elapsed, and otherwise comparing themselves to another timestamp (defaulting to the current time).

The end result of this should be tick-precise timestamping that's independent of server uptime or other status and that isn't fooled by changes in date.

One improvement this system is going to have over the previous version: in the old version, the seasons were really erratic because any time a completely new session was started, it would act as though spring had started on the most recent Sunday. My goal for the new version is to allow the server to set the start point for the calendar (so you can make it dawn on the first day of spring when you start a new world), and to allow you to chuck out the world map (because there's a new, better version of the map generator, for instance) without similarly resetting the calendar.

So this is priority 2: time. I'm not going to worry about seasonal differentiation just yet, but as part of this phase of production, I am adding a calendar/clock to the game that will make the sun rise and set, and have hooks for weather events.


As an insight into how and why I'm prioritizing things: the next thing I'm doing after this is the buff system, which requires timestamps for expiration purposes. After that? I'm filling out and tightening up the skill system, which will involve both the buff system and the timestamp system for cooldowns.
Well, I wound up combining this a bit with the next step, the buffing system, because I needed something to test timestamps with. The buff system didn't need a lot of invention, as I've gotten pretty slick with them over the years of unreleased RPGs, so it's there along with the progression of time. That makes three out of the ten top priorities I want to complete before I consider the game playable.
It was originally assigned a lower priority on my list, but I'm finding myself working on portable light sources and equipment after these changes, due to the fact that the alternative is going to be to keep overriding or suppressing the day/night cycle I just finished.
Hedgemistress wrote:
and three months (7 IRL days) makes a season, with seven such seasons making a week.

Don't you mean a year? o.o
...I did, and I also meant four such seasons.