“Well, I was born in a small town / And I can breathe in a small town / Gonna die in this small town / And that’s prob'ly where they’ll bury me”
How small is too small?
Making a really small map, we want to make sure characters will actually spawn in it. Unfortunately the spawn positions are actually hardcoded:
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535
(To explain: Thieves are neutral, not lawful, so need to spawn a little further away from the Island’s law enforcement.) So 51, 26, 0 and 41, 33, 0 need to exist on map 0. So let’s make a map which encompasses those points:
1 2 3 4 5 6 7 8 9 10 11
Make that map our map 0:
And make sure the character spawns are in valid locations, and move the dog spawn, and move the cell description, and move the one player, etc.
Speaking of hardcoded server issues, the path to the maps is
..\..\maps, so we need to set up out test environments accordingly:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Alter that config to point to my test DB, run that executable, and voilà!
No live data?
Despite this great success, nothing’s showing up in the LiveCell table. We only push the previous
round’s cell changes when there is a cell change in the current round, and none of the cells on this
map ever change past round 0. In any normal map we could depend on a door being opened, something
being dropped, etc in the first couple of rounds; but there’s nothing going on in
My initial solution:
152 153 154 155 156 157
But for non-trivial maps, that’s an awful lot of individual database connections on the first round. Let’s just actually force a push of what’s queued up at the beginning of round 1:
Much nicer. And look: And so memory-efficient. At round 5, less than 20mb. At round 50, more like 30mb. At round 100, closer to 40mb. Eventually (500 rounds or so), we stabilize around 100mb; I guess that’s when the garbage collector kicks in more aggressively. For now, I’m satisfied at having lowered the cost of admission for a quick test further.
Tomorrow: Parallel servers?