Git Product home page Git Product logo

teamfight-simulator's Introduction

Sample simulated fight between Yordle and Hextech comps in Set 6.5

teamfight-simulator

Simulate fights from Teamfight Tactics (TFT). The goal is to assist in theorycrafting better team compositions, unit positioning, and item builds through statistical analysis, and perhaps create a "puzzle mode" to improve players' board strength intuition.

There is also an included roll down mode which sets your current composition, gold, and level, and enables you to buy/sell units on a timer to upgrade your composition.

https://tftsim.netlify.app

Current Set support

See the 6.5 milestone!

A feature marked as closed doesn't mean it's working exactly like should in the original game. Some values must be experimentally determined by manually timing or measuring values from the original game. Others may require too complex of an implementation, so they use a placeholder that makes a good-enough approximation. A best effort is made to document every instance of these shortcomings with TODOs in the code. Clone the project on your machine and "Find All" TODO entries to review these work items.

Unplanned features are listed in the Nice-To-Have's project.

Capabilities

Data gathering

Units setup

  • Place/move units onto 2 teams
  • Equip/move valid items, and adjust star levels
  • Select augment(s) for each team

Play a fight

  • Assassins jump to backline
  • Units pathfind into attack range of their target
  • Units auto-attack and generate mana
  • Supported units cast their abilities
  • Runs until one team is left standing

Future ideas

API

Create a headless version that runs on the server and exposes an API that lets you programmatically run fights and get back the results.

Past Sets

All past sets are available thanks to the historical patch data provided by CommunityDragon. It would be a fun exercise to implement past sets, but it's too big a project for now. If you're interested in contributing to any past set, get in touch!

Comp-designer AI

It would be fantastic to train a ML model to select a team composition, allocate a limited number of star upgrades and items, and position those units on the board, given its opponents' boards.

Unimplemented

Each Set adds new Champion abilities, traits, and augments to be implemented. See Current Set support to track this progress.

  • Engine refinements (i.e. 30 second overtime limit/pathfinding improvements/experimentally determining undocumented values) so that gameplay resembles the original closely enough to accurately reproduce fights.
  • Some features are too niche or can be accomplished by other means, and thus are not prioritized for implementation (PR's are welcome though!). See the Nice-To-Have's project for a current list.

Out of scope

End-to-end gameplay

In theory, this project could eventually be fleshed out into a full gameplay mode (carousel/economy/augment selection/alternating opponents/health tracking/etc). It could then be used to train an AI to play TFT (unlike standard TFT, it can run faster than realtime).

Visual effects

In a game like TFT, you can think of 3 layers running on top of the raw numbers that specify stats/abilities/etc used to play out a fight:

  1. Uses those numbers to run out a simulation of the game (a series of game ticks, what the "server" says happened over the course of the fight). As far as the server is concerned, this can happen as fast as its processor will go (within milliseconds).
  2. Interprets those numbers into a human-legible representation of each game tick to the player at a pace they can follow what's happening.
  3. Interpolates the changes between game ticks, adding animations and effects so that the fight plays out like a video game.

teamfight-simulator runs at layer 1, with the option of layer 2 to better allow the user to assess how the fight went, and does not attempt to recreate layer 3.

Contributing

Dev setup

tacticians-academy is built on a series of Node apps written in Typescript. The frontend is a Vue 3 app.

  1. Install Node: https://nodejs.org/en/learn/getting-started/how-to-install-nodejs

  2. To run in development, install dependencies and run the dev script to launch localhost in your default browser:

npm install
npm run dev

Note: tacticians-academy uses pnpm rather than npm for its lockfile.

What you can do

To get started, find an unimplemented issue from the current Set milestone (or alternatively from a past set). Champion abilities are a good place to start โ€“ you can refer to spell data in academy-library/champions. Then, using existing implementations in set6/champions as a template, give it a try!

teamfight-simulator's People

Contributors

indigosquirrelio avatar kathleen-xue avatar ky-is avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

teamfight-simulator's Issues

Add dev environment setup instructions

Hi!

Could you add recommended compilation instructions to the readme for those that don't come from a frontend background?

This looks like a great start, and would love to help out. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.