Giter Club home page Giter Club logo

clean-living's People

Contributors

herecydev avatar mattridgway avatar smudge202 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clean-living's Issues

Clean up game-time pull request #11

I left hat pull request in a bit of a mess (it was getting pretty late) so I want to go through and review it myself. Refactor anything strenuous to read, expand on the unit tests where gaps exists, etc.

CI not working

Appveyor can build manually but does not seem to be detecting commits across all branches. Is this by design (only dev branch runs)?

Personally I'd prefer CI across all branches.

CI Build does not run integration tests

Currently the build server doesn't introduce compilation symbols, just uses those defined in project properties.

I think both component and integration tests should be enforced in CI.

Inventory

Requests to engine can:

  • add item to inventory
  • disallow the same instance of an item to be added twice
  • return a list of items in the inventory from through perspective

Later:

  • limit the size of the inventory (size, weight, count)
  • use items in the inventory
  • remove item from inventory
  • check when adding an item that it was visible/accessible to the actor
  • items can perish/be consumed/damaged through use/time
  • update perspective so item is no longer visible when picked up (and inverse when dropped)
  • ensure its possible to add the item to the inventory (its within perspective and nothing in the way)

time subscriptions

  • We need the concept of time within the game
  • Components of our engine will be able to subscribe to be notified when a certain game time happens
  • Components of our engine will be able to subscribe to be notified at regular game time intervals
  • As a System I want to know what the current game time is

Energy

  • Diminishes over time
  • Affected by nourishment and hydration
  • Outputs events that other components can listen to (i.e movement)

Remove A/A/A comments from tests

We're preaching that comments aren't necessary when code is well structured and named, so should probably be consistent and not follow the AAA comment pattern in test classes

Subscription filtering

The engine currently (as of PR #11) provides the ability to subscribe for an event type. However, do we need finer grained subscriptions?

For example, imagine the component controlling a bottle of water. It wants to subscribe for when it is consumed; the current structure would only allow for it to subscribe for when anything or at best any drink is consumed.

This might be a non-issue if the same component is responsible for handling the consumption of any drink, but if the components are finer grained, do we need the ability to predicate the events?

Thirst

We need the ability to track our level of thirst.
Thirst should diminish over time.
Thirst should be replenished by drinking.
The player should be adversely affected by dehydration
The player should have positive effects when thirst is quenched

game-time

We have the GameTime class, but in hindsight I this should either not to be exposed, or exposed but not used by the Engine's API.

Instead, it should probably be IEngine<TTime> where you specify which Time mechanisms you're using (Gregorian or something custom), and you're expected to provide (or consume if we provide) an interface that can convert between TTime and GameTime, which the Engine can then use to work as per current behaviour.

Document clock process

Receiving a subscription for a time that has already passed can be handled in several ways:

  1. Clock throws exception
  2. Clock doesn't notify the component
  3. Clock notifies component immediately

For now we have decided Option 2, but add option 3 if it becomes a problem.

Test Discoverer MethodNames

The current xunit test runner/discoverer displays test names as the fully qualified name of the class + method name. We'd rather this was just the method name.

This can be achieved with a blank test discoverer returning testcase's with the appropriate naming enum.

Health

  • We need the ability to track our health.
  • We need a representation of health as a percentage.
  • Health should diminish as a result of Hunger, Thirst, Combat, Environmental, etc.
  • Health should be replenished by resting, being well nourished, applying medical treatment, etc.
  • The player should be adversely affected by low health (movement, ability to perform certain actions, etc)

WithValues

We have test attributes in the test helpers project which encompass everything except Theory's.

We need a WithValuesAttribute and test discoverer capable of running theories.

IMessage Event Store

Capture all IEvent, IRequest (anything inheriting IMessage) and create way of replaying these

Build Server

We should setup a build server, for... well.. building.

AppVeyor seems a good a choice as any considering this is an open source project, unless there are any objections?

At the point it becomes appropriate we can publish to a NuGet feed, but I don't think that needs to be setup yet.

Nourishment

  • We need the ability to track our level of hunger.
  • We need a representation of Hunger as a percentage.
  • Hunger should diminish over time.
  • Hunger should be replenished by eating.
  • The player should be adversely affected by starvation
  • The player should have positive effects when well nourished

Potential racing condition in Scheduler

Address potential racing condition in concurrent STA subscription when disposing subscriptions.

Whilst disposing subscriptions, it is possible for the STA thread to add subscriptions that will not be disposed correctly.

events

The engine, as per Issue #6 and PR #8, supports time events, but there is currently no support for arbitrary events defined by a game.

I think we need to expand the engine's capabilities to support these abitrary events.

perspective

We need to introduce the concept of perspectives as the medium in which UI components view data.

Perspectives are :

  • provided for a given actor
  • are updated by changes within the engine

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.