EcoSim | An attempt at simulating an ecosystem | Game Engine library
kandi X-RAY | EcoSim Summary
kandi X-RAY | EcoSim Summary
I began this project with the intention of becoming familiar with Unity and simulations.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of EcoSim
EcoSim Key Features
EcoSim Examples and Code Snippets
Community Discussions
Trending Discussions on EcoSim
QUESTION
I followed a PyGame tile-based tutorial for a project in school, but I never intended to make a game, but a simulation of an ecosystem. Unfortunately, when I run my program the performance is very bad and it only manages to run for a few seconds, before the windows to stop answering.
The only thing I want to do at the moment is to place a new patch of grass, when the energy of a grass patch reaches 80.
What is there to do? Is it bad that everything is inside of the update method? Can I use events or something to make the checks happen with a greater interval? I know there is a lot of maths going on each frame, but don't know how to do it another way.
Here is my code:
main.py:
...ANSWER
Answered 2020-Oct-21 at 12:13The major issue is the method Sim.new_grass
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install EcoSim
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page