Code

Here lie all of the docstrings in the PokemonCartographer.jl codebase.

PokemonCartographer.exploreMethod

Create a Navmesh by playing the game.

Starting with a list of roms and save states, spawn a worker for each pair and merge the resulting navmeshes.

PokemonCartographer.Nav.Navmesh!Method
Navmesh!(a0::Navmesh, a::Navmesh)::Nothing

Merge a into a0 in place. See Navmesh(a::Navmesh, b::Navmesh)::Navmesh for more details.

PokemonCartographer.Nav.Navmesh!Method
Navmesh!(n::Navmesh, from::Position, to::Position, d::Direction)::Nothing

Add an edge in n between from and to labeled as direction d.

from and to do not need to exist.

This will overwrite any previous edge between these two nodes.

PokemonCartographer.Nav.Navmesh!Method
Navmesh!(n::Navmesh, j::Journey)::Nothing

Add all locations found on Journey j.

Filters out artifacts from animation delays.

PokemonCartographer.Nav.connectedMethod
connected(n::Navmesh, from::Position, to::Position)::Bool

Predicate to check if two nodes are connected.

Examples

n = Navmesh()
p1 = Position(0x01, 0x01, 0x01)
p2 = Position(0x01, 0x01, 0x02)
p3 = Position(0x01, 0x02, 0x02)
Navmesh!(n, p1, p2, Down)
Navmesh!(n, p2, p3, Right)

connected(n, p1, p3)

# output

true
PokemonCartographer.Nav.randomincompleteMethod
randomincomplete(n::Navmesh, nogolist::Vector{Position})::Union{Position, Nothing}

Select a random, incomplete vertex in the navmesh. Incomplete vertices have less than four outedges - e.g. Up, Down, Left, Right.

PokemonCartographer.Nav.routeMethod
route(n::Navmesh, from::Position, to::Position)::Vector{Direction}

Find a route between from and to in the provided Navmesh, n.

If no route exists an empty Vector will be returned instead.

Examples

n = Navmesh()

p1 = Position(0x01, 0x01, 0x01)
p2 = Position(0x01, 0x01, 0x02)
p3 = Position(0x01, 0x02, 0x02)
Navmesh!(n, p1, p2, Down)
Navmesh!(n, p2, p3, Right)

route(n, p1, p3)

# output

2-element Vector{Direction}:
 Down::Direction = 2
 Right::Direction = 1
PokemonCartographer.Worker.new_game!Method
new_game!(js::JobState, gb::Emulator, game::GameState, i::Int)::State

Select the new game menu option (well "DEBUG" in the BLUEMONS.gb rom).

PokemonCartographer.Worker.random_wander!Method
random_wander!(js::JobState, gb::Emulator, game::GameState, i::Int)::State

Wander around, biased towards the same direction you are facing. Never backwards.