Skip to content

TavariAgent/TokenTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TokenTorch README

Welcome to TokenTorch, a voxel engine built from scratch in Python using PyTorch, ModernGL, and Ollama. This
project is a personal endeavor to create a Minecraft-like game with a focus on procedural world generation,
multiplayer networking, and AI-controlled entities.

(NOTE: Ollama and PHI3 are required to launch villagers and monsters. Install locally and make sure the ollama
background service is running before launching the game. You do not need to launch Ollama or PHI3 directly, the
game will handle that for you. The game is meant to be played from a server so be aware that hosting and playing on
the same machine may cause performance issues. I recommend hosting on a separate machine)

(WARNING: Multiplayer requires IP adresses to connect. If you want to play online you will need to share your IP
address and ensure you are abel to be connected to. Do NOT enable monsters and villagers when joining from the
multiplayer menu, those options slipped into the push and aren't needed. VPNs may work but I have not tested them.)

Features

  • Procedural World Generation: 32x32+ KM world with 70 KM depth and height voxel terrain with caves,
    mountains, lakes, and biomes. (Note: 16x16KM worlds are buggy.)

  • Multiplayer Networking: UDP-based client-server architecture with chunk state synchronization.

  • Monsters and Villagers: AI-controlled entities with pathfinding and behavior systems.

  • GPU-Accelerated Water Simulation: Cellular automata fluid simulation running entirely on the GPU for performance.

  • Custom Concurrency Model: Token-based task orchestration framework for managing background workloads and
    server operations.

Performance

  • The engine runs at ~100-200 FPS on a 4070 with 850+ chunks on screen and 2500+ loaded.

  • The profiler reports minimal latency in rendering and 1% lows are optimal.

I cannot garantee performance on low-end hardware and large view distances. The current implmentation uses a
large view range, to change it look at these settings:

The lowest level hardware I've tested this on is a GTX 1060 and Ryzen 3600 with 70 FPS avg.

render_dist_h, render_dist_v = 5, 5
# render_dist_h = Horizontal
# render_dist_v = Vertical

Future Plans

  • Multiple Factions: Implementing different factions with unique behaviors, alliances, and conflicts to create a
    dynamic world.

  • Advanced AI: Developing more sophisticated AI for monsters and villagers, including complex pathfinding,
    decision-making, and interactions.

  • Player Interaction: Adding more ways for the player to interact with the world, such as crafting, building, and
    trading with villagers.

  • ~13+ Underground Biomes: Unique underground biomes, each with distinct terrain features, resources, and challenges.

  • 27 Levels of Gear: A tiered gear system with 27 levels of standard equipment, each providing different stats and
    abilities for players to acquire and upgrade.

  • Techno-Magi-Alchemy System: A unique system that combines technology, magic, and alchemy for crafting,
    enchanting, and creating powerful items and effects.

  • Online Services: Developing services to host multiplayer servers, manage player accounts, and provide
    matchmaking for players to connect and play together.

  • Improved User Interface: Enhancing the user interface for better usability and player experience.

IMPORTANT: This project experimental!

There are a number of people using this but please be aware that this is an experimental sandbox project and not a
polished open-source library yet. The code is in active development and subject to significant changes, and there
are likely to be rough edges, bugs, and refactors as I iterate on the design.

Contributing code is welcome but please be aware that the codebase is actively changing frequently. Make sure to
read commits if you want to modify this for yourself or submit a PR if you have something to contribute.

Gallery:

Darkness

World Generation

The PHI3 Arachnoids are plotting their attacks!

PHI

MADNESS:

WHY?

Only a true mad man would run numerous GPU kernels from a
random repo...
Maximum respect.

About

This is TokenTorch a highly experimental game engine in early development using Nvidia Warp simulations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors