Missing data in textMap.txt

So I have decided to try learn c++ for this competition. I am currently using the textMap.txt instead of json, as I don’t know how to read a json file in c++ yet. At the moment it looks like there are some information missing in the textMap.txt file. This includes:

default roundIncomeEnergy
maxRoundLimit (which I see is also not included in the json. Maybe this is not needed.)

Is it possible to at least include the default round energy stats?


By default the sample bots (which includes C++) will be able to read the json file for you. I’d suggest starting with the sample bot and just modifying the logic to add your game strategy, this way you don’t need to re design the boiler plate code.

The starter bot for C++ seems to only read in the textMap.txt. Where is the sample C++ bot that can read the json file? Thanks.

Strange, looks like the C++ sample bot uses the text file.

For parsing JSON in C++, try RapidJSON (http://rapidjson.org/) - I used it last year and it worked well. Make sure you use version 1.1 if you want modern C++ features.

Good catch! :smile:

You can track the progress at https://github.com/EntelectChallenge/2018-TowerDefence/issues/61

Hi another thing missing in the textmap is the missile speed, It is in the building data but what if later 2 buildings have different speeds, then there is no way to get the speed of an already fired missile. Also the building type in the building data, this is available in the map but not the data block.

Hi @Kortgat,

So currently the missile speed will not vary in the first Tournament.
When we add the ability for faster missiles we will add them where appropriate.

Good spot there with the building type however
You can track the progress at https://github.com/EntelectChallenge/2018-TowerDefence/issues/64

For now if you want a workaround you can deduce the type of a building as follows:

  • has AttackDamage > 0 -> ATTACK
  • has EnergyGeneratedPerTurn > 0 -> ENERGY
  • otherwise -> DEFENSE

Thanks, That is what I currently do :smiley: