OPEJ Posted July 30, 2018 Report Share Posted July 30, 2018 Hi , I m a new guy of this game and I am studying how to mod this game. This is my first question below: After I browse the editor, the map size are fixed to several part like "Tiny" "Large" "Giant" etc. If I want to custom a map size is larger than "Giant". Is that possible to edit?how? 1 Quote Link to comment Share on other sites More sharing options...
asterix Posted July 30, 2018 Report Share Posted July 30, 2018 On 30/07/2018 at 6:10 PM, OPEJ said: Hi , I m a new guy of this game and I am studying how to mod this game. This is my first question below: After I browse the editor, the map size are fixed to several part like "Tiny" "Large" "Giant" etc. If I want to custom a map size is larger than "Giant". Is that possible to edit?how? Expand yes it is possible to edit in rmgen look at 1 Quote Link to comment Share on other sites More sharing options...
OPEJ Posted July 30, 2018 Author Report Share Posted July 30, 2018 @asterix Thanks! It really help me a lot!!! Quote Link to comment Share on other sites More sharing options...
asterix Posted July 30, 2018 Report Share Posted July 30, 2018 On 30/07/2018 at 9:01 PM, OPEJ said: @asterix Thanks! It really help me a lot!!! Expand you are welcome Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2018 Report Share Posted July 31, 2018 (edited) You need to be careful when choosing sizes that are excessively high. A map with double the dimensions of giant size would have 1024 tiles a side. Map area would be 1048576 tiles! Considering texture and height values need to be stored for each tile, I wouldnt expect even initializing the map object to be quick. And then you would need to actually manipulate the grid and place objects. This is actually a kinda extreme example, but I hope you get the point. TLDR: Expect to get bored during mapgen. Unless 0AD crashes ofcourse. ==Edit== I have been wondering whether changing the 2D arrays in rmgen to typed 1D arrays would lead to a significant performance improvement. However, array[x][y] is more readable than array[y * size + x]. So, theres that as well. Edited July 31, 2018 by Guest Quote Link to comment Share on other sites More sharing options...
OPEJ Posted July 31, 2018 Author Report Share Posted July 31, 2018 @(-_-) You'r right . After I test my custom size of map. It took me a loooong time during the mapgen . And sometimes will get a fail gen(I am still figuring what's wrong). Anyway ,it is hard to build a super large map... But I hope it can be simple in the future. Because I am planning to make a ww1 mod, with bigger weapon,railwaygun warship...etc. Btw,do u know which hardware be used during mapgen?? I found that only few core of cpu deal with that... 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2018 Report Share Posted July 31, 2018 On 31/07/2018 at 7:26 AM, OPEJ said: And sometimes will get a fail gen(I am still figuring what's wrong). Expand If its failing with errors, can you post those? On 31/07/2018 at 7:26 AM, OPEJ said: Btw,do u know which hardware be used during mapgen?? Expand Not sure. But I dont think utilising multi-cores for map generation have been implemented yet. @elexis might know more. Quote Link to comment Share on other sites More sharing options...
elexis Posted July 31, 2018 Report Share Posted July 31, 2018 Random map generation uses a single thread, so it can only utilize one core. Since the operations are sequential, only certain tasks could be outsourced to a secondary thread. For instance when testing a Constraint against an area. If the area contains 1024 points, there could be 4 threads each testing the 256 points against the Constraint and then the map generation pauses until all 4 threads finished. Testing the constraint would have to be a read-only process, otherwise you get undeterministic behavior, race conditions and players would generate different maps ir they didn't segfault. We can probably achieve better results with smarter algorithms in random map generation and the later simulation. Quote Link to comment Share on other sites More sharing options...
OPEJ Posted July 31, 2018 Author Report Share Posted July 31, 2018 On 31/07/2018 at 9:59 AM, (-_-) said: If its failing with errors, can you post those? Expand I have a noob question, where can I find the error message. They just appeared and gone... On 31/07/2018 at 1:02 PM, elexis said: Random map generation uses a single thread, so it can only utilize one core. Since the operations are sequential, only certain tasks could be outsourced to a secondary thread. For instance when testing a Constraint against an area. If the area contains 1024 points, there could be 4 threads each testing the 256 points against the Constraint and then the map generation pauses until all 4 threads finished. Testing the constraint would have to be a read-only process, otherwise you get undeterministic behavior, race conditions and players would generate different maps ir they didn't segfault. We can probably achieve better results with smarter algorithms in random map generation and the later simulation. Expand Thanks for explain.I really hope it can use mutiple core for mapgen. I don't want my others core just wait and see... Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2018 Report Share Posted July 31, 2018 Interestinglog.html file https://trac.wildfiregames.com/wiki/GameDataPaths Looks like either a too large size or too many entities judging from the out of memory error. Quote Link to comment Share on other sites More sharing options...
elexis Posted July 31, 2018 Report Share Posted July 31, 2018 Look at the error messages, it seems like it's a gamesettings bug (there are several in atlas). Even better than a logfile would be knowing how to reproduce the error. On 31/07/2018 at 4:24 PM, OPEJ said: Thanks for explain.I really hope it can use mutiple core for mapgen. I don't want my others core just wait and see... Expand As mentioned they have to for large portions of the program and secondly doing better algorithms without implementing threading might still make the loading screen much faster without spending the additional time to implement threading. We want to spend our time efficiently too, so either the most effective measures first or the ones that are really quick to implement but still efficient. Quote Link to comment Share on other sites More sharing options...
OPEJ Posted July 31, 2018 Author Report Share Posted July 31, 2018 On 31/07/2018 at 4:32 PM, (-_-) said: Interestinglog.html file https://trac.wildfiregames.com/wiki/GameDataPaths Looks like either a too large size or too many entities judging from the out of memory error. Expand On 31/07/2018 at 4:59 PM, elexis said: Look at the error messages, it seems like it's a gamesettings bug (there are several in atlas). Even better than a logfile would be knowing how to reproduce the error. Expand Thanks,After I look over the script of map. I think I need more time to analyze script. On 31/07/2018 at 4:59 PM, elexis said: As mentioned they have to for large portions of the program and secondly doing better algorithms without implementing threading might still make the loading screen much faster without spending the additional time to implement threading. We want to spend our time efficiently too, so either the most effective measures first or the ones that are really quick to implement but still efficient. Expand I will wait for that change:D Quote Link to comment Share on other sites More sharing options...
elexis Posted July 31, 2018 Report Share Posted July 31, 2018 I mean which buttons did you press to get the error? Does the same error occur again when you press the same buttons? If we have the recipe to produce a bug, we can solve it most likely Quote Link to comment Share on other sites More sharing options...
OPEJ Posted July 31, 2018 Author Report Share Posted July 31, 2018 On 31/07/2018 at 9:14 PM, elexis said: I mean which buttons did you press to get the error? Does the same error occur again when you press the same buttons? If we have the recipe to produce a bug, we can solve it most likely Expand oh...I just press "generate map". For now, only "Bahrain" would always get this error. I am still testing other maps. Sorry for my bad English that misinterpret what you say... Quote Link to comment Share on other sites More sharing options...
elexis Posted July 31, 2018 Report Share Posted July 31, 2018 Oh I missed the "Out Of Memory". That can explain any sort of error that comes afterwards, especially if you set a maparea 4 times as large as the largest one officially supported. It's possible to that alternative mapgeneration algorithms would not get Out-Of-Memory errors by being more efficient with memory (or even writing temporary files). But even then it's questionable whether there won't be many other algorithms that get Out-Of-Memory issues during the game (especially the AI) Quote Link to comment Share on other sites More sharing options...
OPEJ Posted August 1, 2018 Author Report Share Posted August 1, 2018 On 31/07/2018 at 11:39 PM, elexis said: Oh I missed the "Out Of Memory". That can explain any sort of error that comes afterwards, especially if you set a maparea 4 times as large as the largest one officially supported. It's possible to that alternative mapgeneration algorithms would not get Out-Of-Memory errors by being more efficient with memory (or even writing temporary files). But even then it's questionable whether there won't be many other algorithms that get Out-Of-Memory issues during the game (especially the AI) Expand I couldn't understand that why It "out of memory"? I'm sure my computer has enough RAM for it. Quote Link to comment Share on other sites More sharing options...
elexis Posted August 1, 2018 Report Share Posted August 1, 2018 The program might need a certain amount of consecutive free memory, but the memory might be fragmented. (For exampel if 8GB of 16GB are free, but it's 1MB free and 1MB allocated, one can't allocate one chunk of 2 MB). One could find out at which place the OOM occurs in bahrain.js (by adding a warn("hello world")) after every statement and thus see which memory allocation fails (probably some array creation). 1 Quote Link to comment Share on other sites More sharing options...
OPEJ Posted August 1, 2018 Author Report Share Posted August 1, 2018 On 01/08/2018 at 1:25 AM, elexis said: The program might need a certain amount of consecutive free memory, but the memory might be fragmented. (For exampel if 8GB of 16GB are free, but it's 1MB free and 1MB allocated, one can't allocate one chunk of 2 MB). One could find out at which place the OOM occurs in bahrain.js (by adding a warn("hello world")) after every statement and thus see which memory allocation fails (probably some array creation). Expand That mean I have to add a messagebox for each procedure in bahrain.js to find out the problem.Right? Quote Link to comment Share on other sites More sharing options...
elexis Posted August 1, 2018 Report Share Posted August 1, 2018 warn("hello world"), not message box Quote Link to comment Share on other sites More sharing options...
OPEJ Posted August 1, 2018 Author Report Share Posted August 1, 2018 (edited) On 01/08/2018 at 3:44 AM, elexis said: warn("hello world"), not message box Expand OK,I will try it. Wait! I think the problem is not from the bahrain.js after I review the logs. The mapscript didn't load when OOM happend. mainlog.htmlFetching info... Edited August 1, 2018 by OPEJ Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2018 Report Share Posted August 10, 2018 According to the log, OOM error occured after g_Map.log(“lowering sea ground”); but before the next log statement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.