Giter VIP home page Giter VIP logo

game-of-life-cpu's Introduction

Game of life : CPU

Game of Life in Cs, displayed using C++ and OpenGL.

Detalle de implementación y experimentos en ../informe.md.

runtime image

Dependencias

  • GL/glew.h
  • SDL.h

Compilación

$ make

Limpiar con;

$ make clean

Instalar dependencias (Linux)

Si tira errores al compilar: Instalar librerías

// GLEW, SDL2 (+SDL2_Image)

sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev  # Debian, Ubuntu
sudo dnf install glew-devel SDL2-devel SDL2_image-devel # fedora
sudo pacman -S glew sdl2 sdl2_image # arch

Asegurar tener compilador:

sudo apt-get install build-essential libgl1-mesa-dev  # Debian, Ubuntu
sudo dnf install make gcc-c++  # Fedora

Ejecución

$ ./cpu

Al precionar CTRL+C la aplicación terinará y mostrará estadísticas de cantidad de celulas evaluadas por segundo, y más.

Customización

Se pueden modificar constantes en "src/globals.h".

#define WIDTH 800
#define HEIGHT 800
#define ROWS 128
#define COLUMNS 128
#define FRAMERATE 150
#define INITIAL_LIVES_FRACTION 0.9
#define THREADS_PER_BLOCK 8

Resolución de vidas

Se pueden variar la cantidad de columnas (COLUMNS) y filas (ROWS).

Cantidad inicial de vidas

Se puede variar el porcentaje de casillas inicial con vidas (INITIAL_LIVES_FRACTION).

Frame rate

Se puede variar la cantidad de fotogramas por segundo máxima (FRAMERATE).

game-of-life-cpu's People

Contributors

vichoko avatar

Watchers

 avatar  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.