Giter Club home page Giter Club logo

emergence's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

emergence's Issues

Cleaning up signals.

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 DashMaps 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.

Create player control prototype

Questions

  • Can we get stable complex systems using the signal diffusion and prioritization systems outlined?
  • Can we reason about these systems?
  • Are these systems visually interesting? Visually clear?

Minimal features

  • RTS-style camera: panning, zoom, mouse and keyboard controls
  • single unit selection
  • single tile selection on hex grid

Basic UI tools.

Dev-facing UI:

  • bevy_egui
  • bevy_console

User facing UI:

  • bevy_ui

Ant signal following behavior

Ants should have the following modes:

  • wandering (default behavior)
  • following a signal upstream
  • picking up an object
  • dropping off an object
  • consuming the object they are carrying
  • working at a structure or tile (construction, deconstruction, resource transformation)

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.

Add the ability to select tiles

Follow-up to #3. Players should be able to:

  • select tile groups of arbitrary shapes
  • add and remove tiles to the selection using Shift + LMB
  • select which area selection mode they want to use from a menu

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:

  • line
  • freeform
  • triangle
  • expanding hexagon (from central tile)

Signals aren't spreading to all three neighbours from origin tile.

Instead, only two of the neighbours see noticeable diffusion at first.

image

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

Update README.md

Provide a basic summary of the game in the Readme, and a short guide on contributing.

Add a `choose_max` pheromone transducer option for ants.

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.

Add basic intent system

Follow-up to #26.

Start with two types, which change the behavior of ants:

  • attract
  • repulse

Pheromones should:

  • linger
  • deplete a global resource bar

Players can apply pheromones with the space bar, and select which pheromone is used via a menu (like with zoning selection or area tool).

Diffusion should respect terrain

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:

  • let 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 tile

Allow signals to be advected.

Currently, they only diffuse. Allow them to be advected in order to enable interaction (for example) with simple weather.

  • expand the diffusion write-up in order to explain how this will be done

Open source the repo

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.

Split `initialize_signal` system for logical clarity

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.

Create signalling prototype

Questions

  • Can we get stable complex systems using the signal diffusion and prioritization systems outlined?
  • Can we reason about these systems?
  • Are these systems visually interesting? Visually clear?

Minimal features

  • a grid
  • units
  • buildings
  • resource processing loop
  • disruptions

Stretch features

  • unit reproduction and death
  • building reproduction and death
  • basic player control of building zone

Add the ability to zone areas for structures

Players should be able:

  • select a building type from a menu (including the option to designate a tile as clear)
  • select a region
  • ants will clear space as needed
  • ants will attempt to seed new structures of the appropriate type there (or construct them if inorganic)

Zoning should be applied via right clicking.

Add the ability to inspect units, structures and tiles

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.

Open questions

What should be displayed when the player has selected multiple entities?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.