-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Challenge mode #285
Challenge mode #285
Conversation
Also get rid of `getRobotLoc` command since it is no longer needed.
This is shaping up great! 🤩 Some thoughts:
I hope this is not too much, thanks for working on this @byorgey 👍 |
Btw. could the I guess the situation is not super likely so I am fine leaving it to another PR (and I would be happy to try |
Thanks for the feedback @xsebek !
Yep, that's definitely intentional.
Right now for testing I just had it change the display of the mode from
Good idea, though I think this is something we should just leave up to challenge writers (we could even have some documentation on best practices for creating challenges) rather than having it specially built in.
Yeah, I was thinking of having some kind of special item whose description tells you about the challenge. Having a built-in key like F2 for making it pop up sounds like a good idea too. I'm not sure what you mean by checkmarks?
Sure, good idea.
You can already specify the default terrain and entity to be used for any cells that aren't explicitly specified. So e.g. you could have a water world or whatever. Blank is just what you get if you don't specify a default (i.e. it's the "default default" 😉 ). I also intend to have a mode where you specify a seed, and any cells not explicitly specified in the map will be filled in using the seed just like they would be in classic mode.
I was mostly intending the God commands to be used for authoring challenges, but I suppose they could be useful in creative mode as well. I'm not sure I like the idea of items appearing and disappearing from the inventory; also, the ability to switch between modes is really only for testing and will probably go away at some point. But maybe when you start a game in Creative mode you start with a special item like a "wand of power" or something like that which tells you about available commands?
Ah, hmm, I see... so instead of just "challenges" they would be something a bit more general, just describing how to initialize a game. I think that sounds like a good idea!
Hmm, maybe, but there's a lot more information you need in a save file than in a challenge description... |
Yes, that's definitely a danger. This is a consequence of the need to have win condition checking run to completion every tick, without the usual constraints on the number of CESK machine steps. I don't think we can really run it in another thread because we need to know right away whether you have completed a challenge or not. The code for checking the win condition is supposed to run every tick; running it asynchronously isn't a good idea since it could just get farther and farther behind the main game loop. Again, if the |
I would not worry about it, if some Player/God is testing a challenge in creative mode it would be annoying if we made it harder.
I was thinking ahead (so no need to do it here) about a multistage challenge like the tutorial - find tree, bring it back, make a log,...
My idea was that you would not need to have the item in inventory, it would be shown in the list of robot with the game mode set to Creative. It would only look like it is on inventory. Similar trick could be used to add the challenge description. |
For entities that should always be drawn as if the robot knows what they are. Mostly useful in creating challenge scenarios.
For now I just put a special custom "challenge" entity in the inventory. We could certainly add some code to look for this and handle it in some special way, I am not sure exactly how. |
I am pretty happy with this so far. I think it is certainly ready to have people play with it and try building their own challenges. There are a bunch more things I can think of to improve it; I am wondering what else is critical to do as part of this PR, and what we can leave to future improvement. Off the top of my head:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The challenge has a "codex" in robot inventory, but once I change that, it works nicely. 🙂
There are two things I would like to be done in this PR:
- a unit test for parsing the files in
data/challenges
- writing a relative or absolute file path on command line should look in that path
- we do not give hints which challenges are available, so it makes sense to use shell Tab to find the path
- as a matter of principle I do not like requiring the challenges to be in one specific path when there is no technical reason for it
I hope my last point does not come across too strongly, but I imagine challenges will be written by players for players too and forking a repo seems unnecessary. 😅
Co-authored-by: Ondřej Šebek <[email protected]>
Co-authored-by: Ondřej Šebek <[email protected]>
We don't actually need an enumeration type for different game types. There are really several orthogonal things going on: 1. How the world, robots, inventory, etc. are initialized. 2. Whether there is a winning condition. 3. Whether we are in "creative mode", allowing the player to do anything they want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 I checked it out and it all just works 🙂
fix missing world seed option in challenge mode.
Add a "challenge mode" where the player tries to achieve some specified goal from specific starting conditions.
This is very much a work in progress, but feedback could be useful already. Still to do:
Closes #15 .