Giter Club home page Giter Club logo

mbhaxe's Introduction

MBHaxe

A Haxe port of Marble Blast Gold, name subject to change. The marble physics code was taken from OpenMBU along with my own collision detection code, game logic was partially from scratch and taken with permission from Marble Blast Web Port. The browser version of this port is hosted here

Why Haxe?

I chose Haxe because its a good language that can target other languages, meaning any Haxe code can be converted and used in Python, C++, Java very easily so that nobody has to take effort in porting the code to different languages, atleast thats what my mindset was when I started it, but unfortunately because of the 3d engine I used, it only compiles to C and Javascript. You will have to isolate the engine specific features yourself if you want to use this for other programming languages.

Build

Requires Haxe 4.2.2 or above You require the following Haxe libraries:

  • heaps: 1.9.1 (not the git version) with HeapsIO/heaps#573 applied
  • hlsdl (You will have to update it manually by replacing the files after doing the below steps) (Hashlink/C native target)
  • stb_ogg_sound (JS/Browser target)

Hashlink/Native

You have to compile your own version of Hashlink with HaxeFoundation/hashlink#444 applied
After all that has been setup, compile to hashlink by doing haxe compile.hxml and then running the game by hl marblegame.hl To compile to C, do haxe compile-c.hxml and use the instructions in https://gist.github.com/Yanrishatum/d69ed72e368e35b18cbfca726d81279a

Javascript/Browser

If the build dependencies are fullfilled, compile with haxe compile-js.hxml and run the game by running a web server in the same directory as the repo where index.html is located.

FAQ

Help I am able to reproduce a crash!

If you are on browser, please send the browser console log to me If you are on native, please run marbleblast-debug.bat and reproduce the crash, send the resulting stacktrace that occurs during the crash to me.

Help it shows a black screen when playing a level!

Your PC does not support the game, please upgrade it, there is nothing I can do about it to fix it.

How accurate are the marble physics?

Very accurate with up to 1% deviation from the original physics. The deviations are due to traplaunches being slightly different and occassional internal edge collisions, and the lower delta t values for physics simulations.

How do I change my resolution?

In browser, you can just resize your window. You can use the browser zoom feature (ctrl + scroll) to change the UI size.
In native version, you can just resize the window if windowed or use the resolution options in the menu or just directly modify settings.json

How do I change my FOV?

Edit settings.json for native version, edit the MBHaxeSettings key in LocalStorage in browser

How do I unlock/lock FPS?

You cannot unlock fps in the browser, it is forever set to vsync. In the native version, edit settings.json

Hey can you please add this new feature?

If this new feature of yours already exists in MBG but not in this port, then I will try to add it, if I get time to do so, otherwise chances are, I won't add it since I have other things to do and would rather not waste my time on this any further. You are free to do pull requests if you have already implemented said feature.

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.