All Projects → samirak93 → Game-Animation

samirak93 / Game-Animation

Licence: other
A python tool to visualise game animations

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Game-Animation

transfermarkt-datasets
⚽️ Extract, prepare and publish Transfermarkt datasets.
Stars: ✭ 60 (-18.92%)
Mutual labels:  soccer
COVID breakdown
COVID-19 statistics in Taiwan
Stars: ✭ 15 (-79.73%)
Mutual labels:  visualisation
SortVis
https://airtucha.github.io/SortVis
Stars: ✭ 23 (-68.92%)
Mutual labels:  visualisation
kickoff
Open Kick-Off is a fun rewriting attempt of the cult football game Kick Off 2 designed by Dino Dini and released in 1990 by Anco for the Atari ST and the Commodore Amiga. It is written in Java with the help of libGDX.
Stars: ✭ 32 (-56.76%)
Mutual labels:  soccer
python-tsp-simulated-annealing
Visualisation of Simulated Annealing algorithm to solve TSP
Stars: ✭ 41 (-44.59%)
Mutual labels:  visualisation
pycobra
python library implementing ensemble methods for regression, classification and visualisation tools including Voronoi tesselations.
Stars: ✭ 111 (+50%)
Mutual labels:  visualisation
FineCodeCoverage
Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
Stars: ✭ 391 (+428.38%)
Mutual labels:  visualisation
English-Premier-League-Prediction
Apply machine learning to predict English Premier League soccer match.
Stars: ✭ 38 (-48.65%)
Mutual labels:  soccer
football-peek
[JavaScript - NodeJS] Application to access football scores
Stars: ✭ 14 (-81.08%)
Mutual labels:  soccer
agrid
A grid for modelling, analyse, map and visualise multidimensional and multivariate data
Stars: ✭ 16 (-78.38%)
Mutual labels:  visualisation
Euro2016 TerminalApp
⚽ Instantly find 🏆EURO 2016 live-streams & highlights, now a Web App!
Stars: ✭ 54 (-27.03%)
Mutual labels:  soccer
leaflet-velocity
Visualise velocity data on a leaflet layer
Stars: ✭ 467 (+531.08%)
Mutual labels:  visualisation
football-graphs
Graphs and passing networks in football.
Stars: ✭ 81 (+9.46%)
Mutual labels:  soccer
ARGoal
Get more goals. | Virtual Goals & Goal Distance | App Doctor Hu
Stars: ✭ 14 (-81.08%)
Mutual labels:  soccer
sports.py
A simple Python package to gather live sports scores
Stars: ✭ 51 (-31.08%)
Mutual labels:  soccer
scalajs-highcharts
Scala.js static typed facades for Highcharts library
Stars: ✭ 30 (-59.46%)
Mutual labels:  visualisation
MLDemos
Machine Learning Demonstrations: A graphical interface to draw data, apply a diverse array of machine learning tools to it, and directly see the results in a visual and understandable manner.
Stars: ✭ 46 (-37.84%)
Mutual labels:  visualisation
Simulizer
A MIPS (R3000) Processor Emulator and Visualisation tool
Stars: ✭ 28 (-62.16%)
Mutual labels:  visualisation
breadcrumbs
Visualise a custom hierarchy in your Obsidian vault. API: https://skepticmystic.github.io/breadcrumbs/
Stars: ✭ 299 (+304.05%)
Mutual labels:  visualisation
qvisualisation
Visualisation toolbox based on Qt WebEngine and D3.js
Stars: ✭ 25 (-66.22%)
Mutual labels:  visualisation

Game Animation

An easy way to visualize player tracking data with animation. Built using Bokeh Plots, this tool can be used to visualise player movements for all sport. It also includes visualising voronoi and convex hulls, player speed and total distance covered by each player, interactively.

New Features:

Visualize players being marked by opposition players and find the distance between them. Statistics such as total time player was marked, average distance between the players can also be calculated and visualised.

Soccer Animation


Player Marking

Player Marking Example


The code was tested on Python 3.7.1, but should work for other versions as well.

The following packages are needed in order to run the code (Bokeh plot version has to be 1.2.0 but for other packages with older versions, the tool should work) :

Package Version
Numpy 1.16.4
Pandas 0.24.2
Bokeh 1.2.0
Scipy 1.3.0
Notebook 5.7.8

The animation plot can be viewed directly on a Jupyter Notebook.

Usage


Please see Functions Helper for additional information regarding usage of different functions.

Please see Notes for additional information regarding potential errors and usability of the tool.


Sample basketball animation


#import make_plot from game_animation

from Animation.game_animation import make_plot
from bokeh.io import show, output_notebook
import pandas as pd
from functools import partial

#output_notebook shows the graph within the notebook
output_notebook()

df = pd.read_csv("sample_data/sample_basketball.csv")
image_url=["static/images/basketball.png"]

id_def=65
id_att=37
x_range=(0,94)
y_range=(0,50)

make_anim_plot = partial(make_plot, df=df, id_def = id_def, id_att = id_att,
                           headers = ["x", "y", "team_id", "player_id","time"], 
                           image_url=image_url, slider_steps=1,sport='basketball', 
                           x_range=x_range,y_range=y_range, anim_speed=50)

show(make_anim_plot)

Sample soccer animation:


from Animation.game_animation import make_plot
from bokeh.io import show, output_notebook
import pandas as pd
from functools import partial

output_notebook()

df = pd.read_csv('sample_data/soccer_sample.csv')
image_url = 'static/images/soccer.png'

x_range=(-52.5,52.5)
y_range=(-34, 34)

id_def = 2
id_att = 1

make_anim_plot = partial(make_plot, df=df,image_url=image_url, id_def=id_def, id_att = id_att,
                           x_range=x_range, y_range=y_range, slider_steps=1,
                           headers = ["x", "y", "team_id", "player_id","time"], 
                           anim_speed=60)

show(make_anim_plot)

Sample player marking animation:


from Animation.player_marking import player_marking
from bokeh.io import show, output_notebook
import pandas as pd
from functools import partial

output_notebook()

df = pd.read_csv('sample_data/soccer_sample.csv')
image_url = 'static/images/soccer.png'

x_range=(-52.5,52.5)
y_range=(-34, 34)

id_def = 2
id_att = 1

make_anim_plot = partial(player_marking, df=df,image_url=image_url, id_def=id_def, id_att = id_att,
                           x_range=x_range, y_range=y_range, slider_steps=1,
                           headers = ["x", "y", "team_id", "player_id","time"], 
                           anim_speed=60, attack=True,sport='football')

show(make_anim_plot)

Sample player marking stats:


from Animation.marking_details import marking_stats
import pandas as pd

df = pd.read_csv('sample_data/soccer_sample.csv')

id_def = 2
id_att = 1

marking = marking_stats(df=df, id_def=id_def, id_att = id_att,
                           time_steps=1,
                           headers = ["x", "y", "team_id", "player_id","time"], 
                           attack=True,threshold = 10)

Sample Outputs:


Game Animation


Basketball_example

Soccer_example

NFL_example

Soccer_example

Player Marking Animation


Player Marking Example

Player Marking Stats


Player Time Marked

Player Distance Marked


All feedbacks are appreciated.

Reach out to me on Twitter and you can also find my LinkedIn page here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].