I’ve just made some changes to my Java bot for phase 3. I haven’t implemented all the new commands yet, but it looks like the game engine is ignoring my ACTIVATESHIELD command (see below).
I can see that my bot is issuing the command, but the game engine doesn’t actually activate the shield or reduce the available shields for my bot. Could you please have a look?
Edit: Could this have something to do with the fact that the runner doesn’t seem to know about the new commands? 2021-Galaxio/PlayerActions.cs at main · EntelectChallenge/2021-Galaxio · GitHub
Thanks, we will have a look at this
The runner shouldn’t effect it as it just passes what the bots send regardless if it has the the action or not. Can you confirm that you have pulled the latest version of the engine? If so can you please send the logs of the game to email@example.com and I’ll look into them.
Thanks Jana. I’ll try to send it through when I’m in front of my PC later today.
It’s running on the latest version of the starter pack - all of the new game objects are there and the engine is passing them to my bot in the game state (e.g. I can see the super nova pick up when it spawns, my player objects have the fields for shield count, etc).
It’s just ignoring the new commands that I pass back. I had a similar issue in the previous round (see this post New Starter Pack Release: 2021.2.2 - #8 by rfnel) where I initially declared my enums according to the Java convention (all caps + underscores) and the engine couldn’t map those as it appears to do a literal match on the string. I then changed the enums to remove underscores so that it would be a case-insensitive match for the .NET enum in the runner - that worked. This is what lead me to believe that the runner receives the commands, tries to map them, goes “I don’t know what this is” and then ends up with a null command when passing it to the engine. I could be wrong though.
This is in the runner Startup.cs file - this piece of code helped me to pinpoint the issue the last time round.
Thanks for the extra info, I will also try testing it with my Java bot this evening. We did test the new features with bots in some of the other languages so I think you are correct that it’s something with the Java enums. Will keep you updated with what I find.
I have made a PR to add the values to the runner, Phase 3 fixes by Jana-Wessels · Pull Request #42 · EntelectChallenge/2021-Galaxio · GitHub
You were correct that the Java bot needs the values in the enum as it’s sending through the string value of the enum. You can pull this branch to you runner so long for your local testing while we prep the new release.
Thanks for the help with this. Just wanted to check - is there a planned release date for the next version of the game engine for phase 3, with this fix included?
We are just waiting to see if there are more bugs to bundle with it, but we are aiming for the end of the week to re-release.