Fishman
Posts: 795
Joined: 4/1/2010 Status: offline
|
quote:
ORIGINAL: ceyan Its been a while since I've played Space Empires V, but isn't it turn-based? Even with my extremely basic knowledge of programming I can recognize the enormous savings in power/memory by only having to process/store/retrieve data on an periodic basis. Savings in power, yes. Savings in memory, no. Data stored must be stored regardless of how often it will be accessed. The memory cost of storing an objects coordinates is the same regardless of whether the object exists in a turn-based environment or moves in real-time. In fact, internally, a "real-time" game is really just a turn-based game with very short turns. quote:
ORIGINAL: ceyan And SEV doesn't have to worry about dynamic missions assignments/tracking/status for hundreds/thousands of ships at once, just to give one big difference. Just imagine what's involved in that... Does, actually. SEV ships also can be automated and given missions. In fact, missions for SEV ships can be queued with far more elaborateness than DW ships, which frankly, have rather short attention spans. quote:
ORIGINAL: ceyan On top of that, do SEV planets and what not shift? I don't remember them doing that, but I wouldn't be surprised. SEV planets do not move, but motion is not memory-intensive. A complex moving object would only use a few more bytes more of memory to record its velocity in addition to its position. A DW planet is not a complex moving object, as it simply moves on a railtrack. Given that, its position on the railtrack becomes a simple mathematical equation determined by its initial starting position and track, which would have been stored anyway, and the present time. This carries little to no additional memory cost. quote:
ORIGINAL: ceyan If not, that is another big difference in processor/memory usage. Processor usage is irrelevant to the discussion of memory usage. It should be obvious DW will use up far more CPU than SEV will, but CPU use is not memory use: The two are independent and unrelated resource expenditures. quote:
ORIGINAL: ceyan SEV doesn't have to track empty space, since each systems is directly connected to its partners through a small number of wormholes/jump points. Tracking "empty space" never happens in ANY game. "Empty space" is just that: Void. Space of any form is practically never tracked. Objects are tracked, and objects, whether they move according to a fixed grid of wormholes and jump points, or whether their coordinates are arbitrarily, still have coordinates, and those coordinates consume roughly the same amount of memory regardless of the mode by which they move. quote:
ORIGINAL: ceyan I also never played a game that got anywhere near Distant World's number of systems/planets/moons/etc... Not to say it couldn't, but I would have to imagine it would get bogged down as well. Of older games, the Elite series had far more systems, planets, and moons than DW, and of newer games, Spore's planetary behavior can be considered to be of comparable magnitude. Neither game threatens to blow out your RAM under normal conditions. quote:
ORIGINAL: ceyan Also, exploration between SEV and Distant Worlds is so different I can't believe anyone could compare. Both SEV and Distant Worlds (I imagine, I haven't played Distant Worlds enough to state for sure) have three known conditions. Unknown, known under fog of war, and known. Unknownness in SEV is nearly identical to DW: An unknown area displays no information about planets or contents and the only thing you know about it is that it exists. Exploredness is therefore covered in a single bit, not even an entire byte, per object, per empire. Very small. Knowledgeness costs slightly more: Each empire needs a "knowledge" of a possibly dynamic object such as a planet, but the amount of variable information we ever get to know in any event is very small: Owner, population. Few bytes per object per empire. Tiny. quote:
ORIGINAL: ceyan SEV has that for individual hexes, totaling up what? 100,000 hexes (actually that's probably insanely over-estimated, each system has the exact number of hexes, probably something like 50-100 tops, so how many system are in a large game?) on a enormous map with completely static conditions? Distant Worlds on the other hand gets really low with its positional unit, and it has to track that condition for each unit across the entire map on an almost constant basis. Again, this is not a memory-intensive activity. To track the visibility state of a dynamically moving object is a simple matter of a point-circle collision detection test. This is a well understood problem implemented many times that has numerous optimizations, none of which are memory intensive, and the primary cost of such an operation is borne by the CPU, not your RAM. quote:
ORIGINAL: ceyan Finally, data structures between real time and turn based environments (again, going on my limited programming experience) are probably significantly different. They are not that significantly different. Ultimately, the data's STRUCTURE is less relevant to the issue than its MASS. Whether you store the data as an n-ary tree, a linked list, or an array, has little real effect on its SIZE, merely the speed and convenience at which it can be accessed. At worst, a memory-inefficient datastructure optimized for speed wastes a few more bytes to store pointers to related objects to enable them to be accessed quickly without searching. If every object wastes an additional kb in pointers over and above everything else, which frankly, is a ridiculously extravagant waste, and there on the order of hundreds of thousands of objects in the game, you waste about a hundred megs. quote:
ORIGINAL: ceyan I'm not qualified to speak as to whether DW could do better or not, but saying DW is deficient because SEV performs better is... just plain ludicrous. And here's the rub: You're not qualified. But I am. Unless there is a lot of hidden data somewhere, even very generous data accounting does not yield the numbers that explain where all the RAM is going. Additionally, the game's own behaviors indicate that things are going wrong internally and that data structures are being needlessly duplicated, or allocated and then lost in the ether, lingering around chewing up RAM forever. Here's an example of something going wrong: When I open up the editor and try to spawn a pirate ship, one of the classes of pirate ship I can spawn is a class of ship that I designed for my own empire, because pirates clone your empire's designs. However, that class of ship is listed, not once, but up to a half dozen times in duplication. Why is an apparently identical object being duplicated up to 6 times on a list? Not a clue, but that can't be a good sign. Perhaps they are even multiplying. This cannot be good. Another very apparent sign that something is WRONG is that when you are playing a game, you save it, you exit to the main menu (which should destroy the game), and then reload it, the game runs out of RAM. If I reboot the game by closing it and restarting it, the game will load fine. Why? I terminated the previous game, and am at the main menu, so the game's state should be the same as when I just started the game. This is clear, incontrovertible evidence that data structures are being created, orphaned, and then lost, never being deallocated properly: A memory leak. In short, there is no reason for DW to chew up the amount of RAM it does and the behavior it exhibits clearly indicates that either memory management bugs, faulty data structure design, or both, are in play.
|