ENDLESS™ Space is a turn-based 4X strategy game, covering the space colonization age in the ENDLESS™ Universe. You control every aspect of your civilization as you strive for galactic dominion.
Now using the original Resource distribution system.
And has better modding support.
It is based on the source of the Generator from Version 1.0.9
Feel free to make suggestions.
Disclaimer:
using this mod with newer/older Versions can result in Game Crashes but should be save if Amplitude doesn´t change the Galaxy Generator.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Text changes might contain errors. It works with all 3 Languages.
And now it´s released under MPL2.
What it is:
A Galaxy Generator that is faster than the Original.
It supports multicore CPUs.
All galaxy shapes are Generated by Javascript. Javascript is provided through Jint which is Licensed under MIT.
You can change how many Arms a Galaxy should have.
Currently there is only support for 4 shapes, 3 are original. So you have over 28 possibilities.
Performance
A 2048 System Galaxy is generated in 12sec.
If you want more take the 4096 System Galaxy if you wish to wait 1min. unless you use double constellation amount or the 2 Ring Galaxy which takes 2mins.
8192 Systems needs 8min.
This has been testet on an i5 quad core underclocked to 2GHz.
You can reduce generation time by lowering the star connectivity
Featurenotes:
0.4.0
-update for wonders
-seed now generates the same map.
-~15% faster
0.3.0
-balancing of resources
0.2.0
-randomisation of starsystems in a constellation
0.1.0
-faster
-4 galaxy shapes
0.0.1
-multithreading
-2 galaxy shapes
-arm number of a galaxy can be changed
How the galaxy generation works
You need to know about JS and C#
Basicly you would do something like: var shape = new Shape();
the Problem is that the ECMAScript doesn't define any directive like using.
So you have to write var shape = new Dagobert.GalaxyGenerator....Shape();
to shorten that you can directly user var shape = Shape();
for a detailed function list of Configuration and Random look at the source of these classes.
Shapes:
They descibe where planets can be generated. All shapes have the following methods:
PointF getPoint();
gives you a PointF Objekt with the variables X and Y
bool isValid(PointF);
return true if the point is in its Shape.
Following Shapes are Available:
Rect(X, Y);
where the center is 0,0 and in the middle of the shape.
Ring(minRadius, maxRadius);
Arc(minRadius, maxRadius, angle);
minRadius and maxRadius is in parsec. Angle is in degrees. an angle of 360 will not work as this will be an Ring.
Shapes alone don´t do anything usefull. Thats why we need a Constellation.
Constellation();
This is the main objekt you are working with. It hase the following functions:
AddStarSystems(Shape, count);
here is where the magic begins. This Method places count StarSystems where each StarSystem is in the given shape. Thats also the reason why you need to rotate or translage the constellation.
Translate(X, Y);
Translates the Constellation.
Rotate(angle);
rotates the Constellation with the given angle.
GenerateWarps();
Generates the warps between all starSystems in this constellation. This part basicly starts a thread. So from here on its MT.
GenerateLuxuryResources(amount);
GenerateStrategicResources(amount);
Places Luxury or Strategic Resources in a Constellation.
Now we have our Constellations ready. But they aren´t connected.
Unzip into (my documents)\Endless Space\Modding. This will create a new directory (my documents)\Endless Space\Modding\alternativeGalaxyGenerator containing 3 files: index.xml,License.txt and Jint License.txt and 3 subdirectories: Localisation, Gui and Plugins.
Load the mod and enjoy
Modding
1. We start of with a basemod which you want to merge with this mod. make a backup of it.
2. go to the basemod folder and go to Plugins/GalaxyGenerator. if it doesn´t exist create it.
3. inside it create a folder named Mod and move every file which is in Plugins/GalaxyGenerator into Plugins/GalaxyGenerator/Mod.
4. copy the content of Plugins/GalaxyGenerator from my mod to the basemod.
5. have fun.
6. if you want to have the right localization you have to merge the files in Localization
search in the file (game install dir)\EndlessSpace_data\output_log.txt for modding and copy the complete error message.
also a copy of (my documents)\Endless Space\Modding\alternativeGalaxyGenerator\Plugins\GalaxyGenerator\GalaxyConfiguration.xml is needed sometimes. As the file can be long please use attachments (zip it if needed).
Merged it with community bug fix / balance mod and working like a charm. Huge Epic Galaxy that generates fast. If only there was mod that allows to create larger fleets that AI can handlle and create.
+1 on request for source code unless you have privacy concerns.
Can you help us to understand the approach you took? How is javascript involved? Did you modify the 1.0.9 generator to add a javascript interface, and then replace some of the existing code with javascript calls? Since your effect is to speed up the code, it is hard to imagine that you did this by replacing compiled C# code with interpreted javascript. I would love to know more about what you actually did.
Can you help us to understand the approach you took? How is javascript involved? Did you modify the 1.0.9 generator to add a javascript interface, and then replace some of the existing code with javascript calls? Since your effect is to speed up the code, it is hard to imagine that you did this by replacing compiled C# code with interpreted javascript. I would love to know more about what you actually did.
As far as i looked over the mod files, he used JavaScript instead of pure XML to describe, for example, the galaxy shapes (check out the GalaxyShapes.xml file in the mod directory).
Isn't the official galaxy generator source code released under the MPL (Mozialla Public License)?
So, correct me if i'm wrong, the edited source must be remain under the same license.
Hi guys, I've been lurking for a while and been playing the game since beta. I merged the community bug fix/balance with this AND Larger galaxies (since PimpmyGalaxy isn't well, functional right now). All I can say is wow. I generated a 7224 star galaxy in about 2 minutes flat. Although, trying to generate a 15532 stars (dense eternal) was giving my system fits.
I did some profiling tuesday, just to see where i could rewrite to speed up a little and yes, WarpsOf() is a perf killer (the 2 millions calls for a "small" generation does not help). The call graph passes through FullyConnected() and Connected as far as i remember, and then call WarpsOf() multiple times. I'd be interested in your code if you dont mind, since i was planning to work on the performance part of the galaxy generator to speed up huge generations. Also, i'll provide a reference galaxy XML on Monday, if you want to keep the generation as it is, and compare your generated galaxies with the "reference" one.
BEWARE: Many Bugs are inside. They could crawl all over your desk^^ You have been warned.
Also. All Public functions in the class Constellation return true.
This is necrassary because mono hase a bug. void functions which are called from Jint will return a NullReferenceExpection AFTER the function finished. That was also the bug why this generator came 1week later. Happened the same time as a patch which didn´t realy messed with the api as we were thinking.
For the optimisations my bottleneck is checkAllCrossings.
You wan´t to look at following classes:
WarpBuilder: ReduceConnectivity: i reduced FullyConnected by a lot. Every connection is only checked once. not for every removed Warp.
Warp: saves the id so it doesn´t have to call IndexOf() anymore. also a performance killer with alot of systems.
Configuration: getRandomStarName: bugfix endless loops. 2 hashsets are not equal if they have the same obkects in a different order. use count instead.
Configuration: getRandomConstellationName same as getRandomStarName
and the one in Galaxy which is already mentioned servial times in the generator thread.
and yes i am late. But i had to do nothing for a while.
Hmm your generator was working perfectly last night and now I get a NullReferenceExpection. I don't know much about this stuff but since there was an update today I am assuming it has something to do with that.
Actually, the in game generation was the same on PC and Mac. The difference comes from the Test, which is an exe to test output. That exe uses mono on mac, and .Net on PC. The Random algorithm in Mono and .Net are different, so the Test.exe will yield different results. But since Unity uses the Mono Random, it yields the same results as a Mac. So i've added the Random.cs from Mono to the Galaxy Generator, so people can yield the same results with Test.exe on PC and on Mac
I've checked the output generation against my reference file, and as it actually speeds up the generation, it does not generate the same galaxy (resources and start planets). But i dont think it's a big deal. If one would want to really speed up things, it would lead to a whole rewrite of the generation algorithm, but he would face the same "problem" as a rewrite of the whole algorithm will inevitably lead to change the calls to Random, and thus, wont hit the same Random value at the same time as the original one.
nvidia geforce GT555m 2GB(as well as intel graphics card)
8GB memory
medium: loaded fine
large: loaded fine without too much heat
huge: from the start my laptop went into: 'I'ma fly outta here bitches mode'
first 5 mins: my cores maxed out at around 88Celsius, my GPU at 95Celcius(My intel card went to 99Celsius(Load for both between 70-80%)), CPU was at 100%, memory stable at 5.58GB
after 5-6 mins: CPU down to 20% and 70Celsius, GPU's back to around 70Celsius(Intel at 75Celsius(Load for both between 0-15%)),memory still stable around 5½.
after 9 and 40 secs mins: Crash to desktop due to too many heaps
Dagobert
Newcomer
Dagobert
Newcomer
4 000g2g ptsReport comment
Why do you report Dagobert?
Are you sure you want to block Dagobert ?
BlockCancelAre you sure you want to unblock Dagobert ?
UnblockCancelmalal
Newcomer
malal
Newcomer
100g2g ptsReport comment
Why do you report malal?
Are you sure you want to block malal ?
BlockCancelAre you sure you want to unblock malal ?
UnblockCancelAnonymous
Report comment
Why do you report Anonymous?
Are you sure you want to block Anonymous ?
BlockCancelAre you sure you want to unblock Anonymous ?
UnblockCanceldavea
Newcomer
davea
Newcomer
700g2g ptsReport comment
Why do you report davea?
Are you sure you want to block davea ?
BlockCancelAre you sure you want to unblock davea ?
UnblockCancelAnonymous
Report comment
Why do you report Anonymous?
Are you sure you want to block Anonymous ?
BlockCancelAre you sure you want to unblock Anonymous ?
UnblockCancelEvil4Zerggin
Newcomer
Evil4Zerggin
Newcomer
6 000g2g ptsReport comment
Why do you report Evil4Zerggin?
Are you sure you want to block Evil4Zerggin ?
BlockCancelAre you sure you want to unblock Evil4Zerggin ?
UnblockCancelBigBadDirewolf
Newcomer
BigBadDirewolf
Newcomer
100g2g ptsReport comment
Why do you report BigBadDirewolf?
Are you sure you want to block BigBadDirewolf ?
BlockCancelAre you sure you want to unblock BigBadDirewolf ?
UnblockCancelDagobert
Newcomer
Dagobert
Newcomer
4 000g2g ptsReport comment
Why do you report Dagobert?
Are you sure you want to block Dagobert ?
BlockCancelAre you sure you want to unblock Dagobert ?
UnblockCancelRavine
Newcomer
Ravine
Newcomer
200g2g ptsReport comment
Why do you report Ravine?
Are you sure you want to block Ravine ?
BlockCancelAre you sure you want to unblock Ravine ?
UnblockCancelmreadshaw
Newcomer
mreadshaw
Newcomer
100g2g ptsReport comment
Why do you report mreadshaw?
Are you sure you want to block mreadshaw ?
BlockCancelAre you sure you want to unblock mreadshaw ?
UnblockCancelDagobert
Newcomer
Dagobert
Newcomer
4 000g2g ptsReport comment
Why do you report Dagobert?
Are you sure you want to block Dagobert ?
BlockCancelAre you sure you want to unblock Dagobert ?
UnblockCancelmreadshaw
Newcomer
mreadshaw
Newcomer
100g2g ptsReport comment
Why do you report mreadshaw?
Are you sure you want to block mreadshaw ?
BlockCancelAre you sure you want to unblock mreadshaw ?
UnblockCancelRavine
Newcomer
Ravine
Newcomer
200g2g ptsReport comment
Why do you report Ravine?
Are you sure you want to block Ravine ?
BlockCancelAre you sure you want to unblock Ravine ?
UnblockCancelDagobert
Newcomer
Dagobert
Newcomer
4 000g2g ptsReport comment
Why do you report Dagobert?
Are you sure you want to block Dagobert ?
BlockCancelAre you sure you want to unblock Dagobert ?
UnblockCancelRavine
Newcomer
Ravine
Newcomer
200g2g ptsReport comment
Why do you report Ravine?
Are you sure you want to block Ravine ?
BlockCancelAre you sure you want to unblock Ravine ?
UnblockCancelDagobert
Newcomer
Dagobert
Newcomer
4 000g2g ptsReport comment
Why do you report Dagobert?
Are you sure you want to block Dagobert ?
BlockCancelAre you sure you want to unblock Dagobert ?
UnblockCancelHarel55
Newcomer
Harel55
Newcomer
100g2g ptsReport comment
Why do you report Harel55?
Are you sure you want to block Harel55 ?
BlockCancelAre you sure you want to unblock Harel55 ?
UnblockCancelRavine
Newcomer
Ravine
Newcomer
200g2g ptsReport comment
Why do you report Ravine?
Are you sure you want to block Ravine ?
BlockCancelAre you sure you want to unblock Ravine ?
UnblockCancelDagobert
Newcomer
Dagobert
Newcomer
4 000g2g ptsReport comment
Why do you report Dagobert?
Are you sure you want to block Dagobert ?
BlockCancelAre you sure you want to unblock Dagobert ?
UnblockCancelLolwut
Newcomer
Lolwut
Newcomer
300g2g ptsReport comment
Why do you report Lolwut?
Are you sure you want to block Lolwut ?
BlockCancelAre you sure you want to unblock Lolwut ?
UnblockCancel