Pandemic simulation in Rust
Last updated Dec 16, 2025
36
Stars
1
Forks
0
Issues
0
Stars/day
Attention Score
5
Language breakdown
Rust 100.0%
โธ Files
click to expand
README
pandemic_simulation
A simple pandemic simulation with customizable parameters written in Rust, and rendered with Raylib.
https://user-images.githubusercontent.com/75204369/162750625-4df57e3d-0c02-4b5a-9c16-b510ff232b89.mp4
Customisable parameters:
INFECTION_RADIUS- Radius around infected person where normal person is susceptible to infectionINFECTION_RATE- Probability that normal person will get infected when within infection radiusNUMBALLS- Number of peopleINITIALINFECTEDPOPULATION- Number of people infected at start of simualtionMAXSPEED- Maximum possible speed that people move around at (speeds and start locations are random)BASERECOVERYTIME- Base time for recoveryRECOVERYTIMERANGE-recoverytime = BASERECOVERYTIME + rand(-RECOVERYTIMERANGE, RECOVERYTIME_RANGE), accounts for natural variation in recovery times.FATALITYRATE- Percentage of people that would die afterrecoverytimehas elapsed. Remaining will recover.
git clone https://github.com/gursi26/pandemic_simulation.gitcd pandemic_simulationcargo run
- [ ] Use grid rendering system for better performance with higher number of objects
- [ ] Other, more optimised collision detection methods
- [ ] Include phenomena like
๐ More in this category