Coder Social home page Coder Social logo

iso's Introduction

ISO Viewer

For experimenting with 2.5d isometric maps.

Dependencies

Depends on libcu, a C utility lib available at [email protected]:gmcnutt/cutils.git.

Build

make

Usage

Example:

./demo -i mc0.png,mc1.png,mc2.png,mc3.png

That stacks 4 maps on top of each other. Maps must be the same size for this to work.

Key bindings:

<arrow> ..........move cursor
., ...............rotate camera
t  ...............toggle transparency
<page up/down> ...jump between maps (when passable)

Clicking a tile prints some info on stdout.

Maps

Maps are just image files. The color of the pixel determines the terrain type:

    PIXEL_VALUE_TREE = 0x004001ff,
    PIXEL_VALUE_SHRUB = 0x008000ff,
    PIXEL_VALUE_GRASS = 0x00ff00ff,
    PIXEL_VALUE_FLOOR = 0x0000f0ff,
    PIXEL_VALUE_WALL = 0xffffffff

A transparent pixel means "nothing there". Unrecognized colors print an error on stdout but otherwise also mean "nothing there".

Some of the low bits of the blue color control opacity and passability:

    PIXEL_MASK_OPAQUE = 0x00000100, /* blue bit 0 */
    PIXEL_MASK_IMPASSABLE = 0x00000200      /* blue bit 1 */

Opaque terrain blocks field-of-view (FOV). Impassable terrain and no terrain blocks cursor movement.

iso's People

Contributors

gmcnutt avatar

Stargazers

 avatar

Watchers

James Cloos 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.