Coder Social home page Coder Social logo

al7r0 / dome Goto Github PK

View Code? Open in Web Editor NEW

This project forked from domeengine/dome

1.0 0.0 0.0 30.72 MB

A lightweight game development environment where games can be written in Wren

Home Page: https://www.domeengine.com

License: MIT License

Makefile 0.44% C 90.57% C++ 0.56% Shell 0.39% Objective-C 4.77% NASL 0.12% JavaScript 3.14%

dome's Introduction

DOME - Design-Oriented Minimalist Engine

A comfortable framework for game development which melds SDL2 and the Wren scripting language, written in C.

Image of DOME logo

For more information on how to use DOME and get started, read the docs here.

How to Use

Download

You can download production-ready binaries from our Releases page. This is the recommended method for distribution and easy development.

Install via Brew

Alternatively, if you have Homebrew installed (Mac OS X, Linux and WSL), you can install DOME using the following commands:

> brew tap domeengine/tap
> brew install dome

Build

Finally, if you want to build DOME yourself, to make modifications or other reasons, follow these instruction instead.

Ensure you have the shared SDL2 libraries installed on your system first, then to build, run:

> make

This will create an executable named ./dome (on Mac OS X and Linux), and ./dome-x32.exe or ./dome-x64.exe.

Run

Run ./dome [gamefile.wren] to run your game. If your initial file is called main.wren, just running ./dome will execute it. Replace dome with your built binary name as necessary.

Basics

Your game's entry point must contain a Game class which contains at least static init(), static update() and static draw(_) methods.

import "input" for Keyboard
import "graphics" for Canvas, Color

class Game {

  static init() {
    __x = 10
    __y = 10
    __w = 5
    __h = 5
  }

  static update() {
    if (Keyboard.isKeyDown("left")) {
      __x = __x - 1
    }
    if (Keyboard.isKeyDown("right")) {
      __x = __x+ 1
    }
    if (Keyboard.isKeyDown("up")) {
      __y = __y - 1
    }
    if (Keyboard.isKeyDown("down")) {
      __y = __y + 1
    }
  }
  static draw(alpha) {
    Canvas.cls()
    var color = Color.rgb(171, 82, 54)
    Canvas.rectfill(__x, __y, __w, __h, color)
  }
}

Modules

DOME provides the following modules/methods/classes:

  • Graphics
    • Canvas
      • Rect
      • Point
      • Circle
      • Lines
    • Color
    • ImageData
      • Draw sprites loaded from files (png)
  • Input
    • Keyboard
    • Mouse
    • Gamepads
  • Filesystem
    • File reading and writing
  • Audio (stereo and mono OGG and WAV files only)

TODO

You can follow my progress on implementing DOME on my twitter.

  • Graphics
    • Triangles
  • IO
    • Asynchronous Operations
    • Audio and Graphics also
  • Network Access
    • UDP
    • HTTP client (maybe)
  • Security sandboxing (maybe)

Dependencies

DOME currently depends on a few libraries to achieve it's functions.

  • Wren (This is built by make automatically)
  • SDL2 (version 2.0.12 or newer, please install separately when building DOME from source)
  • utf8.h
  • stb_image
  • stb_image_write
  • stb_truetype
  • stb_vorbis
  • microtar
  • optparse
  • jo_gif
  • tinydir
  • ABC_fifo (A SPMC threadpool/task dispatching FIFO I wrote for this project)
  • mkdirp

Apart from SDL2, all other dependancies are baked in or linked statically. DOME aspires to be both minimalist and cross platform, so it depends on as few external components as possible.

Acknowledgements

Example Game Resources

  • Example game and graphics are derived from this fantastic PICO-8 tutorial.
  • Aerith's Piano Theme (res/AerisPiano.ogg) by Tanner Helland is available under a CC BY-SA 3.0 license: Link
  • Game Over Theme (res/music.wav) by Doppelganger is available under a CC BY-SA 3.0 license: Link
  • Font "Memory" is provided by Eeve Somepx, and is available on their patreon here under a common sense license.

dome's People

Contributors

avivbeeri avatar clsource avatar chayimfriedman2 avatar siddhantrao23 avatar scholar-mage avatar frarees avatar

Stargazers

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