It's kind of a pain, but a useful pain, and it's better to do it now than wait until I've lost the pieces of what's happening. Testing commands vary from the pretty simple, like >DAWN, which starts the transition from night to day, to the all encompassing >GRAPHICS REPORT, which theoretically will dump a boatload of information so I can pick apart things going wrong.
Thankfully, most of the commands are fairly straight forward; what I do need is a hard reset for sprite values.
Weeping willow in late summer |
The transition periods are then unique, depending more on random number checks than anything else. Each April 15 is going to be slightly different. That means that when I want to test, say, April, I really need to start in March, and wait for the turn-over - or have a hard graphics reset, which sets each thing to its ideal stage for the specific game state. This is easier to program than blending, so it'll probably be the first implementation phase for the transition into Inform. I don't expect the transition programming to be especially difficult - I suspect that a daily run through of sprites with the "wrong" image for the season, combined with a n increasingly likely chance they'll turn, should be adequate, but I am anticipating some excitement as sprites get remixed and reveal Issues.
Main Triumph:
Dawn works now; it needs a little more data tweaking, but the framework is in place. Essentially, a scene called Dawn starts about 45 minutes before sunrise; the sky gradually lightens to gray, then to a randomly chosen, appropriate dawn color (still working on this bit) as the sun hits the horizon, then to a second color, then to the appropriate sky color for the day (blue or gray, depending on weather.) The transition is a bit clumsy - you can't do straight from yellow to blue, because it goes right through green and looks absolutely wrong, so the first and second dawn colors needs to be different and carefully chosen. This is somewhat more of a pain than I expected. I was hoping to have general ranges, but I think now I'm better off with a list of approved colors, *possibly* with a few tweaks (ie random saturation/desaturation, brightening, darkening, etc.) to get variation. Two color transitions is just about right, I think. I tried it with three, and it felt overwrought. From full-on darkness to morning is 55 minutes; about 25 of those involve unpredictable color shifts.
Sunset will be similar - moving from blue to a couple peak colors, possibly followed by a "twilight" dark blue/purple for a time, then black, so I'm hoping I can reuse the code, with a few tweaks. After that, it's testing, and then getting a few people to test it to see if I missed anything egregious. Other sky-related stuff should probably wait until I'm looking at the full-on, everything-in-its-place version.
For winter, how about having the snow line gradually rise (and maybe fall a little bit sometimes) as winter goes on. This past winter in Vermont, the banks of snow by the side of the road were definitely getting higher and higher and higher.
ReplyDeleteThat's a good idea! There's already a measure for quantity of snow on ground, so it shouldn't be too hard to hook into that.
ReplyDeleteCool stuff, can't wait to see it in action!
ReplyDeleteI wonder if you could make use of a quiet addition to the 6E/6F builds of Inform: the figure-name type can now carry properties. You could use a property (or more than one) to organize state changes; e.g., "if the image the sprite object is currently displaying is of the type 'transitional', then change to the next image in the sprite's queue". This might be a fairly compact way to store information about transitions and so on.
Erik - ooh, much better than the monstrosity I had sketched out.
ReplyDelete