mateuszwinnicki / elephant Goto Github PK
View Code? Open in Web Editor NEWGame engine for text based RPG game
Game engine for text based RPG game
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)
Currently, only LocalTime (without seconds) is available.
Add how many days passed
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 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
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:
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
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:
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
Route calculations should take into consideration that some NPCs can have specific requests to not travel by the main roads OR to travel only by the main roads etc.
We need to provide possible tweaks for route calculations
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.
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:
4. multiple places location (accessible from the main place)
Examples:
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.
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.