leafwing-studios / emergence Goto Github PK
View Code? Open in Web Editor NEWAn organic factory builder about adapting to a changing world.
Home Page: https://leafwing-studios.github.io/Emergence/
License: Apache License 2.0
An organic factory builder about adapting to a changing world.
Home Page: https://leafwing-studios.github.io/Emergence/
License: Apache License 2.0
We'll be having a DashMap
of possible signals at each tile. Each signal has an Emitter
id. An Emitter
is, essentially, a u16
. Each Emitter
id also has some configuration information (diffusion rate, decay rate) and color information (specifying how it should be displayed as a map overlay) stored in a HashMap
.
This raises the question: suppose a large number of signals were created; but they have now decayed/are not being used anymore. There will be a large amount of unnecessary data auxiliary data in the game now. It should probably be cleaned up.
Likely, for unused signals, we will want to:
save the configuration/colour information to disk on "signal cleanup", and then reload this information when the signals are in use again
delete entries in the tile DashMap
s related to unused signals
We will also want a good way to keep track of which signals need cleaning up. To figure out if a signal needs to be cleaned up, we need to know that it is at 0.0
at all tiles.
Only use stages when you need to do fancy things with commands.
Make sure to use the Linux runner for everything: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions
Dev-facing UI:
bevy_egui
bevy_console
User facing UI:
bevy_ui
Started by following https://gist.github.com/jagrosh/5b1761213e33fc5b54ec7f6379034a22
generation.rs
provided basic functionality for initialization of various structures, units, and terrain: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/generation.rs
This should be re-integrated into main
, but also updated. In particular, we now use bevy_ecs_tilemap
for generation of various entities.
We should link to this repo, and update the documentation.
May want to remove FoP while we're at it.
Currently, in emergence_lib
's Cargo.toml
, we are depending on StarArawn's fork. Instead, depend on Leafwing's fork: https://github.com/Leafwing-Studios/bevy_ecs_tilemap/tree/main
People will want their own settings/meta-information.
Ants should have the following modes:
To close this issue, ants should be able to identify the most pressing need near them based on signal strength, pick up an object at the source (part of a plant), bring it to the matching sink (a fungus), and then drop it off.
We should add retreating from a negative signal too, but that can be done later.
This will become too hard to manage very quickly.
unit.rs
implements basic functionality for wandering organisms ('ants'). Re-integrate this into main: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/units.rs
Follow-up to #3. Players should be able to:
When the player holds down LMB and drags from the originating tile, the area tool should be used.
There are several area tools to begin with:
Instead, only two of the neighbours see noticeable diffusion at first.
This is probably an error in bevy_ecs_tilemap around which neighbours are being returned, given the recent helpers overhaul. It will also be useful to cleanup the neighbours code in bevy_ecs_tilemap in order to finish #22
Provide a basic summary of the game in the Readme, and a short guide on contributing.
Since "trait queries" are not an option: is there any way apart from doing it manually?
structure.rs
outlines basic plant and fungi (fixed organism) behaviour: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/structures.rs
Re-integrate this into main.
PDE approximation with operator learning: https://www.quantamagazine.org/new-neural-networks-solve-hardest-equations-faster-than-ever-20210419/
These seem to fill the same role as Organism
and the like?
Currently, ants probabilistically follow a signal up a gradient (see:
). As the signal diffuses, their wandering becomes less effective towards the source of the signal. When the signal they are following is a pheromone, this leads to non-ideal behaviour, as it seems the ants are "not really following" the signal. It could be frustrating to the player.Ants use a signal transducer to map an input signal into an output pathfinding weight (the higher the weight, the more likely it is the ants will move to that tile).
When this signal is a pheromone, ants should (have the option) a transducer that assigns weight 1.0 to the neighbouring tile with the highest pheromone signal value out of all neighbours, and assign weight 0.0 to all tiles that do not have the highest pheromone signal value. If all tiles have the same pheromone signal value (unlikely, as we are using floating point numbers), we should weigh them all equally with 1.0.
Follow-up to #26.
Start with two types, which change the behavior of ants:
Pheromones should:
Players can apply pheromones with the space bar, and select which pheromone is used via a menu (like with zoning selection or area tool).
Possibly, we'll be fine with just linking to Bevy's code of conduct: https://github.com/bevyengine/bevy/blob/main/CODE_OF_CONDUCT.md
Currently, signal diffusion does not care about terrain type, but thought should be given as to how terrain type can influence diffusion of a signal.
Idea for a first pass solution:
Terrain
variants have a diffusion constant associated with them, which is multiplied by the signal's diffusion constant to produce a "total diffusion constant" for a given tileterrain.rs
was fairly empty to begin with, but it should be re-integrated into main
regardless: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/terrain.rs
In order to flesh it out:
Currently, they only diffuse. Allow them to be advected in order to enable interaction (for example) with simple weather.
IMO we just dual license under MIT + Apache, and make all assets Creative Commons Share Alike.
@plof27 is on board, and I think that the publicity and learning materials are worth it.
Currently, initialize_signal
is doing two things: 1) setting the Signal
to 1.0
for some tiles, and 2) initializing the right components on all tiles. These two points should be split out into separate systems.
Similar to what Bevy does: https://github.com/bevyengine/bevy/blob/f00212fd48e7aa681e0c8e9238a8f07da469d591/README.md?plain=1#L8
They currently query for tile_id
unnecessarily using TileStorage
:
Emergence/emergence_lib/src/diffusion.rs
Line 159 in ee3ed55
Instead, just get the Entity
using a query.
Useful for debugging, useful for the player.
Should visualize what pathfinding weight the ant is assigning to each neighbouring tile.
Part of: #50
pheremone.rs
provides the basic functionality for a user defined positional signal; re-integrate this into main
: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/pheromones.rs
This should be upstreamed:
Emergence/emergence_lib/src/diffusion.rs
Line 45 in 2f88b69
Players should be able:
Zoning should be applied via right clicking.
Organisms are the basic type behind #23 and #24; and thus must be re-integrated into main: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/organisms.rs
See Bevy's CONTRIBUTING.md for inspiration: https://github.com/bevyengine/bevy/blob/main/CONTRIBUTING.md
When the player has a unit/structure/tile selected, they should be able to see the detailed statistics of that selection.
Left clicking on a tile multiple times should cycle through the various entities sharing that space.
What should be displayed when the player has selected multiple entities?
This feels like something that should exist upstream?
Signals, organisms and tiles all deserve their own folders.
This should be less error-prone, and must be centralized.
id.rs
outlines various signal types that can be produced: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/id.rs
It should be re-integrated into main
, but perhaps be renamed to signal_types
.
It is closely related to #19
This involves integrating cube/axial coordinate system material into bevy_ecs_tilemap
, which used to reside here: https://github.com/Leafwing-Studios/Emergence/blob/9a426f8fb92a68a7af3f61b87f4e53468c33fc69/emergence-lib/src/position.rs
This is important for getting Issue #2
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.