Quantum Survivor
Level
                        BEGINNER
                        Overview
This sample is provided with full source code and demonstrates how Quantum can be used to create a co-op survivor game with hundreds of enemies.
Screenshots
        
        
        Download
| Version | Release Date | Download | 
|---|---|---|
| 2.1.9 | 9月 30, 2024 | Quantum Survivor 2.1.9 | 
Before You Start
To run the sample in online multiplayer mode, first create a Quantum AppId in the PhotonEngine Dashboard and paste it into the AppId field in PhotonServerSettings asset.
Then load the Menu scene in the Scenes menu and press Play.
Technical Info
- Unity: 2020.3.37f1.
 - Platforms: PC (Windows / Mac), Mobile.
 
Highlights
Technical
- Scheduling routine for collectible entitites.
 - Usage of a multithreaded system for Characters Movement.
 - EntityView object pool.
 - Usage of physics queries injection Broadphase Queries.
 
Gameplay
- Basic wave system.
 - Synced character powerup selection.
 - Quantum Command to add more time for powerups selection
 - Basic Bot players.
 
Useful Patterns
Scheduling routine for collectible entitites
This is a good approach to prevent iterating over all the collectibles every frame, thus distributing the CPU load.
C#
int schedulePeriod = 10;
foreach (var (entity, c) in f.Unsafe.GetComponentBlockIterator<Collectible>())
{
  if (entity.Index % schedulePeriod == f.Number % schedulePeriod)
  {
    CheckCollectDistance(f, entity, c);
    if (c->TTL <= FP._0)
    {
      f.Destroy(entity);
    }
    c->TTL -= timeMultiplier * schedulePeriod;
  }
}
3rd Party Assets
The Sample includes several assets provided courtesy of their respective creators (CC-0). The full packages can be acquired for your own projects at their respective site:
- DungeonTilesetII by Robert