psichix / emergent Goto Github PK
View Code? Open in Web Editor NEWToolset for producing emergent gameplay for games written in Rust
Home Page: https://psichix.github.io/emergent/
License: Other
Toolset for producing emergent gameplay for games written in Rust
Home Page: https://psichix.github.io/emergent/
License: Other
Were you planning to base this project on some specific prior art? I’m designing emergent game features as well so I’m very curious to know more about your intention here.
I'm trying to integrate with Bevy. It doesn't seem like the existing task system will work as implemented, both because I can't access queries/commands in tasks but also because tasks don't behave like systems. Right now I have an update
system that adds current_state()
as a component, and each of my task systems checks the reasoner's state before running.
What I'd rather do instead is treat Task
implementations as marker components. So instead of the reasoner running the task implementation, it'd simply expose its current task via a current_task()
getter. I could then add the empty struct, then my task systems could use With
constraints to only run when the specified component is added.
Hello,
Great library, and thank you for such good documentation.
I have question though: why is machinery not send or sync? It was strange to me to discover this was not so.
This causes problems if user stores the machinery as component in for example, specs.
Thank you!
Right now my reasoner creation looks like:
let reasoner = ReasonerBuilder::default()
.state(State::Idle, ReasonerState::new(0.001, Idle))
.state(
State::Investigate,
ReasonerState::new(
ConditionConsideration::unit(ClosureCondition::new(|p: &Perception| {
p.heard_kill.is_some() || p.player_coords.is_some()
})),
Investigate,
),
)
.state(
State::Attack,
ReasonerState::new(
ConditionConsideration::unit(ClosureCondition::new(|p: &Perception| {
p.sees_player
})),
Attack,
),
)
.state(
State::Dodge,
ReasonerState::new(
ConditionConsideration::unit(ClosureCondition::new(|p: &Perception| {
p.sees_player && p.in_gunsight
})),
Dodge,
),
)
.build();
I think it would make sense to have a few conversions, so something like this might work:
let reasoner = ReasonerBuilder::default()
.state(State::Idle, ReasonerState::new(0.001, Idle))
.state(
State::Investigate,
ReasonerState::new((|p: &Perception| p.heard_kill.is_some()).into(), Investigate)
Where |v: &M| -> bool
can convert directly to a consideration. Might make sense to do something similar for ClosureConsideration
as well.
Yes, ideally these would be separate traits/functions, but for now it's simplest to locate this with the reasoner creation.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.