Update 'README.md'
This commit is contained in:
parent
9efbc68fc4
commit
005abfadec
19
README.md
19
README.md
@ -1,11 +1,14 @@
|
|||||||
*| JavaECS*
|
*| JavaECS*
|
||||||
# JavaECS-Docs
|
# JavaECS Docs
|
||||||
|
|
||||||
## *Documentation for the Java Entity-Component-System*
|
### [View the Documentation](./docs/overview.md)
|
||||||
|
|
||||||
Traditional game-engine designs typically follow the standard functional or object-oriented design paradigms.
|
## *About Entity-Component-Systems*
|
||||||
|
|
||||||
Functional-paradigm games focus on a 'this-then-that' model, e.g.
|
Traditional game-engine designs typically follow the standard functional or object-oriented design paradigms.
|
||||||
|
This choice of paradigm is as important as it is in typical applications.
|
||||||
|
|
||||||
|
A functional-paradigm game usually focuses on a 'this-then-that' model, e.g.:
|
||||||
|
|
||||||
***Simple Driving Game***
|
***Simple Driving Game***
|
||||||
|
|
||||||
@ -20,6 +23,7 @@ else:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Such a system works well for some game-designs; it is simplistic and follows a deterministic sequence of steps. But it lacks scalability and extensibility.
|
Such a system works well for some game-designs; it is simplistic and follows a deterministic sequence of steps. But it lacks scalability and extensibility.
|
||||||
|
|
||||||
An Object-Oriented approach could be used instead:
|
An Object-Oriented approach could be used instead:
|
||||||
``` py
|
``` py
|
||||||
# Create a base-class that is a vehicle, with basic properties:
|
# Create a base-class that is a vehicle, with basic properties:
|
||||||
@ -54,6 +58,9 @@ def GameLoop():
|
|||||||
if v.IsCrashed = False:
|
if v.IsCrashed = False:
|
||||||
anyNotCollided = True
|
anyNotCollided = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Which allows the instancing of objects. Each action also results in an objective state, which can be simply compared to determine the result.
|
||||||
|
|
||||||
|
ECS are typically built on object-oriented ideas, but make specfic attempts to reduce overheads that come from object-oriented ideas.
|
||||||
|
The primary reduction made in ECS is to eliminate or otherwise minimise inhertance cycles to reduce the amount of virtual calls required.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user