Giter Site home page Giter Site logo

far_into_space's Introduction

This game is not directly buildable without extending Raylib 5.0 and the Odin binding a little bit. I did this to push particle buffers and allow for raymarching shaders (as point buffers) to render the asteroids to the GPU. Raylib does not support this feature directly.

In the Odin vendor library, I extended vendor/raylib/rlgl.odin to include

rlDrawArrays          :: proc(mode: c.int, offset: c.int, count: c.int) ---
rlBindVertexArray     :: proc(array: c.uint) ---

then in raylib/src/rlgl.h

// passthru for glDrawArrays
void rlDrawArrays(int mode, int offset, int count)
{
    glDrawArrays(mode, offset, count);
}
 
void rlBindVertexArray(unsigned int array)
{
    glBindVertexArray(array);
}

You need to build Raylib then and copy the update libraries into your platforms directory, i.e. in my case Odin/vendor/raylib/linux.

You also need to build box2c (as documented below), for both native and WASM (if you build WASM).

This served as a template for building WASM binaries that would run in a browser.

Graphics from Kenny

- 2D assets/Space Shooter Redux/
- 2D assets/Space Shooter Extension/

Sounds from

Space shooter sound fx pack 1 by Dravenx

Some of the sounds, I created.

Music

I made for this game.

Browser target specifics

  • Renderer: WebKit WebGL
  • Version: OpenGL ES 2.0 (WebGL 1.0 (OpenGL ES 2.0 Chromium))
  • GLSL: OpenGL ES GLSL ES 1.00 (WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium))

Physics Engines

Box2c build

CXX=clang++ CC=clang cmake -B ./build-linux -DCMAKE_BUILD_TYPE=Debug -DBOX2D_SAMPLES=OFF
cmake -B ./build-linux -DCMAKE_BUILD_TYPE=Debug -DBOX2D_SAMPLES=OFF -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang 
. ~/emsdk/emsdk_env.sh
emcmake cmake -B ./build-wasm32 -DCMAKE_BUILD_TYPE=Debug -DBOX2D_SAMPLES=OFF -DBOX2D_AVX2:BOOL=OFF
cd build-wasm32
emmake make

Raylib build

. ~/emsdk/emsdk_env.sh
emcmake cmake -B ./build-wasm32 -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3" -DCMAKE_EXECUTABLE_SUFFIX=".html"
cd build-wasm32
emmake make

far_into_space's People

Contributors

gjones007 avatar

Watchers

 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.