Logo Platform
logo amplifiers simplified

[RELEASED] alternativ Galaxy Generator

Copied to clipboard!
12 years ago
Jan 4, 2013, 12:16:46 AM
so guys this is my first post (hello spacesmiley: smile)



reading and LOVING this thread/mod,started using it from version 0.2.1, im on an old c2d e6400 2.13 ghz running at 3,2ghz

im loading like 2 h on a 400 planet system/huge galaxy 106 systems 5-7 min ,you may understand its not sexy like this smiley: wink



its not a problem to increase the size its bout the loading time like some of you pointed out allready



just as idea for the next expansion or the 2013 suprise ;X

may outsource the galaxy generation and make it run on both cores (may this wont work?not a programmer myself)

or just

use his code is at the first page?



at all i think most of us understand that there are more important issues to solve but since the algorythm is allready given here

there should be a fast way to improve the game for all the player small huge whatever ,balancing is working also (if im reminding it correctly)



have a good one guys

ps sorry if there are some mistakes not my native lang.
0Send private message
12 years ago
Jan 4, 2013, 7:39:37 AM
Crymson wrote:
He does provide the source on the first page of this post doesn't he?



I would happily put in the work to get this project up and running again but I looked over the source and honestly couldn't figure out where to start, my coding experience was 20 years ago and I'm just lost looking at what he did.




Oooooooh







I totally did not see that, my bad. I'll look into it as soon as i have the time for.
0Send private message
12 years ago
Jan 4, 2013, 11:07:30 AM
davea wrote:
I agree it is worthwhile. Viewing the statistic another way, out of the thousands of copies sold, less than 50 people requested bigger galaxies.




Oh ho ho, you said the magic word.



Surprisingly, you don't actually need a large sample of a population to be able to apply a poll's result to the population at large. You only need a minimum of seven. A bigger sample, however, does make the result more accurate. All we really need to do is figure how much is probably deviates from the larger population. In this case, I'll use the 95% confidence level since it's the most commonly used. Using this, I have determined the margin of error for the poll is 12.25%. Wow, that's pretty big. However, the percentage of people using the largest galaxies is 68.75%. This means somewhere between 56.50% and 81.00% of the thousands of players would find the fix extremely helpful in a 95% confidence level. Everyone else would just find it pretty helpful.
0Send private message
12 years ago
Jan 4, 2013, 1:36:25 PM
a discussion has started^^



as i sayd earlier in this thread.

There is a problem after the galaxy has been generated.

So you don´t have to look at my source but yours.



because i don´t have debug symbols or the source of the game.

As you may or may not have seen is this:



[ApplicationState_CreateGame] GameManager_CreateGameCompleted: game creation has triggered an error.

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (.TKey key) [0x00000] in :0

at Galaxy.GenerateWonders () [0x00000] in :0

at GameManager.CreateNewGame (System.Object sender, System.ComponentModel.DoWorkEventArgs e) [0x00000] in :0

at System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) [0x00000] in :0

at System.ComponentModel.BackgroundWorker.ProcessWorker (System.Object argument, System.ComponentModel.AsyncOperation async, System.Threading.SendOrPostCallback callback) [0x00000] in :0



This is the first error that appears in the log.

And it has nothing to do with this mod.

Galaxy.GenerateWonders() is your code.



Im sure it´s an easy fix as soon as i know what key in what dictionary is missing.
0Send private message
12 years ago
Jan 4, 2013, 2:30:14 PM
You get rid of all the different Regions in your code, and keep only one. A galaxy generated with your mod creates one big Region with everything in it. By design, Regions were tied to homesystems (one region == one homesystem, aka "one empire"). Recently we added the Wonders (hence Galaxy.GenerateWonders), and it was decided to use the Regions to balance the wonders apparition, in game. That may be the problem here. As you can find out looking at the images used for the vanilla generation, each image got a color defining a region. If you can manage to keep that info through your generation, that may solve the problem.



We continue to look on our side to find the true reason of the crash.



Also, the your source/ours discussion was only to try to understand what happened on your side, to understand what has changed between a vanilla generation and yours, to try to pinpoint what problem happened in the generated file (and i managed to have a running test sandbox outside the game, just for the sake of grabbing a fully generated galaxy)



