Posts: 7,602
Threads: 75
Joined: Jan 2018
Digging into the code
String (Actual name: CvString) 56 lines
It seems the Civ developers needed some more functionality with strings. This class inherits from the standard C++ string class and implements some additions. Those additions are small things like their own Replace method, which replaces some characters in the string or their own format method that formats the string in a special way. Nothing to fancy.
While talking about strings I thought to myself, did I every talk about " Types"? I think not so let's dive into it. Type basically is a definition of the data that a variable, method or other constructs represents. Some basic types with very basic definitions are:
- int: a whole number
- float: decimal numbers
- character: a letter
- booleans: a true or false value
C++ is a so called type-safe language. There's a lot to talk about that subject, but what it means in our case and most daily work of a programmer is that in C++ you need to define the type of a variable while you write the code. There are other languages like javascript in which you don't have to define the type at that point. Rather it gets it type as soon as the program fills it with some value during runtime.
Posts: 8,786
Threads: 40
Joined: Aug 2012
Turn 109
This turn we settled UnitEntity - the 21st Global Defines city - and had the pleasant surprise of establishing a trade route with TBW - we offered open borders in the spirit of mutual enrichment. The bad news is that AGG Rome is not far away and can Praetorian our cities from boats. The good news is that we think he's spent the game tangling with Krill and hopefully won't see us as a target.
We've done a bit more exploring since turn 81 and have found Baii's Khmer and TBW's Rome while Commodore's Mongolia have found us. So here's an expanded world map. Where the detail lacks it's because we don't have any...
Demos and power. Rusten is up to 20 cities as of this turn, which is a worry. Outside a golden age our demos still look fine, but we could do with working a few more hammers.
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
Posts: 7,602
Threads: 75
Joined: Jan 2018
Digging into the code
TalkingHeadMess (Actual name: CvTalkingHeadMessage) 243 lines
I have to admit this took me a while to figure out. I only looked at the code first and could not immediately see what part of the game it controlled. I had to search the whole code base to figure it out and then my memory kicked in. I totally had forgotten that this existed in the game and bet most of you, too. The code in this file controlls most of the stuff in that feature.
Looking at this feature it deals a lot with text, so let's talk about those characters a lot more. As you may know the computer only deals in 0s and 1s. So when presenting characters on the screen these bits and bytes need to be translated into the correct sign. This is where encoding comes into play. You may have heard of ASCII or unicode. Those are basically tables with the machinecode on one side and the corresponding character on the other side. ASCII is very simple as it's only the characters commonly used in the (American) english alphabet. Unicode is actually a lot more interesting. Not only does it contain foreign characters like cyrillic or chinese, it also contains things like emoticons or country flags. Now you may ask, who decides what's inside unicode. Well that goes to the Unicode Consortium. There are quite a lot more of those programmer organizations that are quite interesting and I might talk about those in the future.[url=https://en.wikipedia.org/wiki/ASCII][/url]
Posts: 8,786
Threads: 40
Joined: Aug 2012
Turn 112
Last turn we had a coinflip for a shrine or an earlier second golden age. Happily the coin came down heads and we'll build the shrine next turn! It should be worth 20gpt straight away...
With Iron Working arriving this turn we discover two iron - one already hooked by GameTextMgr, the other a nice boost to DiploParameters. I also just noticed that our new 2XP galley has Nav2 as a promo option - that may be an unintended by-product of Krill's naval tinkering but it's nice for our unit logistics.
We've done some sneaky scouting of Elkad by hiding under units in his cities each turn (I have a feeling he noticed as his tracker is exploring us at the same time). Lucifer is his Statue of Zeus city - it would be our #1 target in a war with Elkad, but it's a bit hard to get to. That, PRO/CHA, lots of walls and Pindicator's recently-built Christian shrine are making us lean toward attacking Pindi when we get our knights online. We'll need to put together a plan soonish. Also I think my overview map is going to need a lot more work.
Demos and power. We closed borders with Commodore because he was making a load of money out of us without a return. We demanded 7 gpt to reopen but he declared war instead to get his work boat through our culture. Once he's through we might as well offer OBs again, hopefully we'll have found him by the time the trade routes get back to profit.
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
January 10th, 2020, 08:42
Posts: 8,786
Threads: 40
Joined: Aug 2012
Turn 115 huge 1AD state of the game post
These are the raw facts about the game standings:
Player | Traits | Civ | Notes | Cities | Points |
The good guys | FIN/IMP | Inca (terrace/Quetchua) | | 23 cities | 504 |
Rusten | SPI/EXP | India (Harrapan Gran/Urukku Pike) | Jewish? Hanging gardens, Taoism | 21 cities | 496 |
Commodore | FIN/PRO | Mongolia (Ger/Keshik) | | 14 cities | 388 |
Pindicator | FIN/EXP | Arabia (Madrassa/Camel Archer) | Christian shrine | 20 cities | 370 |
Krill/GJ | FIN/CHA | England (Stock Exchange/Redcoat) | Choked by TBW? GJ stopped posting | 15 cities | 370 |
Gavagai | AGG/IND | Germany (Werkstatt/Strosstrupper) | Oracle, 'Mids t81 | 13 cities | 368 |
BaII (Mouseferatu) | ORG/EXP | Khmer (Baray/Ballistaphant) | | 13 cities | 348 |
Elkad | PRO/CHA | Native America (Totem Pole/Tracker) | Statue of Zeus t88 | 12 cities | 339 |
AT/Adler | IMP/ORG | Sumeria (Ziggarut/Vulture) | Colossus t89 | 16 cities | 332 |
Dark Savant | EXP/IND | Mali (Mint/Skirmisher) | Stonehenge | 11 cities | 319 |
Superdeath | AGG/CHA | America (Armoury/Minuteman) | Great Lighthouse | 12 cities | 308 |
BeardBeard | IMP/PRO | Holy Rome (Rathaus/Landskneckt) | Hindu shrine | 11 cities | 304 |
Borsche | EXP/CRE | Persia (Satrap Court/Immortal) | burnt 2mns second city t62 | 10 cities | 287 |
General KCav | FIN/ORG | Aztecs (Sacrificial Altar/Jaguar) | | 15 cities | 282 |
TBW | AGG/EXP | Rome (Forum/Praetorian) | Choked Krill? | 10 cities | 254 |
2MetraNinja | EXP/PRO | Ethiopia (Stele/Oromo) | 2nd city burnt t62 by Borsche | 11 cities | 231 |
But let's break it down by player and see what speculations we can speculate.
Leaders:
The good guys
We've used FIN and IMP well, 23 cities without a courthouse (they're coming soon) and yet our break-even research is around 35% - our traits are helping our economy to be great. The reason we're out ahead though has to be the 45 hammer terrace - they're just way too cheap. IMP is giving a 10% discount on city costs, FIN coast is partly powering our research, but getting to Currency first and making overseas contacts and cities is doing a lot of the work. Getting the prophet for the shrine was lucky and will also do us a lot of good.
Now we just need to eat someone.
Rusten
Has almost matched us city for city through the game without IMP, using Hanging Gardens to catch up at the point we thought we were pulling away. Without FIN or a maintenance-reducing trait his economy should lag behind us somewhat, but he's got cheap markets, potential to found the Taoist (and perhaps Jewish?) shrine and SPI will really start to shine for him soon. His granaries are also cheap and the extra happy is great on this map, so that might explain his stellar performance somewhat.
It looks like he's lining up for an Astronomy bulb so at that point I expect him to do some smashing of heads.
The Chasing Pack:
Commodore
Started slow with FIN/PRO only coming into it's own in the last 50 turns or so, but he's been screwed by the distance to a neighbour - he'll have to use knights instead of keshiks to keep expanding. He's done a lot of exploring and is likely to circumnavigate first, so expect him to be an early experimenter with the new naval mechanics. I don't expect him to be a fan.
We're almost neighbours now, which is a worry.
Gavagai
Using IND the traditional way - Oracled Metal Casting (we think) to get a great engineer and rush the pyramids (did he beat Rusten to them?) but he had Colossus sniped from him by AT/Adler - is his core landlocked or did he just dally? We've only just met him so it's early to make more detailed judgements, but he will kill someone soon and put himself in contention.
pindicator
Had a pretty fast start, but then stagnated a little after t50, possibly losing out on a religion to beardbeard, and is now expanding into jungle, which should also be slow going. He's got the Christian Shrine, but the religion is only in a couple of cities, and his economy is struggling badly.
He doesn't have an active dedlurker so may let things slide a little - there's a good chance that he won't get to Longbows before we hit knights, in which case he becomes target #1.
Krill
We think he was choked by TBW early on, but seems to have recovered well. Joey hasn't posted in the last 45 turns, so I guess they fell out? FIN and CHA are both good on this map, so he can pilot back to relevance somewhat.
The middle tier
Elkad
With slow-starting traits Elkad should be getting going properly now, but he may have poured a little too much into looking spiky and not enough into economy. He's built walls in a lot of cities and grabbed the Statue of Zeus without going on for the Great Library. If he can limp to longbows then he'll be relevant for another 60 turns, but fall to our cavalry or cuirassiers, if not then we should use knights in a tasteless alternate history.
Mouseferatu
Baii has done a far better job than I expected, expanding well and having a decent economy. How long that lasts when Gavagai comes calling is his next test, but it's nice to see how much better he's played than the last game of his I lurked.
Automated Teller
Took over for Adler and sniped Colossus from Gav. He's actually got the traits, cities and wonder to contend, but he needs a successful war to get there. Can he?
Lower-middle class
Dark Savant
Did stonehenge scupper his game?
beardbeard
Hasn't really spread Hinduism enough, so probably looking very tasty to his neighbours right now.
Superdeath
Built the Great Lighthouse again instead of expanding. He's starting to catch up a bit now, but it looks like it's too late to be anything other than a spiky meal.
Food
Borsche
Burnt 2metraninja's second city, presumably ending up in a cold/permawar footing that trashed his economy. Someone is going to enjoy eating him.
GeneralKilCavalry
GKC is a good player - how did he end up down here?
2metraninja
Ambushed by Borsche - at least he's dragged the aggressor down with him.
TBW
Choking Krill early may have been a mistake, but I don't think it was. Starting next to Krill was the mistake.
Map thoughts:
That's the players, but what about the world?
Good stuff - lots of interesting and varied land formations, civs have their own flavour depending on latitude, someone spent time making sure the ice didn't screw a polar civ and there isn't too many happy resources - CHA leaders and civs with a happiness UB (Rusten) have benefited.
Bad stuff - It's just too big, civs with an ancient UU have been screwed and the game so far must have been dull for lurkers (in spite of Borsche and 2mn's efforts). We're at 23 cities and only just butting against our neighbours' borders - I expect to have 30 before we fight anyone. Worst is that if we're successful in our planned expansion I fear we're going to be operating a PB18-style 100-city empire before the game is over. That just takes too much time, so if we can't land a knockout blow on everyone in the next 100 turns I'm not sure I'll have the inclination to play it out.
Anyway, the next 1000 years should be interesting at least.
Demos and power. Rusten got a lot of new population last turn...
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
January 10th, 2020, 09:59
Posts: 7,602
Threads: 75
Joined: Jan 2018
(January 10th, 2020, 08:42)Old Harry Wrote: The good guys
We've used FIN and IMP well, 23 cities without a courthouse (they're coming soon) and yet our break-even research is around 35% - our traits are helping our economy to be great. The reason we're out ahead though has to be the 45 hammer terrace - they're just way too cheap. IMP is giving a 10% discount on city costs, FIN coast is partly powering our research, but getting to Currency first and making overseas contacts and cities is doing a lot of the work. Getting the prophet for the shrine was lucky and will also do us a lot of good.
To add to that. Don't forget that we got the prophet just recently, so it's not a big factor for our current standing.
January 11th, 2020, 04:46
Posts: 3,905
Threads: 26
Joined: Apr 2013
Quote:Bad stuff - It's just too big, civs with an ancient UU have been screwed and the game so far must have been dull for lurkers (in spite of Borsche and 2mn's efforts). We're at 23 cities and only just butting against our neighbours' borders - I expect to have 30 before we fight anyone. Worst is that if we're successful in our planned expansion I fear we're going to be operating a PB18-style 100-city empire before the game is over. That just takes too much time, so if we can't land a knockout blow on everyone in the next 100 turns I'm not sure I'll have the inclination to play it out. ![[Image: frown.gif]](https://www.realmsbeyond.net/forums/images/smilies/frown.gif)
I totally agree with this, but I only realised it right at the very end of the map-making process and if I wanted to fix it I'd need to start from scratch with a map generated from different settings.
January 14th, 2020, 11:55
(This post was last modified: January 14th, 2020, 11:57 by Old Harry.)
Posts: 8,786
Threads: 40
Joined: Aug 2012
(January 11th, 2020, 04:46)The Black Sword Wrote: Quote:Bad stuff - It's just too big
I totally agree with this, but I only realised it right at the very end of the map-making process and if I wanted to fix it I'd need to start from scratch with a map generated from different settings.
So you're saying we can blame Krill? Excellent!
Turn 119
We met lots of new friends over the last couple of turns. Mostly around this barb city we discovered off Elkad's east coast. Our galley has a couple of chariots on, but Krill has a galley and a chariot en route (should hit it next turn I think), so we may be too late to get some capture gold. Borsche's culture is just visible to the SW of our scout, and we met a Superdeath work boat. Elsewhere we met a work boat from Rusten in TBW's culture and immediately assigned espionage to him.
The world gets a bit complex with this many players. Rusten and SD don't have a lot of open border agreements. Rusten and Krill haven't met the other north-polar civs (Baii, Com and Gav).
We've settled a bunch of new cities over the last few turns - UnitEntity in the south by TBW, Wstring as a filler in our core, then VariableSystem, XMLLoadUtility and YieldInfo have filled out the rest of Python. We've got a couple more settlers on the selected galley which will claim the two islands at the bottom and bottom right of the screen. So long as the highlighted barbarian galley doesn't cause trouble.
Demos. Rusten makes 175 gpt to our 185 when saving cash so our economies are just about on a par. He has 4 (!) gold resources and 2 whales though, so we're a bit jealous. Our MFG on the other hand is pretty stunning.
Meanwhile, who are the four players with more soldiers than us? Certainly not Elkad, who got Music this turn, meaning he's unlikely to get to Longbows before we get knights...
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
January 16th, 2020, 16:32
Posts: 8,786
Threads: 40
Joined: Aug 2012
Turn 121
Outwitted by barbarians!
That's not the only barb galley bothering us, so our exploring galley is going to head home to help out and we're putting a trireme into a build queue. Meanwhile Elkad stole the island we were hoping to settle. Wonder if it'll hit size 2 by the time we have knights? Our chariots are also going to try to grab the barb city that appeared a few turns ago.
Demos and power. Superdeath autorazed a city of Dark Savant's provoking a lot of whipping from DS - good work making things entertaining SD!
Meanwhile Elkad added the Heroic Epic to his Statue of Zeus city, meaning he'll be a little spikier than we hoped ![rant rant](https://www.realmsbeyond.net/forums/images/smilies/rant.gif) and Krill settled (or captured from barbs) four cities this turn. That's ridiculous.
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
January 22nd, 2020, 14:15
Posts: 8,786
Threads: 40
Joined: Aug 2012
Turn 126
Our scout discovers the original tense border of the game - Borsche trashed both his and 2metra's games by razing this city. ![popcorn popcorn](https://www.realmsbeyond.net/forums/images/smilies/popcorn.gif) Superdeath and Dark Savant are still warring, with a second DS city getting razed by SD recently.
Depending on how far this land stretches to the east we may be as few as four turns from circumnavigation.
Meanwhile we're dead set on attacking Elkad now (except if we change our minds), but it looks like he's starting a little bit of a build-up himself, it's only one trireme, but could cause our plans a bit of trouble, so we'll have to find a trireme or two of our own to counter it.
We eventually killed that annoying barb galley, then Elkad settled our island ![Argh Argh](https://www.realmsbeyond.net/forums/images/smilies/sasmilies/argh.gif) and now we're in a bit of a standoff outside this barb city. We blocked both hill tiles to try to force it to work the clams and perhaps grow, but no boat appeared - are they working a citizen instead? ![banghead banghead](https://www.realmsbeyond.net/forums/images/smilies/banghead.gif) We'll delay taking it for a little while longer in the hope that it gives us cover to send boats full of units to attack Elkad from the east as well. Hopefully Elkad thinks we're just waiting for it to grow.
Demos, GNP, MFG and power. We've added graphs on Com, Rusten and TBW recently. The next espionage target is getting research visibility on Rusten - we're making 16 EPs a turn from courthouses and can run some spy specialists if we really want more. Commodore is in a golden age at the moment so this is all very promising.
Completed: RB Demogame - Gillette, PBEM46, Pitboss 13, Pitboss 18, Pitboss 30, Pitboss 31, Pitboss 38, Pitboss 42, Pitboss 46, Pitboss 52 (Pindicator's game), Pitboss 57
In progress: Rimworld
|