Skip to content
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

Attach arbitrary code to entities #1524

Open
byorgey opened this issue Sep 14, 2023 · 2 comments
Open

Attach arbitrary code to entities #1524

byorgey opened this issue Sep 14, 2023 · 2 comments
Labels
C-Project A larger project, more suitable for experienced contributors. G-Design An issue having to do with game design. G-Entities An issue having to do with game entities. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. T-Challenges Involves the challenge scenarios - shorter games with objectives. Z-Feature A new feature to be added to the game.

Comments

@byorgey
Copy link
Member

byorgey commented Sep 14, 2023

The idea is still kind of fuzzy in my head, and would require a lot more work to hash out a concrete design, but the basic idea is: why not be able to attach code to entities, not just robots?

e.g. perhaps when you use an entity (see #1287), it also triggers any code associated with the entity (which would run with system privileges inside an instant block, perhaps?). This could be really cool for scenario design. e.g. imagine creating a magic wand which upon use causes magical things to happen, like other entities appearing etc. Or imagine you wanted to make a challenge where every time you move it requires using up some kind of fuel. You could accomplish this by creating a new entity with some associated code which moves you and consumes some fuel (in order to move you would have to use thing instead of move).

For a more advanced version, perhaps there could be some way to attach multiple named definitions to an entity, and a way to send it "messages" to trigger the right piece of code.

@byorgey byorgey added Z-Feature A new feature to be added to the game. C-Project A larger project, more suitable for experienced contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. G-Entities An issue having to do with game entities. G-Design An issue having to do with game design. T-Challenges Involves the challenge scenarios - shorter games with objectives. labels Sep 14, 2023
@kostmo
Copy link
Member

kostmo commented Sep 17, 2023

#1228 seems vaguely related.

@xsebek
Copy link
Member

xsebek commented Oct 7, 2023

I like this idea! It would make commands relatively short (use foo) and create many new scenario options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Project A larger project, more suitable for experienced contributors. G-Design An issue having to do with game design. G-Entities An issue having to do with game entities. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. T-Challenges Involves the challenge scenarios - shorter games with objectives. Z-Feature A new feature to be added to the game.
Projects
None yet
Development

No branches or pull requests

3 participants