snowern
Chieftain
- Joined
- Aug 5, 2017
- Messages
- 63
Continuing on from https://forums.civfanatics.com/thre...ed-in-large-games.688441/page-3#post-16622683
Now that's a pretty picture. It's actually a decent replication.
The TUI is now my own lib instead of FTXUI. So I can have proper tooltips, scrollbars, and modifier key support.
And, this UI is written as a CvMainInterface.py file. So, yes, the TUI lib is exposed to python and the original UI will be overridden as normal python code.
I would like to give the world view a polish too. It was written using 16 colours, and I've found out that the Win32 console supports 256 colours. I might also wonder about making the plots bigger with a smaller font size, or maybe have an adjustable plot size. Maybe have the city billboards always shown. It's difficult to stuff things into a 9x5 box.
I'll also need to get popups working again too. Can't found a city currently.
As a Fun test, how big can I make the maps? Let's just tweak Pangaea a little...
Start a WORLDSIZE_HUGE game and two minutes later, you get this:
Huh. We're all on top of each other. How did that happen. Would be terrible if you had a two-minute debug-edit cycle to fix a bug...
Something wrong with map gen maybe?
Looks fine. Nice island region. About the size of a huge map all on its own.
It's starting locations. And it's CvMapGeneratorUtil.py that decides starting locations. There's not much going on in it. And
And it's a calculated range. We have this line:
At 665k plots, we don't have integer overflow yet. But the resulting number is still huge. This term is quadratic and grows faster than the width of the map (maintaining aspect ratio). So to support galactically-sized maps (using the same settings), a mechanic-changing modification is needed for at least these map sizes. Say, capping
Turn times are about a second or two.
Memory usage? Just under a gig when loading the game. That's pretty tight. The A* node arrays alone are 633MB, and CvPlot[] is 233MB. CvPlot's nested allocations are probably about 100MB.
This map is saved successfully, but loading in Civ4 crashes at 2GB memory usage. As you would expect. Even with a 4GB patch, assuming it works. Does Civ4 create a complete graphical mesh for the whole map?
Now that's a pretty picture. It's actually a decent replication.
The TUI is now my own lib instead of FTXUI. So I can have proper tooltips, scrollbars, and modifier key support.
And, this UI is written as a CvMainInterface.py file. So, yes, the TUI lib is exposed to python and the original UI will be overridden as normal python code.
I would like to give the world view a polish too. It was written using 16 colours, and I've found out that the Win32 console supports 256 colours. I might also wonder about making the plots bigger with a smaller font size, or maybe have an adjustable plot size. Maybe have the city billboards always shown. It's difficult to stuff things into a 9x5 box.
I'll also need to get popups working again too. Can't found a city currently.
As a Fun test, how big can I make the maps? Let's just tweak Pangaea a little...
Code:
size = grid_sizes[eWorldSize]
scale = 10
return (size[0] * scale, size[1] * scale)
Start a WORLDSIZE_HUGE game and two minutes later, you get this:
Huh. We're all on top of each other. How did that happen. Would be terrible if you had a two-minute debug-edit cycle to fix a bug...
Something wrong with map gen maybe?
Looks fine. Nice island region. About the size of a huge map all on its own.
It's starting locations. And it's CvMapGeneratorUtil.py that decides starting locations. There's not much going on in it. And
iRange = player.startingPlotRange()
stands out clearly. Range you say?And it's a calculated range. We have this line:
Code:
iRange *= (GC.getMapINLINE().getLandPlots() / (GC.getWorldInfo(GC.getMapINLINE().getWorldSize()).getTargetNumCities() * GC.getGameINLINE().countCivPlayersAlive()));
At 665k plots, we don't have integer overflow yet. But the resulting number is still huge. This term is quadratic and grows faster than the width of the map (maintaining aspect ratio). So to support galactically-sized maps (using the same settings), a mechanic-changing modification is needed for at least these map sizes. Say, capping
getLandPlots
here to the number of plots in a normal huge map.Turn times are about a second or two.
Memory usage? Just under a gig when loading the game. That's pretty tight. The A* node arrays alone are 633MB, and CvPlot[] is 233MB. CvPlot's nested allocations are probably about 100MB.
This map is saved successfully, but loading in Civ4 crashes at 2GB memory usage. As you would expect. Even with a 4GB patch, assuming it works. Does Civ4 create a complete graphical mesh for the whole map?