Coder Social home page Coder Social logo

game-of-voxels-js's Introduction

Welcome to the Game-of-Voxels-JS wiki!

MVP Features

Interactive voxel plane

  • 3d dimensional grid rendered via WebGL
  • voxels are raised/change color depending on their living state
  • the user can toggle the state of dead voxels via mouse clicks

Fully working recreation of Conway's Game of Life

game of life ex

  • Conway's Game of Life is a cellular automata created by a 2-D grid and a set of principles:
    • cells have two states: dead or alive
    1. Any living cell with fewer than two live neighbors dies
    2. Any live cell with more than three live neighbors dies
    3. Any live cell with two or three live neighbors lives on to the next 'generation'
    4. Any dead cell with exactly three live neighbors becomes a living cell.

Isometric view of the game field (user can also rotate camera)

Isometric Projection

  • The x, y and z cube axes will be oriented 120° to each other
  • Simulates a combination of a top-down perspective and a fully-3D perspective

Technologies

p5.js is how I'll be rendering voxels within the window. Specifically altering the box() API to match the state of Conway's Game. I chose this framework over https://threejs.org/ because of it's low learning curve. It also seemed more robust than any other voxel Javascript frameworks available.

Quadtree Ex

The data structure I've chosen to implement the game's grid with is known as a quadtree. Here are the other options I considered:

  • 2-D Array: A fallback, but lookup-time and iteration is a bit slow, especially if I'll be rendering this in 3-D

  • Hashlife: supposedly reduces lookup time drastically by combining a hashmap with a quadtree. Extremely interesting, but may be outside the scope of this project's allotted time.

Wireframes

voxels

wireframe

Work accomplished over the weekend:

  • Researched Conway's Game of Life and its algorithm
  • Researched the appropriate data structure with which to implement the Game (Quadtree)
  • Researched the appropriate voxel rendering engine (p5.js)
  • Familiarized myself with the p5 framework

Timeline

Day 1:

  • Implement Game Logic

Day 2:

  • Implement Voxel Plane rendering/integrate game logic

Day 3:

  • Complete integration of game logic/implement user interactions

Day 4:

  • UI and CSS

Day 5:

  • Fix Bugs and polish presentation

game-of-voxels-js's People

Contributors

mvaleriani avatar

Stargazers

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