GET-TUDA-CHOPPA / SpelunkBots

An API that allows for AI bots to be written in the original 2009 version of Spelunky.
33 stars 13 forks source link

Error in spelunkybots.gmk #13

Open Gerrit-K opened 8 years ago

Gerrit-K commented 8 years ago

After pulling the latest master (at db7d93926d4a5e33b39649039e0459b427be3fc9), compiling the dll's and starting the game via spelunkybots.gmk, I get the following error:

___________________________________________
ERROR in
action number 1
of Create Event
for object oScreen:

In script scrInit:
In script LevelParameters:
Error in code at line 37:
           SetSeedData(levels[i]);
                       ^
at position 22: Unknown variable levels

It turns out that in the script "Scripts/AI Toolset/GLOBAL/LevelParameters" all assignments to levels are commented out:

...
// Assign Values
//levels[0] = "123";            // marathon seed 1
//levels[1] = "124";            // maraton seed 2
//levels[0] = "publictest0";    // test map 1
//levels[1] = "publictest1";    // test map 2
...

I wondered whether this is intended, because everyone who follows the Getting-Started-Tutorial (like me) will probably face the same problem.

Kytie commented 8 years ago

Hello Gerrit-K, yes it was intentional for those values to be commented out as they are simply there to give an example of the types of values you would give depending on whether you were testing using test maps or the marathon.

Gerrit-K commented 8 years ago

Wow, I didn't expect a reply to come so quickly. Thanks!

I agree that it's good to have these examples, but as someone who is new to GameMaker, it wasn't obvious to me where to find the corresponding code, because this part is not covered in the guide and GameMaker doesn't provide script paths in stack traces. I would naturally expect the code to work out of the box without having to configure a script deep down in the directory first, so I think uncommenting some of the lines or providing an additional default setting wouldn't hurt, would it?

To underline my point: in contrast to LevelParameters, the PlayerChoice script is documented in the guide and also provides a default option, so why not do the same here? ;-)

Kytie commented 8 years ago

Hello Gerrit-K, the documentation does indeed need updating however I am unaware of who is dealing with documentation at the moment as I am no longer involved with this project.

I would argue however that because the system is designed to test specfic things about the bot created in Spelunkbots the user needs to specify before launching the game what they are testing for, or else the system doesn't know whether you are running stored maps or the procedurally generated normal game. I agree it would be nice if this was stated in the documentation.

I have emailed someone about the documentation and am waiting to see if anything is being done about it.

Thank you for taking an interest in the Spelunkbots project and hope you like it :).

Gerrit-K commented 8 years ago

Ah, I see your point. Thanks for taking the time!

And yes, I do like it so far ;) I'm planning to try out MCTS and other general search techniques to see how they perform in such a complex game without involving too much domain knowledge.