Code Monkey home page Code Monkey logo

cube-beast-editor's Introduction

Actions Status Actions Status Actions Status License: MIT Try online

Screenshot

Cube Beast Editor

Small voxel map editor with an Entity Component System (ECS) architecture.

Supports WASM build so it can be played on any web-browser like Chrome, Firefox or Safari. Just run the content of the www folder on a web server or open this page. A Post-Mortem about the project evolution is available here.

Screenshot

Table of Contents

Getting Started

Prerequisites

You need to install CMake to build the project, and a C++ compiler which handles C++17.

Linux

sudo apt-get install build-essential cmake libsdl2-dev libglu1-mesa-dev mesa-common-dev

Windows

To get the MSVC compiler, you need to install Visual Studio (and not VSCode), and select C++ development during installation.

Build on desktop

You can handle the CMakeLists.txt in any way you like, here's some way to use it :

Option 1: CLI

Go to the folder of this project and run :

mkdir build
cd build
cmake ..
make

Option 2: Visual Studio (Windows only)

Open this folder with the CMake... option in file->open on Visual Studio, and run the project.

Visual studio

Option 3: VSCode

Use the CMakeTools plugin, build with f7 then run with f5 (But be carefull to be on the right platform, there is a launch file for windows and for linux).

VS Code

Build for the Web as WASM

This project support Web Assembly, so it can run in a browser like Google Chrome or Firefox ! You need to install the Emscripten compiler to get started. If you are on windows, it is recommended to use linux subsystem for windows (WSL 2), and run the next steps with a linux command line.

Install Emscripten

These steps might change in the future. Go check Emscripten website in case of any problem. First, move to a folder outside of this project. Then run :

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh

Build as Wasm

Now that emscripten is configured, move back to the project folder and run :

mkdir wasm
cd wasm
emconfigure cmake ..
make

Run with a web-server

You can then copy the files inside wasm/bin into www and run this folder with a simple web-server. On this exemple, we are creating a simple one with python :

cd ..
cp -a wasm/bin/. www
cd www
python3 -m http.server -b 127.0.0.1

Then open your local server to see the project.

cube-beast-editor's People

Contributors

gaellou avatar guillaume-haerinck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jiangkevin

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.