Skip to content

Commit

Permalink
Merge pull request #25 from ShiJbey/v12-abm-revised
Browse files Browse the repository at this point in the history
V1.0.0 abm revised
  • Loading branch information
ShiJbey authored Aug 16, 2023
2 parents 48323ae + 69075d1 commit bb5924b
Show file tree
Hide file tree
Showing 129 changed files with 15,970 additions and 12,968 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ node_modules/
/docs/node_modules/

# Removing configurations because of issues moving between platforms
.vscode/
.idea/

# Profiling output
Expand Down
84 changes: 79 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,84 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres mostly to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
There may be minor-version updates that contain breaking changes, but do not warrant
incrementing to a completely new version number.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres mostly to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). However, all releases before 1.0.0 have breaking changes
between minor-version updates.

## [1.0.0]

Version 1.0.0 departs significantly from previous Neighborly releases. This version emphasizes simplicity, focusing
more on Neighborly's use as a data science and prototyping tool. This change reflects my evolving understanding of my
research and its place in the academic universe. To match this, most samples have been converted to encourage
experimentation and showcase data visualizations.

The passage of time has been greatly simplified to only simulate one year at a time. Since we no longer model more
granular time steps such as hours, there is no need for character routines or operating hours. We also do not need
to track the maximum capacity of a location or mark locations as eligible for travel.

Neighborly moved away from the data-driven approach of loading prefab definitions from
external files. Creating characters or businesses this way required duplicate
definitions and made it harder to share and modify existing prefabs. The new
`CharacterType` and `BusinessType` classes are a return to using factory objects to
instantiate GameObjects. The best part is that the factory is also a component that is
associate with the GameObject it instantiates. So, now users can easily query by
character or business type.

Below is a non-exhaustive list of changes.

### Added

- New Trait System so characters can spawn with additional components that affect their behavior.
- New Stats System to track stats and stat modifiers
- New Role system to manage things like occupations
- Experimental Inventory System to track items
- New `CharacterType`, `BusinessType` and `ResidenceType` factory classes for content authoring
- `@event_role` decorator that reduces boiler code when required to define new random life events.
- Added a role system to handle things like narrative-specific roles and occupations.
- `JobRequirementsLibrary` resource that manages all job requirements for occupations.
- Item system that tracks character inventory and item types.
- Additional API routes to the server
- Systems now have lifecycle methods for `on_create()`, `on_start_running()`, `on_destroy()`, `on_update()`,
`on_stop_running()`, and `should_system_run()`.
- Added additional config parameters for logging to `NeighborlyConfig`
- Added `settlement_name` and `world_size` parameters to `NeighborlyConfig`

### Changed

- Converted `RelationshipFacet`s to use the new stat system
- `BuildingMap` resource to replace the `ISettlementMap` associated with the settlement instance.
- `Settlment` is now a resource instead of a component
- Spawn tables have been changed from components to resources
- Removed map and business/location tracking from the `Settlement` class
- Converted samples from python scripts to interactive python notebooks.
- Time moves at single year time steps
- Built-in systems now inherit from `System` instead of `ISystem`
- Death from old age is now a `DieOfOldAgeSystem` instead of a random life event
- Most events and character behavior are now triggered by specialized systems.
- Most built-in LifeEvents no longer use role lists to track associated GameObjects and data.
- Event listeners now only accept the dispatched event instance.
- An instance of the world state has been added to the attributes of `Event` instances.
- World methods have been divided among four classes `SystemManager`, `GameObjectManager`, `EventManager`,
and `ResourceManager`.
- Revised relationship system and class interfaces for social rules, relationship stats, and relationship modifiers.
- Renamed `RelationshipFacet` to `RelationshipStat`.
- Renamed `--no-emit` CLI argument to `--no-output`.


### Removed

- The `OccupationType` class. Occupations are now defined as components that inherit from the `Occupation` class.
- Plugin configuration settings are no longer accepted in the `NeighborlyConfig`. Please use the `settings` section of
`NeighborlyConfig` to pass configuration settings to loaded plugins.
- The `Routine` component class has been removed.
- The `OperatingHours` component class has been removed.
- Locations no longer track what GameObjects are present at the location since we do not model character movement.
- `RelationshipUpdateSystem`, `FriendshipStatSystem`, and `RomanceStatSystem`
- Removed all CLI args not including `--config, --output, --no-output`.

### Fixed

- Added missing dependencies to `pyproject.toml`

## [0.11.3]

Expand Down Expand Up @@ -49,7 +123,7 @@ incrementing to a completely new version number.

### Updated

- Type hints have been reformated to prevent duplicate description warnings from sphinx. Class
- Type hints have been reformatted to prevent duplicate description warnings from sphinx. Class
attribute type definitions have been moved out of `__init__` and the doc strings for attributes
are placed below their type hints.
- Updated to newer build of Tracery (`tracery3`)
Expand Down
8 changes: 8 additions & 0 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@inproceedings{johnsonbey2022neighborly,
title = {Neighborly: A Sandbox for Simulation-based Emergent Narrative},
author = {Johnson-Bey, Shi and Nelson, Mark J and Mateas, Michael},
booktitle = {2022 IEEE Conference on Games (CoG)},
pages = {425--432},
year = {2022},
organization = {IEEE}
}
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to Neighborly

Contributions are welcome. Below is a list of areas that someone could contribute. If you create a new Neighborly
plugin, please message me. I will include a link to your plugin's GitHub repository. If you want to contribute to the
core code, fork this repository, make your changes, and submit a pull request with a description of your contribution.
Please remember that this project is a tool for creativity and learning. I have a
[code of conduct](./CODE_OF_CONDUCT.md) to encourage healthy collaboration, and I will enforce it if necessary.

1. Proposing and implementing new features
2. Fixing bugs
3. Providing optimizations
4. Submitting issues
5. Contributing tutorials and how-to guides
6. Fixing grammar and spelling errors
7. Creating new samples and plugins

## Code Style

All code contributions should adhere to the [_Black_](https://black.readthedocs.io/en/stable/) code formatter, and sorts
should comply with [_isort_](https://pycqa.github.io/isort/). Both tools are downloaded when installing development
dependencies and should be run before submitting a pull request.

## Documenting Python code

Neighborly uses [Numpy-style](https://numpydoc.readthedocs.io/en/latest/format.html) docstrings in code. When adding
docstrings for existing or new code, please use the following formatting guides:

- [Sphinx Napoleon Plugin for processing Numpy Docstrings](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html)
- [Example Numpy Style Docstrings](https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html#example-numpy)

## Contributing unit tests

To contribute unit tests:

1. Fork the repo.
2. Add your test(s) to the `tests/` directory.
3. Submit a pull request with a description of your test cases.

Your commits should only contain changes to files within the `tests/` directory. If you change any files in other parts
of the project, your pull request will be rejected.

# Licensing

This project is licensed under the [MIT License](./LICENSE). By submitting a contribution to this project, you are
agreeing that your contribution will be released under the terms of this license.
Loading

0 comments on commit bb5924b

Please sign in to comment.