Issues with PRIVATE ships

Distant Worlds is a vast, pausable real-time, 4X space strategy game which models a "living galaxy" with incredible options for replayability and customizability. Experience the full depth and detail of large turn-based strategy games, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game. Now greatly enhanced with the new Universe release, which includes all four previous releases as well as the new Universe expansion!

Moderators: Icemania, elliotg

User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: Issues with PRIVATE ships

Post by elliotg »

ORIGINAL: Interesting
AI dont using all the freighters cargo. Waste of cargo components.
Not being able to tell the miners where to mine.
Not being able to tell them not to build miners.
This is your private economy at work - you have no control over them by design.
Not being able to retrofit private ships.
They will eventually retrofit themselves
Not being able to tell the AI to bring fuel where its needed. (research station near black hole had fuel, untill a ship refueled on it, and then the research got crippled, forever... and no freighter went there to refuel it, none of the over a hundred freighters.)
If you have energy collector components then your bases don't really need fuel. Your research station should still be working ok, generating research for your empire.
Not being able to change private ships combat strategy on the go. Its a pain to watch them do a bee line for the space creatures mouth.
Private ships should not be trying to fight space creatures. They should be trying to escape.
Not being able to tell them to stop wasting money, or not being able to tell them to start wasting the money.
Not being able to tell passenger ships where to get people and where to take them.
Not being able to tell freighters wich luxuries, how much of each and where to take them.
Not being able to tell private to build more passanger ships.
The private sector makes its own decisions in these areas. This is a fundamental design choice that minimizes your need for micromanagement.
Private ships entering enemy territory and getting annoying messages as if they were military.
Not being able to check easily what the Private ships are doing, why they are doing it, for how long will they do it, etc.
This is because you've decided to arm your civilian ships. In the upcoming patch this issue has been mitigated by allowing you to have some armament on those ships without causing offense to other empires.
User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: Issues with PRIVATE ships

Post by elliotg »

ORIGINAL: Fishman
Personally, I am fine with the private sector doing its thing without any intervention from me, but occasionally, there are things I need done specifically, and it would be nice to be to perform some of these in an emergency, like pick up cargo on a ship with cargo bays and drop it someplace else in advance, when I am planning to do something unexpected and yesterday. I mean, obviously, it is unreasonable for the game to be able to anticipate the fact that you want a bajillion tons of whatzit delivered to a place that doesn't appear to need it, in advance, because you plan to start a major construction project, but it would be NICE to be able to transfer cargo manually, as construction ships and other such craft are often quite lazy about loading up with necessary supplies despite being given large cargo bays.
Note that you can influence how resources are distributed in some ways. When you build a space port at one of your colonies, the private sector will keep that colony and space port stocked with strategic resources required for building new ships.

Also, construction ships will load up the resources required for their current construction job. But if some of those resources do not exist at the space port where they are loading, then those resources will be delivered later by freighters, directly to the construction site.
User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: Issues with PRIVATE ships

Post by elliotg »

ORIGINAL: Fishman
I don't think control of freight transport itself is needed, I just think it would be nice to be able to perform manual cargo loading on ships that have cargo bays. As it stands, cargo-loading on ships that consume cargo is not forward-thinking enough, and ships can end up with clogged cargo bays or empty cargo bays that fail to contain the supplies they need as a result, with the private sector not doing anything about it because it's mostly a state problem. For instance, if I want to build two stations, a constructor ship may fail to load sufficient supplies to actually accomplish this task, despite having plenty of space, simply because the computer has no way of forseeing that I wish to build a second station after the first one.
Yes, as noted above, construction ships only load the resources required for the current construction job. Each time you assign a new construction mission, they will first go to the nearest space port to load the resources, and then head off to the construction site to build the new base.
User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: Issues with PRIVATE ships

Post by elliotg »

