GithubHelp home page GithubHelp logo

pristap / elmo-8 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from micktwomey/elmo-8

0.0 2.0 0.0 252 KB

PICO-8 inspired fantasy 8-bit game library for Elm.

License: MIT License

Makefile 2.50% Elm 97.50%

elmo-8's Introduction

ELMO-8

A Simple Game Library Inspired by the Excellent PICO-8

The goal of the library is to offer a small, simple game development environment which aspires to be as charming as PICO-8.

There are deliberate limitations to keep things simpler and to encourage the 8-bit aesthetic.

Aspirational specs:

  • Display: 128x128 16 colours
  • Sprites: 128 8x8 sprites
  • Map: 128x32 cels
  • Controls: 2 6-button joysticks

Goals

  • Be a nice little playground
  • Be a simple teaching tool
  • Be a nice way to write small games

Using

Install from http://package.elm-lang.org/packages/micktwomey/elmo-8/latest

  1. elm package install micktwomey/elmo-8
  2. Edit Hello.elm
  3. Download examples/birdwatching.png
  4. elm reactor
  5. Go to http://localhost:8000/Hello.elm

Hello.elm:

import Elmo8.Console as Console
import Elmo8.Pico8 as Pico8

type alias Model = {}

draw : Model ->  List Console.Command
draw model =
    [ Console.putPixel 10 10 Pico8.peach
    , Console.print "Hello World" 10 50 Pico8.orange
    , Console.sprite 0 60 90
    ]

update : Model -> Model
update model = model

main : Program Never
main =
    Console.boot
        { draw = draw
        , init = {}
        , update = update
        , spritesUri = "birdwatching.png"
        }

The result should look like this:

Basic Example

Examples

To play with the examples in this repo:

  1. git clone
  2. elm package install (not required but useful to check dependencies)
  3. elm reactor
  4. Look in http://localhost:8000/examples/

Posts

elmo-8's People

Contributors

micktwomey avatar

Watchers

James Cloos avatar Aleksandar Kex Trpeski 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.