Giter Club home page Giter Club logo

marshmallow_h's Introduction

Marshmallow Game Engine

β€œThe only game engine that tastes better slightly burned!”

About

marshmallow_h is an open-source game engine focused on 8-bit and 16-bit era 2D video games. This engine will act as the backbone and toolkit for the Marshmallow Entertainment System.

http://marshmallow.me/

Documentation

We currently have two documentation sources, they need some serious work, but what we have is better than nothing.

Doxygen (development)

If you have doxygen installed, you can build the source documentation by running the following commands in the project root:

doxygen
xdg-open docs/html/classes.html # atempt to open in browser

This will create a directory called 'docs' containing the HTML version of the documentation, it will then try to open the class list in the browser.

Wiki

Project wiki with a few pages!

https://github.com/gamaral/marshmallow_h/wiki

Source

git clone --recursive --depth 10 git://github.com/gamaral/marshmallow_h.git

Notice the --recursive switch, it's needed so that submodules get checked out along with the main repository.

Submodules

You may occasionally notice changes to the .gitsubmodules file, this usually means that it's time to update submodules, you can do so by running the following commands:

git submodule init
git submodule update

Building

I include many predefined cmake init-caches, please take a look at the "cmake" directory in the project base, filenames are pretty self-explanatory.

Linux/BSD

Run the following from project base:

cd build
cmake -C ../cmake/Cache-opengl-glx.cmake ..
make

Marshmallow's go-to compiler is Clang, the example above uses gcc since it's almost guaranteed to be on the system (unlike Clang).

Mac OSX

CGL is currently unsupported (due to my laziness, so SDL and QT4 can be used for now).

Note: Marshmallow is still under heavy development and this platform could break at any time, if you wish to help keeping it up to date feel free to contact me.

Xcode

Run the following from project base using Terminal:

cd build
cmake -G Xcode -C ../cmake/Cache-opengl-qt4.cmake ..

Now launch Xcode and open the project file in the build directory.

Makefiles

Run the following from project base using Terminal:

cd build
cmake -C ../cmake/Cache-opengl-qt4.cmake ..
make

Windows

Run the following from project base using the Command Line terminal:

cd build
cmake -C ..\cmake\Cache-opengl-wgl.cmake ..

Now open Visual Studio and open the MARSHMALLOW solution located in the build directory.

Tested on Win7 x86/x64 (VS2010)

Note: Marshmallow is still under heavy development and this platform could break at any time, if you wish to help keeping it up to date feel free to contact me.

Raspberry Pi

If you wish to test out marshmallow_h on the Raspberry Pi, you have a few ways of building.

Native

Run the following commands in your marshmallow_h base:

cd build
cmake -C ../cmake/Cache-raspberrypi.cmake ..
make

Cross-compile (rpi-toolchain)

To start, you will need to clone my RPi toolchain:

git clone --depth 1 git://github.com/gamaral/rpi-toolchain.git

At this point you have the base of the toolchain but no actual submodules, you will now need to quick-clone the submodules:

cd rpi-toolchain
scripts/quick-clone

The rpi-toolchain requires some special environment variables to be exported in order to work with marshmallow_h, this is handled by the nifty env file in the toolchain base:

source rpi-toolchain/env

Keep in mind you might need to source that same environment file again if you plan to reconfigure at a later time.

We are now ready to configure marshmallow_h, change into the marshmallow's base directory and run the following commands:

cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-raspberrypi.cmake -C ../cmake/Cache-raspberrypi.cmake ..

At this point you can configure manually using the following command (optional):

make edit_cache

Finally, we build and do the usual crossing of fingers:

make

BuildRoot

My custom Raspberry Pi buildroot distro can be found here:

https://github.com/gamaral/rpi-buildroot

After you have configured and compiled buildroot to your liking, you will need to copy over the environment file supplied (or export the required environment variables by hand).

cp resources/buildroot-env <buildroot-base>/env
source <buildroot-base>/env

Alternatively, you could use the pre-compiled sdcard image and toolchain I made available for test driving the distro. It comes complete with the env file and can be downloaded here:

https://github.com/gamaral/rpi-buildroot/downloads

Keep in mind you might need to source that same environment file again if you plan to reconfigure at a later time.

We are now ready to configure marshmallow_h, change into the marshmallow's base directory and run the following commands:

cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-buildroot.cmake -C ../cmake/Cache-raspberrypi.cmake ..

At this point you can configure manually using the following command (optional):

make edit_cache

Finally, we build and do the usual crossing of fingers:

make

Installation

Components:

demos: Demos and assets
deployment: Files required for game deployment
development: Headers and static libraries
runtime: Shared libraries

Demo Package

To create a demo package, you will need to run the following commands:

cd build
cmake -DCMAKE_INSTALL_PREFIX=marshmallow_demos -DCOMPONENT=runtime    -P cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=marshmallow_demos -DCOMPONENT=deployment -P cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=marshmallow_demos -DCOMPONENT=demos      -P cmake_install.cmake

To test out the package, you can run the following command:

marshmallow_demos/run platformer_demo0

marshmallow_h's People

Contributors

gamaral avatar kromain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

marshmallow_h's Issues

Box2d: Submodule clone fails; build fails if check out latest revision

The submodule, I'm sure you know how to fix.

The build fail is a little odder - it seems Box2D started using nullptr in some of their tests, which means that the build needs -std=c++11 added to its CXX flags to properly handle these managed null pointers.

Initially, I added -std=c++11 to the central CMakeLists.txt CMAKE_CXX_FLAGS - but this breaks marshmalow_h's bufferio.cpp. So I had to settle for putting it into contrib/box2d's CMakeLists.txt.

If I have time today, I'll see if I can figure out why bufferio shatters against C++11; it's probably something small, but being able to build against the modern standard is important.

Personal Dumbness

Hey gamaral
i really like this project!
But how am i supposed to edit the demo levels im only a Hobby Dev.
so please don't blame on me.
Greetz Kru

Rework audio subsystem

The audio subsystem was hacked in pretty quickly and has plenty of logic issues, it should be refactored ASAP.

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.