ORIGINAL: Joram
Like the rest, I have no desire to micromanage the private economy.  There are really only two things that I've noticed that bug me.  The inability to scrap my own private vessels.  I hate the constant whining when one gets damaged and keeps asking for repairs.  I just want to go and scrap it.  The other is not being able to declare systems out of bounds.  This is necessitated by the fact that the AI somehow quickly forgets that there are monsters or other hazards in an area and keeps sending ships to get gobbled up.  Annoying.
Having an option to scrap a damaged private ship is a good idea. I'll add that in.
Regarding directing them to specific resources, I would think the price of the good should be influential enough but perhaps they don't take that into consideration?  I guess I haven't had any resource issues to notice.  But regardless, it would be interesting to be able to put a bonus on a resource to help influence where the private sector goes.
Resource prices and your empire's demand are used extensively by the private economy to decide what should be mined. Influencing this by flagging a particular resource is an interesting idea. I'll put that on the list.
User avatar
Ranbir
Posts: 157
Joined: Sun Mar 28, 2010 1:26 pm

RE: Issues with PRIVATE ships

Post by Ranbir »

Surely the private owner should be capable of repairing it himself at a space station?(if they are capable of getting a ship built without you having to sign off) The state controller need not be informed
"The imaginary number is a fine and wonderful resource of the human spirit, almost an amphibian between being and not being." - Gottfried Leibniz
User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: Issues with PRIVATE ships

Post by elliotg »

ORIGINAL: Fishman
Actually, that would probably involve less processor than you'd think. I mean, this is what determines the behavior of ships in Space Rangers. But there is something massively inefficient about how DW is handling things. Massive quantities of RAMs are consumed by the universe, which does not seem to make much sense given that there is simply not that much data in the game that we can see, especially given how simple a DW colony appears to be: Population, development level. I remember a small "MMO" game where there were literally THOUSANDS of colonies, that I, personally, owned myself, and yet that game did not implode in a gigantic memory-consuming explosion of doom when the galaxy went from unpopulated tracts of barren wasteland to a populated galaxy consisting of thousands of colonized worlds, each with 120 manually placed turrets defending them. We're talking thousands of colonies with far more detail than any DW colony, and millions of units, albeit very simple ones, and the game didn't choke like DW.
In DW there's plenty of data to keep track of:
- each ship and base is made up of individual components that are tracked so that per-component construction and damage work properly.
- each ship, base and colony can contain cargo of various resources and components. Also various populations and troops
- every item is named - planets, moons, asteroids, stars, ships, bases, troops, intelligence agents, etc
- each of the tens of thousands of planets, moons and asteroids is in motion, it's location being constantly updated
- each empire must keep track of what it has and hasn't explored yet, down to individual planets, moons and asteroids
- a lot of different memory structures are required to maintain adequate performance of all of the above in real-time
- etc...

So needless to say, we don't use more memory than we need - but with a large living galaxy with this level of detail, it does need a fair amount of memory.
User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: Issues with PRIVATE ships

Post by elliotg »

ORIGINAL: Ranbir
Surely the private owner should be capable of repairing it himself at a space station?(if they are capable of getting a ship built without you having to sign off) The state controller need not be informed
If the ship can move (i.e. hyperdrive and engines undamaged) then they will automatically repair themselves. But when they are immobile then currently they need to be repaired by a construction ship
Fishman
Posts: 795
Joined: Thu Apr 01, 2010 6:56 pm

RE: Issues with PRIVATE ships

Post by Fishman »

ORIGINAL: elliotg

In DW there's plenty of data to keep track of:
- each ship and base is made up of individual components that are tracked so that per-component construction and damage work properly.
No real change from SEV. SEV ships also all behave this way.
- each ship, base and colony can contain cargo of various resources and components. Also various populations and troops
Not significantly different from SEV. If anything, SEV ships are far more complex, as a piece of SEV cargo can itself be a unit, whereas in DW, a resource or component is totally generic.
- every item is named - planets, moons, asteroids, stars, ships, bases, troops, intelligence agents, etc
SEV items are also named, although names DO tend to be expensive in memory. Have you considered that individually naming an item in such a manner may be a massively inefficient use of memory, and given that most items are actually generically named, you could save a lot of memory by storing the name in a condensed form as references to a name table or not at all, if the player has not deigned to actually individually name the object?
- each of the tens of thousands of planets, moons and asteroids is in motion, it's location being constantly updated
Every SEV object also has a position. Being constantly updated is a processor cost, not a RAM cost.
- each empire must keep track of what it has and hasn't explored yet, down to individual planets, moons and asteroids
This characteristic is similarly shared by SEV.
- a lot of different memory structures are required to maintain adequate performance of all of the above in real-time
The structure of the data should not significantly alter its size. Even if the overhead is doubled because you're storing a pile of extra pointers as well as the actual data, and we say that this doubles your data size, it does not account for why SEV can save a massive, developed, and populated galaxy in a mere 3 MB and never threatens to explode from RAM usage, while DW chokes and dies before a standard galaxy is even fully populated.
So needless to say, we don't use more memory than we need - but with a large living galaxy with this level of detail, it does need a fair amount of memory.
Fair enough, but there is clearly something wrong with the memory usage of DW: If this wasn't true, why does the game run out of memory when I load a game, play, save, exit, go to the main menu, and attempt to load the game? By exiting to the main menu, I should have discarded every aspect of the game, restoring the game to the same state as when I first entered the main menu. Yet, the game will run out of memory when I attempt to reload the game, and I must restart it. That is a memory leak.

