Game Engine Updates

could you please update examples/example-state.json to an output from a 2.0.3 game?
in games from matches run on the 2.0.3 engine I’m getting constructionTimeLeft values for buildings constantly decrementing after the building is built (eg. -50, -51, etc.). is that intended behaviour?
in the example-state.json constructionTimeLeft gets set to -1 once the building is build and remains there until the end of the game.

I do believe the constructionTimeLeft decrementing is intentional. They have used it as an indication of building age, which is required to determine which Tesla tower fires first. At least that’s how I read it when analyzing the game round processing code.

1 Like

@sschocke is indeed correct, thank you for the answer, we have left it in intentionally to do just that.
@MarcinK, I will have the guys take a look at the example and update it to reflect this change.

I don’t know if I’m doing anything wrong, but the results of the match on the portal seem wrong compared to my local (I’m using a tester to check the state files) version 2.0.3. Is the portal using a different version to run matches?

Missiles have speed 1 on the portal.

I’ve made adjustments to align with the player on the portal, if it changes back can I please use my previous upload?

1 Like

Hi @pierre.roux,
I’m a little worried about inconsistencies I get sometimes when I run the engine… sometimes turns are being skipped by one of my bots due to no fault of their own (that I can find)… it may just be that my laptop is a little weak but I’m worried that if the tournament machine is under heavy load it may cause bots to skip turns also (maybe due to a memory IO error or something else???)…

when I run the same 2 bots against each other (neither bot having any randomness programmed in) I get the following:

1st what the result should be:

and then the same test again with an error:

I see on the 2nd run there is an error:

but on the 1st there is no error on round 31:

my bots are written in JavaScript… I don’t know if anyone else with a js bot has come across this problem? or bots in any other languages?

Hi @Andre

To put your mind at ease, I also use JS bots for testing the new features we add into the game (it’s easy to mold JS bots into testers for this purpose :wink: ) and I never get the execution failed error on them. This might very well be due to slow I/O if many processes are hogging your resources.

As for the tournament runner, it only runs each bot alone after killing any other bot’s process. This ensures that each bot gets access to all the resources just for itself when it is its turn.

Try and have a look at the BotOutput.txt file, as this should contain the stdout or stderr that NodeJS would print errors to. Or else check if the file write library gets “overloaded” in any way (this is just speculation), so test setTimeout(() => { mainFunctionHere(); }, 100); in the bot to see if you can replicate it with such delay.

If you can find a way to easily replicate this bug please let us know.

1 Like

I see it on occasion with Java as well.

Release 3.0.0

New version 3.0.0 for the Game Engine, Game Runner and Starter Pack.

Download the new version here

Release notes

  • Added The Iron Curtain :shield:
    • Protects you against all missiles and Tesla Tower strikes entering your base
    • Costs 100 energy to activate
    • Lasts 6 rounds
    • Only available every 30 rounds (Use it or lose it)
  • Price changes
    • Tesla Tower build cost reduced to 100 energy

Some interesting changes, thanks Pierre.

Just to confirm - does the energy cost for firing a Tesla tower remain the same as before?

Yes, it still costs 100 energy to when a Tesla Tower fire. You can verify any such prices in the file in the starter-pack zipfile.

We hope these changes will bring more variance to the game, and open up new strange strategies. With the final tournament being so close, we want to give everyone a stable game-engine to practice and build their bots for the last push, but if horrible bugs are uncovered, we will gladly fix them ASAP :smile:


@pierre.roux small bug - the iron curtain stats as given to the bots in state.json don’t agree with the info in Seems like the engine is using the values in though.

@japes thanks :smile:
That is correct, the ironCurtainStats is not accurate. Please use the real values that are those used/described by the file

You can track progress here:

1 Like

@pierre.roux another one (I think) - looks like the construction score for the iron curtain isn’t being applied? Maybe this was deliberate?

1 Like

Thanks, got it in the pull request now :wink:
That is one that technically changes gameplay, so we will definitely have a new minor release with the iron curtain construction score fix in. But I would like to wait a week in case any other bugs are uncovered.

1 Like

cool, that makes sense :+1:

I appear to have a problem with Release 3.0.0 The Iron wall was not acticated, but the Tesla tower did not wipe out the opponent buildings. Should the Tesla Tower not destroy the opponent buildings before it is destroyed?

1 Like

sorry. I found the problem.

:smile: No worries, we really appreciate catching bugs before the big tournament.

I see the problem was that Player A did not have at least 100 energy for the Tesla Tower to fire

1 Like