Git Product home page Git Product logo

cortex's Introduction

Cortex - The psychedelic tunnel-runner

Cortex

You are a thought. A thought to be born…

Guide your thought through the labyrinth of the brain, avoid hitting the walls and obstacles, nothing should distract you…

A minimalistic-ambient reflex game with a 60 frames per second flow experienceand the atmospheric music of Tamas Katai.

The code is also suitable for learning purposes.

Files

buffers.c - Vertex buffers for different layers of the scene
bus.c - Message bus for inter-module communication
defaults.c - Settings and defaults
excavator.c - Route excavator for scene
file.c - Config file handling
floatbuffer.c - Float collector for opengl vertex buffer
generator.c - Scene generator
levels.c - Level descriptions
main.c - SDL handling, top level event handling
maincube.c - Main cube state
menu.c - Main menu handling
ogl.c - OpenGL functions
particle.c - Particle entity for effects scene.c - Scene handler ui.c - UI handler voxelutil.c - Voxel generator for labels

Tech info

Cortex is a pure C project written in headerless C.
It uses reference-counted memory management ( zc_memory.c ).
It uses modular programming with mediator - implementation groups with different functionality that don't include each other directly, they send messages to each other.
If a module is "static" a global variable is used to store it's state, instancing is meaningless .

WebAssembly

find src -type f -name "*.c" > files.txt

emcc -Isrc/cortex -Isrc/zc_core -Isrc/zc_math -Isrc/cortex/gl -I/home/milgra/Downloads/emsdk/upstream/emscripten/system/includer/emscripten.h -DPATH_MAX=255 -DPKG_DATADIR="/" -DCORTEX_VERSION="1.0" -sUSE_SDL=2 -sUSE_SDL_MIXER=2 -sMAX_WEBGL_VERSION=1 $(cat files.txt) -o cortex.html

TODO

  • keyboard control in menu
  • rethink scene generation, it's hard to understand currently and flipping is visible on narrow screens

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.