Also, please stop compressing the save file, or give us the option to disable. It takes FOREVER. Time is far more valuable than hard drive space. If I need it, I can RAR my own files. If you need to make a 2 GB RAM dump as your save, just do it, it would be much faster.
ceyan
Posts: 168
Joined: Sat Jul 03, 2004 1:06 am

RE: Issues with PRIVATE ships

Post by 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. 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...

On top of that, do SEV planets and what not shift? I don't remember them doing that, but I wouldn't be surprised. If not, that is another big difference in processor/memory usage. 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. 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.

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. 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. Yeah... they're close enough to compare. About as close as Earth and the Moon are to each other...

Finally, data structures between real time and turn based environments (again, going on my limited programming experience) are probably significantly different.

Edit:
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.
Fishman
Posts: 795
Joined: Thu Apr 01, 2010 6:56 pm

RE: Issues with PRIVATE ships

Post by Fishman »

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
taltamir
Posts: 1290
Joined: Fri Apr 02, 2010 2:51 am

RE: Issues with PRIVATE ships

Post by taltamir »

ORIGINAL: Malevolence

I've found that private ships upgrade themselves very soon after upgrading their design.

Fascinating... this actually is a very big point and solves several of the OPs issues. he just needs to upgrade their design and they will automatically retrofit.

Lets have a point by point:
AI dont using all the freighters cargo. Waste of cargo components.
-Cargo component is really cheap. And it uses as much as it can... sometimes there is just not enough stuff to fill it... its no big deal actually.

Not being able to tell the miners where to mine.
-so? its never been an issue that I could tell, they mine pretty much everyone and get you what you need. And it is private property after all.

Not being able to tell them not to build miners.
-The private sector pays you money to use your shipyard to build miner ships, which it then uses to mine... I don't see any reason why you would ever want to tell them not to build ships. Ships build by private sector = money in your pocket. What do you care that they build them?

Not being able to retrofit mining stations.
-Do they retrofit like freighters do when you update the design?

Not being able to retrofit private ships.
-As mentioned, they upgrade automatically if you change the design... but over time. Actually not being able to retrofit MILITARY ships is an issue, it was partially addressed in the last patch (a few days ago), and will be fully addressed on the next patch (due in a week)

Not being able to tell the AI to start bringing people to my resorts.
-They bring people to resorts if people WANT to go to your resorts... did you build your resorts somewhere scenic?

