Engines NIFE Roadmap Shatterloop Game Projects
Deprecated Saepes Mundi Other Projects Blog

Game Projects

Starmap Checklist

Posted January 26, 2023 by Xhin

This project builds out the locations engine for the Automaton game.

There are 2 Replies


Basic Stuff

  • Create a starmap subdomain

  • Pull over relevant JS libraries, including colors{}, dirs{} and polar{}. It should be a hybrid of the CD project and the fishing game's libraries, so should also include time{}, which should really be a package if feasible to reduce confusion.

  • Create an index file that loads all libraries basically identically to the fishing game.

  • Create starmap{} to aggregate everything together -- objects should be prefixed with it as well for different types of maps.

  • January 26, 2023
    Xhin
    Sky's the limit

    Supervoid engine

    Sphere mapping

    NOTE: DON'T chunk and don't use angles, there's no point if the map is flat.

    This isn't going to be an actual sphere, it'll be more an approximation of one where the x axis and y axis loop. Unless that looks horrible or doesn't work right.

  • Create sphere{} with .data[x].

  • Add sphere.create(obj). In here the current variable should be a tpv (tiles per view).

  • Chunk up 360 degrees in either direction by 2*tpv to get settable tiles in data{}.

  • Create .set() and .erase() functions to set stuff in the tile. I guess for now allow syms, bgs and xcolors.

  • Create .set_coord(coord) -- this sets the viewpoint coordinate, which is an x and y, though modified based on chunking and the angle settings. Round to the nearest chunk.

  • Create .render(). Given an internal coord and sphere size, form a circle around it and render tiles accordingly, with a modulo of 360 on both angles.

    Rotation

  • Create .pitch(amt) and .yaw(amt)

  • pitch adjusts the y coordinate while yaw adjusts the x coordinate. These can be negative. Roll doesn't make sense since this isn't an actual sphere and the math is probably pretty complex, and then also the orientation would end up being wrong and other nonsense.

  • With both of these, render after that step.

  • Add buttons to pitch and yaw, both and then have an input in the middle to set the amount (angle).

  • The angle here should be rounded to the appropriate chunk size.

    Assuming everything looks reasonably good I can stop here. Otherwise I'm probably going to have to render an actual sphere and look up the math on that.

  • January 26, 2023
    Xhin
    Sky's the limit

    Reply to: Starmap Checklist

    Username
    Password