pgalve100 / ecosystem-simulator Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Known performance errors:
Possibilities (not confirmed)
Newborns are spawned with an adult size
Newborns should spawn at a reduced size, equivalent of 1 year of life
Maybe OnSpawn() is not being called correctly?
For example:
The user should be able to move the camera around the world
Write the documentation for the Project Development section
The error appears on multiple different lines, but it's (most likely) related
EntityManager.cs:72
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <695d1cc93cca45069c528c15c9fdd749>:0)
EntityManager.DeleteEntity () (at Assets/Scripts/Entities/EntityManager.cs:72)
EntityManager.DeleteEntities (System.Int32 maxOfEachTypeToDeleteInThisFrame) (at Assets/Scripts/Entities/EntityManager.cs:94)
EntityManager.LateUpdate () (at Assets/Scripts/Entities/EntityManager.cs:59)
EntityManager.cs:126
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <695d1cc93cca45069c528c15c9fdd749>:0)
EntityManager+<GrowOrDie>d__19.MoveNext () (at Assets/Scripts/Entities/EntityManager.cs:126)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <3be1a7ff939c43f181c0a10b5a0189ac>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
<GrowOrDie>d__19:MoveNext() (at Assets/Scripts/Entities/EntityManager.cs:144)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Instead of doing all calculations in one frame, divide them in different frames
For example, to update 1000 animales, update 50 per frame for a total of 20 frames (1000/50). This could be any number as long as is stable and performs at a good framerate
An animal eat food, but the food doesn't get removed or gets removed in 5-10 seconds. It happens both to herbivores and carnivores. Most likely because of UUIDs
When an animal eats food, the food should get deleted either instantly or in less than 1 second
All entities must be represented with an appropiate low poly model. There can't be entities represented by a cube or similar view typical from a blockout or prototype.
r: animal that has a short lifespan and its strategy is to reproduce as many times as possible and have the maximum amount of babies. Example: Mouse
K: animal that has a long lifespan and its strategy is to reproduce only a couple of times, but to have strong babies that are more likely to survive
Example: Elephant
At this moment, the trees can spawn on any green area, but they should be only able to spawn on areas where there are no trees.
Possible solution:
Represent the world into a 2d map, so that it's possible to implement a two-dimensional hashmap/dictionary which holds the coordinates as key, and true/false if there is a tree on the area. Alternatively, it can hold an int (0,1,2) if the areas can hold X amount of trees with certain density.
Write the documentation for the Methodology section
Carnivores are similar to herbivores in the sense that have the same stats: hunger, reproduction urge, etc.
However, when they are hungry they look to hunt other animals instead of looking for fruits or vegetables.
Add multi-threading
Main thread stable at 30 FPS
Secondary thread to calculate pathfinding and other expensive operations that are not urgent for the next frame
If an optimized method similar to Vector3.Distance exists using NavMesh, then do this.
Else if an optimized method (in general) similar to Vector3.Distance but without "sqrt" exists, use this
Potential information:
https://stackoverflow.com/questions/50153370/how-to-get-the-closest-object-in-the-navmesh-and-making-the-agent-move-towards-i
a=1 (m?)
b=5000-10000 (m?)
levy(a,b,mu){
double u = random_within(0,1);
double range = pow(b,1-mu) - pow(a, 1-mu);
double base = range*u + pow(a,(1-mu));
out = pow(base,1/(1-mu));
return(out)
}
Write the documentation for the Project Management section
Write the documentation for the State of the Art section
Write the documentation for the Introduction section
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.