Skip to main content

The RoyaleSim logo: a red crown shield with a white gear on it, outlined in gold

RoyaleSim

CI License Python Docs Discord Last commit

Engine: Rust, whole numbers only Tick: 50 ms, 20 per second Coordinates: 18,000 units to one tile

The Clash Royale battle engine your bot plays in. It runs the whole match on your own machine. Most people use it through RoyaleGym and never call it directly.

An engine battle in the RoyaleViser viewer, 18 units on the board

Install

pip install "royalegym[all]"

That installs this engine and everything else. Use Python 3.12. Install has more.

Try it

import json, royalesim

b = royalesim.Battle(card_names=None, slot_of_k=[[0, 1, 2], [0, 1, 2]])
ids = {row[0]: i for i, row in enumerate(json.loads(b.catalogue_json()))}
deck = [ids[n] for n in ["Knight", "Archer", "Goblins", "Giant", "Musketeer", "Fireball", "Arrows", "Skeletons"]]
b.reset(seed=0, decks=[deck, deck], shuffle=1, start_tick=0, elixir_milli=[5000, 5000], tower_hp=None, spawns=[])
b.step([], 100)                                          # nobody can play in the opening seconds
r = b.step([(0, 0, 9000 * 18, 10000 * 18)], 20)         # blue plays its first card, then 20 ticks pass
print(json.loads(b.state_json())["tick"], royalesim.DEPLOY_REASONS[r[0][1]])   # 120 OK

Next

  • The engine's Python API: API
  • How it works inside, how fast and how accurate it is, building from source: Engine
  • Questions: Discord

MIT License.

Metadata

Release files for royalesim 0.1.58

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for royalesim 0.1.58
File Size Uploaded Provenance Actions
royalesim-0.1.58.tar.gz 4.7 MB With provenance Details for royalesim-0.1.58.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for royalesim 0.1.58
File Actions
royalesim-0.1.58-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for royalesim-0.1.58-cp310-abi3-win_amd64.whl
royalesim-0.1.58-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for royalesim-0.1.58-cp310-abi3-manylinux_2_28_x86_64.whl
royalesim-0.1.58-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for royalesim-0.1.58-cp310-abi3-manylinux_2_28_aarch64.whl
royalesim-0.1.58-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for royalesim-0.1.58-cp310-abi3-macosx_11_0_arm64.whl
royalesim-0.1.58-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for royalesim-0.1.58-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 33.2 MB

Release files / royalesim-0.1.58.tar.gz

Download URL royalesim-0.1.58.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
99f6eb05a959d49443ca416babbe1b437c11e9ed78e15a06aecc676df99871f1
BLAKE2b-256 checksum
How to use checksums
702f78e37d1263d933f681d88e1485a8aed15563b6e05410465c055cd101e74f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / royalesim-0.1.58-cp310-abi3-win_amd64.whl

Download URL royalesim-0.1.58-cp310-abi3-win_amd64.whl
Size 5.6 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7437f523958944cbc45b1ab36e46ab990420f069183018745abac63bbffc3f90
BLAKE2b-256 checksum
How to use checksums
8be2f6342ca0b177246acfceaaef45fa0239ad7f1776f27fd1c28b47e5efe5c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / royalesim-0.1.58-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL royalesim-0.1.58-cp310-abi3-manylinux_2_28_x86_64.whl
Size 5.9 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
ced3bb1e469637fe1cfc4713ffaf934b9b39456569e97a235efa0c6ad6cc19b7
BLAKE2b-256 checksum
How to use checksums
28b0b3a59414ac10fae19edbeed69d575bfe353f882fdb5c9465d21b3a2d5fc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / royalesim-0.1.58-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL royalesim-0.1.58-cp310-abi3-manylinux_2_28_aarch64.whl
Size 5.7 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
fcae65b236ab37528c4dd3788dcce8abaed7d5fe8adbdbb53cc4b6f1eb4d8d2a
BLAKE2b-256 checksum
How to use checksums
cd4413746735b094d07534109adcb8ac53769028103320718edb55be3418b491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / royalesim-0.1.58-cp310-abi3-macosx_11_0_arm64.whl

Download URL royalesim-0.1.58-cp310-abi3-macosx_11_0_arm64.whl
Size 5.6 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3a0f923833404e4db9a90f4829982bf2a0eac0841003e69a80affed2f814d281
BLAKE2b-256 checksum
How to use checksums
1e3f32c5eb84f4742557288c746eef0796afc82ae9182f9fa36cba2659aa46cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / royalesim-0.1.58-cp310-abi3-macosx_10_12_x86_64.whl

Download URL royalesim-0.1.58-cp310-abi3-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a113a3f7cbb715520b6b3243cf66767fe1ccb29a1522c0dbf83e624c2ad5e063
BLAKE2b-256 checksum
How to use checksums
1b544bdc998b9376c97bbe4b951b9383548c4cff40b61ed6cc5a86e3ac34942b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for royalesim 0.1.58

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for royalesim-0.1.58.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.58 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page