Aug. 12th, 2004

Lore

Aug. 12th, 2004 09:28 pm
alfvaen: floatyhead (Default)
A few years ago, I played a game called Lorenai. I was in the midst of Ackanomic at the time, and the idea of finding another play-by-email game was appealing. This one was a turn-based fantasy wargame type. I signed up for it, played it desultorily for a while, and eventually started to get into it. The code was in beta, based loosely on the Atlantis ruleset, and the turns came sporadically(between once a week and once a month), but somehow it was compelling. I started in turn 49; in turn 85, a retiring player gifted me most of his units, and I became more of a major player. I was in the section of the game world around Minas Tirith, with a lot of place names from Tolkien.

To make a long story short, turn 106 was the last turn of Lorenai. By that time I was playing two official NPC factions as well as my own, and had illicitly commandeered at least half a dozen more inactive factions, mostly to attempt to complete my map of the world. I was happy as a clam when Jiri Klouda, the creator of the game, released the game data, code, and complete turn reports for all the game's factions.

I set about continuing the game on my own. I'm no stranger to solitaire playing, having occupied much of my childhood in such manner. I made myself up a set of personal rules, and expanded my faction by absorbing any other faction all of whose units I could see at once. I declared one set of factions to be my enemies.

This quickly bogged down. I ran turn 109 in January of 2002, for instance, and I just recently finalized my orders for turn 110. My faction is enormous, and growing ever larger. I contemplate sometimes going back to turn 106 and trying to go it alone, killing all the other factions instead of absorbing most of them, but I haven't bothered yet.

My problem now is trying to get the code to work again. I had problems running the old exe, so I tried recompiling it. It took me several days to get that working again, with a number of problems mostly stemming from the Cygwin line-ending dichotomy--Unix(linefeed) or DOS(carriage-return/linefeed)? By now I suspect that I might have been able to run the original exe merely by changing all the line endings to Unix, and I am seriously considering going back to my ancient CD backup and retrieving that exe to try it.

Because now I've gotten the exe to a point where it almost finishes running the new turn, but not quite. On my slow 433 MHz computer, it takes about four hours to run to completion; using a version compiled on one of the Linux boxes at work, it took more like 45 minutes. But it does not, as I said, finish. It gets tantalizingly close.

It's turn-based, as I said; there are 24 days in a month/turn. The program processes each day in turn, and writes events, errors, and battles one at a time to files for each faction. When it goes to process the final reports, it attempts to open those files to read them in and write them out wholesale into the faction report, as well as region and unit information and an order template for the next turn. But it fails. It seems to open the file, but all it reads in is an infinite number of blank lines, instead of the data that actually resides within the files. The first time I ran it(on the Linux box), I suddenly noticed that there was only one report file written, and it was 40 MB long, and growing longer.

I'm not much of a C++ programmer, but I managed to cobble together a program that used much of the same code. It had no trouble reading a file and writing it out to another file; it had a little more problem reading a file created by the same program, but it didn't go into an infinite loop.

If anyone out there is knowledgeable about C++ and file I/O, please let me know, because it's driving me to distraction. I could practically assemble the file using "cat", but I don't know if that would work either. And there is still a bunch of data that's not being written to files. I could write all that out, I suppose, and try to cobble the reports together by hand, or using Perl or something, but I don't want to do that. I think that the code should still work, and I can't figure out why it isn't. Are the files not being closed properly, for when it tries to read them? Any clues at all?

Otherwise I'll just have to dig out that old exe and try to run it. It'll have to be on this computer, with the four-hour run, because obviously the version I compiled for Linux isn't working. Maybe it's a gcc 2 vs. gcc 3 issue. But I don't want to leave it to run overnight, in case it produces infinite numbers of blank lines as well, and I come downstairs in the morning to a full hard drive. (It would only be filling up the secondary drive, not the main one with Windows on it, but still, it can't be a good thing.)

I've tried other turn-based fantasy games since, by the way, but none of them have captured my interest the way Lorenai did. I'm not sure why that is, but I do try a new one from time to time, like "Gondor" at Turn 2 Turn. That one's not inspiring me, but maybe I have to give it another 36 turns...

Infinity

Aug. 12th, 2004 10:03 pm
alfvaen: floatyhead (Default)
Courtesy of [livejournal.com profile] rimrunner, how many of 100 notable SF books have I read? )

Apparently Phobos Entertainment is the source of this one. Maybe this list should go on Lists of Bests.

October 2022

S M T W T F S
       1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 29th, 2025 04:18 am
Powered by Dreamwidth Studios