Coder Social home page Coder Social logo

elephant's People

Contributors

mateuszwinnicki avatar

Stargazers

 avatar

Watchers

 avatar  avatar

elephant's Issues

Player can move between Locations

Player character can move between Locations

For now, we consider only single place Locations.
Moving between Locations causes time to pass (MainClock) with constant time (20 min)

Some Locations can be not accessible from certain positions

Map, which is a Location grid should calculate which Location can be accessible from which Location.

Considering a map:
001
001
001

where 0 is accessible from everywhere and 1 is not accessible at all we need to restrict the possibility of traveling by not accessible Locations.
Being in the center of this map you can only travel up, left, and down - not to the right.

The location should specify from which direction you can access it (if you can at all)
The map should know in which direction the player or NPC can move

Routine can be created for more than one day

Routine currently can be created for one day only. We need the possibility to create routines for more than one.

Proposal:
Routine day1
Routine day2
etc.

dayX will include dayOfTheGame modulo X

Moving between Locations can take a different amount of time

Based on Location type moving between them can take different times.

An example:
passing road will take less time than passing dense forest

Implement a speed boost/reduce based on direction from we are accessing the current Location.

An example:
east-west road
accessing from:

  • north/south: 75% speed
  • west/east 150% speed
    moving to:
  • north/south: 75% speed
  • west/east 150% speed

where speed is the property of NPCs/Player (which basically tells how much time will pass when an object moves)

Also, I think we can specify some generic types and reuse them in Location objects

NPCs should move between places without setting exact routine

Currently, each NPC has defined Routines which allows to "teleport" NPC between different places.
This causes problem that game designer can teleport NPCs between places without logic sense (which breaks immersion)

In this task we need to implement set of actions which NPCs is allow to do:

  • travel between places ( game should calculate best way for the NPCs based on specific flag)
  • stay in place for X hours

This can cause another problem - if travel takes too long it can probably cause situation where NPCs semi-randomly travels between places and stay in city for time where he should sleep or something like that. TBD

Calculate the route for NPCs travel

NPCs have actions to move between Places. Calculate the route for NPCs based on the game map.

This should provide a method that returns a legal list of Places (which are connected with each other by their Locations) which follow each other from one Place to another.

Add map to the game

The Map should contain a grid of Locations
From each Location, you can travel to north/south/west/east (if possible)
Location always contains the main Place
Location types:

  1. single place location (only main Place)
  2. multiple Locations location (accessible from the main location)
  3. submap of Locations (which should be basically sub Map object)

4. multiple places location (accessible from the main place)

Examples:

  1. Part of the forest
  2. Town, where you can access different sub-Locations like east part of the town, west part of the town (each can contain multiple locations)
  3. Cave/House, where you can provide a new grid and create complex Location

4. Part of the town, when you can go to different places like a tavern, forge, church
(Point 4 is removed because multiple Locations location (with a single place is the same as having one location with multiple places)

More complex example of Location:

Id: Location
Name: Town
Main Place: Main street
Locations:
- Location1
- Location2
- Location3
GridLocations: []

Id: Location1
Name: Forge
Main Place: Forge
Locations: []
GridLocations: []

Id: Location2
Name: Prison
Main Place: PrisonEntrance
Locations:
- Location21
- Location22
- Location23
GridLocations: []

Id: Location21
Name: PrisonCell1
Main Place: PrisonCell
Locations: []
GridLocations: []

Id: Location22
Name: PrisonCell2
Main Place: PrisonCell
Locations: []
GridLocations: []

Id: Location23
Name: PrisonCell3
Main Place: PrisonCell
Locations: []
GridLocations: []

Id: Location3
Name: Mine
Main Place: Forge
Locations: []
GridLocations:
[
[Location311, Location312]
[Location321, Location322]
]

etc.

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.