(and i have to admit that you're crazy man. Crazy good. JS image generation, multithreading, etc. Insane smiley: biggrin . Infinite respect)
0Send private message
12 years ago
Jan 4, 2013, 3:42:12 PM
JS image generation?

I don´t generate Images.



for multithreading i seperate warps from wormholes.

That way each Constellation can be calculated seperately



And for the Regions i was just lazy, but will do if thats the problem.



Also i just found out that the galaxy generated with one seed is always different.

Will also look in that.
0Send private message
12 years ago
Jan 4, 2013, 3:51:50 PM
Aaaaaaand here's the catch (and without your source i wouldnt have figured the whole story).



First, your approach, as i stated earlier, is crazy smart. For info, Dagobert's generator uses a fusion of the two config files for the generation. It has its own config file, with the infos and notions he added to the generator. At runtime, it reaches the public folder, grabs the config file for the Vanilla Gen, creates a in memory representation of those two in one in-memory xml Doc, then generates stuff. Clever.



But (there's always a "but" in those stories, otherwise it wouldnt be fun).



We use the config file to have some infos while adding Wonders to the world (long story short, wonders are added game side, not generation side, for a bunch of reasons). And when we do that, we expect some infos to be there. For example, StarPopulationBalancing.



Our mod world is very exclusive. At one point, when this mod is loaded, we use the config file from the mod, which does not have that info (it finds it in the public file, and uses it after it has been merged with its own). So, the very moment we want to access the balancing info... blam. It's not here.



Workaround : add the StarPopulationBalancing on your side

SideNote : you may want to add/modify the Public/Simulation/Registry.xml with size infos for the Wonders. Namely, at the node /Game/Galaxy/Wonders/WondersCount/

[code]







1

1





2

2



[/code]



you may want to adjust the values to the size/number of system you specified in your config file.





[EDIT] On Randomization, you might want to integrate the Random from the repository, to keep it consistent between the Windows world and Unity's. Internally, Unity uses mono, and the Random of Mono is not the same implementation as .Net's. So you might run into different results ingame and outgame (been there, done that). The Random.cs in the assembla repository is the one straight out of Mono.



[EDIT2] The region thingy is used on wonders' balancing. So if you put them back, it should generate "balanced" wonders through the world.
0Send private message
12 years ago
Jan 4, 2013, 4:08:47 PM
davea wrote:
To be fair, not everybody wants to play in huge galaxies. There are higher priority bugs (MP desync)




Highest priority in my book smiley: stickouttongue, but i think im pretty vocal about that... lol



But regardless, i'd love to see bigger galaxies if the generation could be made more effecient
0Send private message
12 years ago
Jan 4, 2013, 5:00:37 PM
there are 2 problems with adding Public/Simulation/Registry.xml.



I can´t change parts of it.

So if you change something in the original file it also needs to be changed in the mods file.



It could also break the easy mod support i made if a mod for example changes victory conditions.





besides that the mod is working again.

Just need to add regions and then you can get it.



[EDIT] or some sort of self updating mod files. But i wont do that. Also i think the game could still crash the first time it generates a map since it uses the old files.
0Send private message
12 years ago
Jan 4, 2013, 5:03:08 PM
Ravine wrote:
Aaaaaaand here's the catch (and without your source i wouldnt have figured the whole story).



First, your approach, as i stated earlier, is crazy smart. For info, Dagobert's generator uses a fusion of the two config files for the generation. It has its own config file, with the infos and notions he added to the generator. At runtime, it reaches the public folder, grabs the config file for the Vanilla Gen, creates a in memory representation of those two in one in-memory xml Doc, then generates stuff. Clever.



But (there's always a "but" in those stories, otherwise it wouldnt be fun).



We use the config file to have some infos while adding Wonders to the world (long story short, wonders are added game side, not generation side, for a bunch of reasons). And when we do that, we expect some infos to be there. For example, StarPopulationBalancing.



Our mod world is very exclusive. At one point, when this mod is loaded, we use the config file from the mod, which does not have that info (it finds it in the public file, and uses it after it has been merged with its own). So, the very moment we want to access the balancing info... blam. It's not here.



Workaround : add the StarPopulationBalancing on your side

SideNote : you may want to add/modify the Public/Simulation/Registry.xml with size infos for the Wonders. Namely, at the node /Game/Galaxy/Wonders/WondersCount/




Holy crapolski, Amplitude just proved themselves to be top tier again. We might be getting aGG back!



Edit:



Dagobert wrote:


besides that the mod is working again.

Just need to add regions and then you can get it.


YAY!
0Send private message
0Send private message0Send private message
12 years ago
Jan 4, 2013, 7:58:43 PM
Dagobert wrote:
update is out.

And generates Galaxys ~15% faster than the last one.


All of my <3s to you and Amplitude for making this happen.
0Send private message
0Send private message
12 years ago
Jan 5, 2013, 9:59:06 PM
Dagobert wrote:
update is out.

And generates Galaxys ~15% faster than the last one.




Huzzah! smiley: cool
0Send private message
12 years ago
Jan 6, 2013, 12:22:37 AM
I love you guys, Ravine and Dagobert!



Now we just have to get the CPU multithreading for Unity so the game doesnt grind down to a halt with 1-5 FPS when you play with a big galaxy like I've said many times:



/#/endless-space/forum/28-game-design/thread/12516-multi-threading

http://forums.amplitude-studios.com/showthread.php?5500-Optimizations-status/page5



/#/endless-space/forum/37-modding/thread/16276-released-alternativ-galaxy-generator

/#/endless-space/forum/37-modding/thread/16276-released-alternativ-galaxy-generator









PS. My old idea worked on the first try!

prassel wrote:
I just compiled a list of over 2000 system and constellation names


I can make a thread for it if anyone is insterested.



Here's two screenshots:

0Send private message
0Send private message0Send private message0Send private message
12 years ago
Jan 6, 2013, 3:34:07 PM
Hey. I created a folder named Modding in the User/My Dokuments/Endless Space folder. If everything works, should the mod then appear in the Mod option in the in-game start menu?



When it didn`t i tried to extract it in to the Endless Space Steam game folder but nothing happens. Surely something i`m missing, I have only used Nexus Mod Manager previously so im kind of noobish here :P
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message