Not being able to tell the AI to bring fuel where its needed. (research station near black hole had fuel, untill a ship refueled on it, and then the research got crippled, forever... and no freighter went there to refuel it, none of the over a hundred freighters.)
- It would be mind bogglingly tedious to do that manually... what you should do is file a bug about it not happening automatically... There is no need to build research stations at black holes. Research modules are cheap and placed in every starbase by default if you let the AI design, resulting in more research capacity then you need. If you do it manually you can save some by making "research bases" (although this puts your research at greater risk of all being destroyed at once) and place them near a black hole for 600% bonus.. or put them in a supernova for 400% bonus... the supernova research stations have access to plenty of light and can generate their own energy via collectors... so they never need any fuel, ever. Arm them and give them enough shields to overcome the shield damage and they will eventually charge up to full shields (shield damage is a flat -1/second

Not being able to change private ships combat strategy on the go. Its a pain to watch them do a bee line for the space creatures mouth.
-Private means you don't control them... if their strategy is lacking then their AI needs improving, point out specific improvements.

Not being able to tell them to stop wasting money, or not being able to tell them to start wasting the money.
-Who?

Not being able to tell passenger ships where to get people and where to take them.
-wow you really want to micromanage every single tiny aspect don't you... they are passengers, they go where they want to.

Not being able to tell freighters wich luxuries, how much of each and where to take them.
-They take them where they are needed.

Not being able to tell private to build more passanger ships.
-Now this is just being silly... why would you be able to tell private citizens to build more private ships?

Private ships entering enemy territory and getting annoying messages as if they were military.
-Only if they are armed... and yes that is pretty annoying.

Not being able to check easily what the Private ships are doing, why they are doing it, for how long will they do it, etc.
-why do you care so much about every minutae of the private sector?

OP. I really suggest you just leave the private sector be and instead focus on controlling the state assets... I am having more then enough trouble managing the state assets of a large empire on a 1400 star galaxy. I automate a lot and control individual ships while the AI controls the rest... Just let the private sector be... and if they are behaving stupidly, point out a batter behavior and suggest it for a future patch.
I do not have a superman complex; for I am God, not Superman.
Cheet4h
Posts: 59
Joined: Sat Mar 20, 2010 8:11 am

RE: Issues with PRIVATE ships

Post by Cheet4h »

About the meory issue on Spore:

The planets in that game aren't really saved, if not colonized. And even then they are created again via algorithms.
Uncolonized planets are not saved. If i remember right, only their state of ecological development, the races and the sort of spice is saved. Everything else is created via algorithms and thus doesn't need saving.
Try this by terraforming a planet with some of the creative tools, like the chocolate canyons. Then leave the system, do some other business and come back. The planet is in it's default state.
I guess every planet carries a pointer and some variables for the algorithms. Also i think even the colonies are created with these.
Plus you don't really have a see/can't see feature in that game. You can see things, which you can actually see, no FoW is needed.
Fishman
Posts: 795
Joined: Thu Apr 01, 2010 6:56 pm

RE: Issues with PRIVATE ships

Post by Fishman »

ORIGINAL: Cheet4h

The planets in that game aren't really saved, if not colonized. And even then they are created again via algorithms.
See? Smart.
ORIGINAL: Cheet4h

Uncolonized planets are not saved. If i remember right, only their state of ecological development, the races and the sort of spice is saved. Everything else is created via algorithms and thus doesn't need saving.
Precisely: And that's still more information than a DW planet even *HAS*, so there shouldn't be these problems.
Joram
Posts: 3206
Joined: Fri Jul 15, 2005 5:40 am

RE: Issues with PRIVATE ships

Post by Joram »

ORIGINAL: elliotg
ORIGINAL: Ranbir
Surely the private owner should be capable of repairing it himself at a space station?(if they are capable of getting a ship built without you having to sign off) The state controller need not be informed
If the ship can move (i.e. hyperdrive and engines undamaged) then they will automatically repair themselves. But when they are immobile then currently they need to be repaired by a construction ship

Absolutely but it requires a state ship to do it. Other than scrapping it, a private repair ship could also resolve the issue. I just don't really want to hear too much on private ship issues when they are flying half way around the galaxy doing god knows what. About the only thing I want to hear out of them is when they are being attacked.
taltamir
Posts: 1290
Joined: Fri Apr 02, 2010 2:51 am

RE: Issues with PRIVATE ships

Post by taltamir »

triple A in space :P
it actually makes sense for there to be private repair ships.
I do not have a superman complex; for I am God, not Superman.
ceyan
Posts: 168
Joined: Sat Jul 03, 2004 1:06 am

RE: Issues with PRIVATE ships

Post by ceyan »

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.

I'm willing to concede you may have more overall knowledge of the subject than I do, but how can anyone take you seriously when some of your statements are so off the wall? I quoted this one because its the most obvious example. SEV ships do have automation, but its only tracked ONCE per turn. At the start (or end, however it works in SEV) and when you automated one of your own ships, it does the calculations and makes the decision. Then, presumably, once per turn it will also check the mission conditions and validity. How often do you do a turn? I'm assuming Distant Worlds doesn't recalculate every single second, but it sure as hell does it far faster than I can do a single turn in SEV.
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.

I felt another example was needed, so I quoted this one. So "empty space" doesn't have to be tracked to see if a ship is able to detect whats inside it? I must be playing a different game, because in my version of Distant Worlds I can't see jack squat if I haven't explored it and also have a ship in range to detect whats there.
User avatar
Malevolence
Posts: 1798
Joined: Sat Apr 03, 2010 11:12 am

RE: Issues with PRIVATE ships

Post by Malevolence »

I'm sorry if anything I added to the thread started a debate about the game's design architecture. My comments were meant in the general sense, not specific. I simply meant that any calculations you add to game's routine is going to create more work for the processor(s). That could be a simple square root calculation to find distance, but then executed 3,000 times as every object checks every other object in an area for collisions. Then perform that check every 30 milliseconds. I think DW already does those sorts of things... and since the game belongs to the designers it's up to them how to handle and model it.
ORIGINAL:  ceyan
So "empty space" doesn't have to be tracked to see if a ship is able to detect whats inside it?  I must be playing a different game, because in my version of Distant Worlds I can't see jack squat if I haven't explored it and also have a ship in range to detect whats there.

I would be surprised if those issues weren't handled by a distance formula. I'll spare you the details about a cartesian coordinate system. Check out euclidean distance. I'm sure you get the idea.

tl;dr version: I think we should leave the how part up to CodeForce and concentrate on the what and why.


Nicht kleckern, sondern klotzen!

*Please remember all posts are made by a malevolent, autocratic despot whose rule is marked by unjust severity and arbitrary behavior. Your experiences may vary.
Fishman
Posts: 795
Joined: Thu Apr 01, 2010 6:56 pm

RE: Issues with PRIVATE ships

Post by Fishman »

ORIGINAL: ceyan

SEV ships do have automation, but its only tracked ONCE per turn. At the start (or end, however it works in SEV) and when you automated one of your own ships, it does the calculations and makes the decision. Then, presumably, once per turn it will also check the mission conditions and validity. How often do you do a turn? I'm assuming Distant Worlds doesn't recalculate every single second, but it sure as hell does it far faster than I can do a single turn in SEV.
CPU cost, not RAM cost. This recalculation isn't using more RAM no matter how much it happens unless something leaks.
ORIGINAL: ceyan

I felt another example was needed, so I quoted this one. So "empty space" doesn't have to be tracked to see if a ship is able to detect whats inside it? I must be playing a different game, because in my version of Distant Worlds I can't see jack squat if I haven't explored it and also have a ship in range to detect whats there.
No. "Empty space" isn't even a memory object. Empty space is the absence of a memory object. Objects see other objects in object-to-object interactions, empty space sees nothing, and objects do not see empty space. Painting visibility circles on empty space is a matter of iterating through all the available objects and painting their visibility circles. In fact, it is quite clear this is what happens, because the circles are painted over each other, resulting in very opaque areas where lots of circles overlap.
ORIGINAL: Malevolence

I'm sorry if anything I added to the thread started a debate about the game's design architecture. My comments were meant in the general sense, not specific. I simply meant that any calculations you add to game's routine is going to create more work for the processor(s). That could be a simple square root calculation to find distance, but then executed 3,000 times as every object checks every other object in an area for collisions.
Ugh, no, doing a distance check, you skip the squarerooting and just use distance-squared. Square-root calculation is slow, simple multiplication is dirt cheap. Attempting to executing a million square roots a second is going to sink your computer. Doing a million simple integer arithmetic tests costs practically nothing, and you can cut it down further by culling collision sets that were absolutely not going to happen.
User avatar
Malevolence
Posts: 1798
Joined: Sat Apr 03, 2010 11:12 am

RE: Issues with PRIVATE ships

Post by Malevolence »

Yes, I know that. Which is why I used square root as an example. As I said Fishman-- please focus on this statement-- the how of calculating distance doesn't matter to us... or what sparse arrays are used or what sorting algorithms are used. If you can make a really cool 4X game, then do it. I'll buy a copy. I doubt any of us, however, are going to get any traction here trying to change the basic architecture of a game that is already made.

It was my fault for bringing up the comment about the "ticks" in the first place. Sorry.

Lots of people want carriers and fighters... we can simply say, it would be great to have carriers and fighters. CodeForce can determine if that fits into their fps and if/how to add it.
Nicht kleckern, sondern klotzen!

*Please remember all posts are made by a malevolent, autocratic despot whose rule is marked by unjust severity and arbitrary behavior. Your experiences may vary.
Post Reply

Return to “Distant Worlds 1 Series”