Coder Social home page Coder Social logo

psvmgd's Introduction

GitHub Build

psvmgd

psvmgd is a Godot 4 GDExtension addon that uses smogon's Pokémon Showdown Simulator provided by psvm.

Usage

Install the addon from the Godot Asset Library (todo submit and document here). Enable the plugin and reload your project, then interact with the simulator via the ShowdownService autoload scene. For example:

func on_sim_output(message: String):
    print(message)

# Create a new battle
var battle_id := ShowdownService.create_battle()

# Register an output callback function
ShowdownService.register_callback(battle_id, on_sim_output)

# Write input to the simulator
var sim_input = [ "..." ]
for line in sim_input:
    ShowdownService.write_message(battle_id, line)

Build

To build psvmgd, you will need the following:

  • CMake v3.22+
  • C++ Compiler with at least C++17 support (any recent compiler)
    • For Windows builds, use MinGW to cross-compile on a Linux host.
  • Node.js, (build-time dependency, not required at runtime)
git clone https://github.com/ethanl21/psvmgd.git
cd psvmgd
meson setup builddir --buildtype debug # or release
meson compile -C builddir

For Windows

git clone https://github.com/ethanl21/psvmgd.git
cd psvmgd
meson setup --cross-file cross/x86_64-w64-mingw32.txt builddir --buildtype debug # or release
meson compile -C builddir

Package Addon

  1. Compile the project with Meson (see above)
  2. Copy the psvmgd.gdextension file from the output of the previous step toaddons/psvmgd.
  3. Copy the shared library files to the corresponding directories in addons/psvmgd/bin

To use the demo project, copy the addon/psmvgd folder to demo/addons.

Attribution

psvmgd is distributed under the MIT license.

psvmgd uses the following open-source libraries:

psvmgd's People

Contributors

ethanl21 avatar

Watchers

 avatar

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.