Giter Club home page Giter Club logo

masuda's Introduction

masuda

Junichi Masuda is a Japanese video game composer, director, designer, producer, singer, programmer and trombonist, best known for his work in the Pokémon franchise. He is a member of the Game Freak board of directors, and has been employed at the company since 1989 when he founded it alongside Satoshi Tajiri and Ken Sugimori.

Overview

In the pokemon games, many of the interactions in the game are decided by the output of a pseudo-random number generator, or pRNG. For example, when the player encounters a pokemon, its stats are determined by the state of the pRNG.

In the generation 3 games (R/S/E/Fr/Lg), the game displays roughly 60 frames/second, and the state of the pRNG is said to be "advanced" every frame. This means if the player knows

  • the initial seed passed to the pRNG
  • the mechanics behind how the pRNG is advanced
  • how the numbers outputted by the pRNG are converted into pokemon stats

Then the user can find a frame which will produce a desireable pokemon, wait for the amount of time before the desired frame occurs, then encounter the desired pokemon.

masuda is a library written in rust which implements the behavior of the random number generator used in the pokemon games. Specifically, it provides an implementation of a linear congruential generator which produces a sequence of pseudo random numbers.

Usage

Try running the examples to see it in action

cargo run --example ten_frames generates 10 frames and the pokemon generated on those frames

cargo run --example is_shiny finds the shiny frames in the first 100000 frames for the given tid/sid and displays them

most usages of this lib will probably look something like this:

// create an searcher instance with game, method, and max frames
let mut searcher = Searcher::new(Game::Emerald, Method::One, 1000000);
// create a profile with a tid and an sid
let profile = Profile::new(10101, 12345);
// create a filter for the attributes you care about
// in this example, let's look for a 31/31/x/x/x/31 Jolly spread
let filter = Filter::new(&profile)
        .with_stat(StatFilter::HP(StatComparison::EqualTo(31)))
        .with_stat(StatFilter::Attack(StatComparison::EqualTo(31)))
        .with_stat(StatFilter::Speed(StatComparison::EqualTo(31)))
        .with_nature(Nature::Jolly); 

for result in searcher.search(Some(Filter)) {
    println("{:?}", result);
}

masuda's People

Contributors

trstruth avatar

Stargazers

 avatar

Watchers

 avatar  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.