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

MVP Scripting #140

Closed
Tracked by #107
zicklag opened this issue Jul 25, 2022 · 3 comments
Closed
Tracked by #107

MVP Scripting #140

zicklag opened this issue Jul 25, 2022 · 3 comments
Assignees
Labels
scope:medium Intermediate size task
Milestone

Comments

@zicklag
Copy link
Member

zicklag commented Jul 25, 2022

Description

We want to get an initial pass working on a scripting API. The goal here isn't to produce any final quality solution but to get the ball rolling and start finding out what the challenges we are going to run into are going to be.

I think a good goal is to allow you to do something useful in the game with a script. This could be anything, but I'm leaning towards an item implementation. For instance, maybe we try to migrate the implementation of the bottle item to a script.

Let's try to allow you to control things such as the bottle's flight pattern and damage.


As we implement, I think we want to try to keep the following ( future? ) goals in mind:

  • It'd be good for scripts to be usable as kind of a dynamic alternative to the Fish Fight Jumpy Item JSONs. Instead of having static JSON, lets try to make scripts as flexible as reasonable so you are less dependent on the item options that you have, for example, in Fish Fight.
  • We don't have to let you do everything in scripts. Doing a total and absolute binding to everything in Bevy isn't really necessary for this game. We want to remove as many barriers in scripting as possible, but focus on making it possible to modify content with scripts, not game architecture.
  • We want to give item implementations as much read access to relevant info in the game world as we can. For instance, an item should be able to use info such as where the enemies are, where the players are, what items and obstacles are where on the map, how much life fighters have, etc. Scripts can use this info for all kinds of interesting things, such as a homing weapon that targets the fighter with the most life or similar effects.

Alternatives & Prior Art

@zicklag zicklag added the scope:medium Intermediate size task label Jul 25, 2022
@zicklag zicklag mentioned this issue Jul 25, 2022
2 tasks
@zicklag zicklag self-assigned this Jul 25, 2022
@odecay
Copy link
Collaborator

odecay commented Jul 25, 2022

I'm not familiar with the Jumpy item JSONs but I was thinking as we get closer to having different types of weapons and attacks, it may be nice to script behaviors for them in their resource files.

@zicklag
Copy link
Member Author

zicklag commented Jul 25, 2022

That's what I was thinking.

In Jumpy they have a rather clever setup of effect spawners, projectiles, and collision boxes that can all be defined in JSON and create a rather flexible arrangement of weapon behaviors, but it's still all static in JSON and restricted to the options exposed by the game JSON metadata. It's similar to how all of our stuff is defined in YAML today.

We'd want something similar, but using scripts instead for applicable assets such as items, so that you aren't as restricted in what kind of item behaviors you can add.

If possible, I want to try to push as much of the content related behaviors as makes sense into scripts. So items and fighter attacks ( and possibly movement ) could be totally customized with mods or in other games on the "Punchy engine".

@zicklag
Copy link
Member Author

zicklag commented Aug 9, 2022

I may re-open if something unforseen happens, but I'm closing this in favor of jakobhellermann/bevy_mod_js_scripting#11.

@zicklag zicklag closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:medium Intermediate size task
Projects
None yet
Development

No branches or pull requests

2 participants