Open patrickgreenwell opened 10 years ago
Right now the 1.0 alpha code is in my private repository. It still requires a lot of cleanup, so I didn't want to publish it yet, but I'll update it eventually... Do you want to work with the code or why are you interested?
Ok thanks for the update. I was looking into seeing how you did some of the heighmap masking/with the map file. I know it's a pretty big jumble of mystery surrounding it.
Are you looking for help with Dev work? I'm not super familiar with Java besides a cursory understanding, however it's close enough to C#(my trade) that I can get a grasp on it.
P.S. have you taken a look at Jetbrains' dot peek? Since CIM2 runs on the Untity C# library that should be able to help you get a semi-readable code that the crazy map file/GameState is serialized from. Though you could just be super awesome with a hex editor and don't need a code file to figure it out.
Well, I'm using ImageJ to read Heightmaps (cause Java doesn't know too much about 16-bit TIFs...), and then all I did was mapping the lightness against this interface as float[][]. Well, the transformation parameters and the corresponding boxplots in the GUI were another thing that took some time to figure out ;)
I'm planning to upload a branch with my latest code, so if you're interested, check it out, have a look at the TODO-List (it's in the changelog) and pick something. Unfortunately, I didn't have too much time to work on maps4cim lately, but I'm planning to create a bugfix-release for the 0.9 branch this month and merge some stable features from the alpha into it.
About the .net decompiler: I actually did hack the map format with just a hex editor, but there's still stuff in it I don't understand (especially the game objects at the end of the file). If you want to help, try to parse a map using the decompiler and tell me how it worked. It would be awesome if we could create some basic roads / buildings / vegetation with maps4cim. MapFileFormat.md contains all I know about CiM 2 maps (oh, it actually doesn't, need to update this too...)
@Klamann I took a look at some of the code via the decompiler. It's quite complex since the decompiler doesn't seem to understand everything(e.g. Random bits of non-compilable code/weird optimizations). Still walking through some of it in my spare time, though I think I found the base map object. I think I'll try getting it to load /unload a map in a C# project, though I'm still trying to figure out which serializer they used as it looks like it might be a custom binary one/one specific to the Untiy Game Engine. If I get something working I'll push up a repo and hopefully we can expand from there.
Parts of the serializer are likely to be custom made, or at least I can't think of a "normal" serializer that relies on such weird rules like those documented in the MapFileFormat.md. Anyway, it'd be awesome to be able to completeley deserialize the map files. Btw, if you understand german, there is a thread on citiesinmotion.net where object serialization is discussed. They are focused on the .bundle-packages that hold all data in CiM 2, but they are probably using a similar serialization technique for those.
I noticed you posted the updated 1.0.0 alpha on the board. http://www.cimexchange.com/topic/2204-maps4cim-a-real-world-map-generator-for-cim-2/page-5#entry17670
I was wondering if you were going to be updting the repository with the new code or if it would be in a separate branch?