Giter Site home page Giter Site logo

j0hn30n / world-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anvoz/world-js

0.0 0.0 0.0 2.02 MB

A brief history of humankind in Javascript simulation game

Home Page: http://anvoz.github.io/world-js/

License: MIT License

JavaScript 98.40% CSS 1.60%

world-js's Introduction

World JS: History Simulation Build Status

World JS is an attempt to show you a brief history of humankind via a simulation game.

This project was inspired from what I have learned from A Brief History of Humankind by Dr. Yuval Noah Harari.

Screenshot of version 2.4 on medium screen size

Developer Guidelines

Getting Started

Read this wiki page about how it works before you do anything else.

Modules

  • World JS: Create a world where people live and reproduce.
  • Core: Define a world and manage its main loop.
  • Tile: Divide a world into tiles. Each tile holds references to all seeds (objects) that currently stay in it.
  • Event: Register behaviors to take effect when an event occurs.
  • Seed (base class), Male and Female (extend Seed): Define an object that will be added to a world to live and interact with other objects.
  • World History: Create culture of a world.
  • Statistic: Track statistic data of a world.
  • Rules: Define rules that will affect a world and all of its living creatures.
  • Knowledge: Add IQ to humans so they can learn knowledge to survive.
  • Language: Define language of a world.
  • Knowledge.data: Define all knowledge data of a world.
  • Presentation
  • Guide: Queue up messages that will be displayed on the main screen.
  • Interface: Bind a world and its properties to UI. Define some basic UI interactions.
  • Story: Initialize a world and define the History Simulation story.

Sample code

Require World JS

// Create a new world
var world = new WorldJS();

// Add the world to a HTML wrapper
world.init('world-wrapper-id');

// Add 50 random people to the world
world.addSeeds(50, {
    types: [world.Male, world.Female]
});

// Start the world
world.start();

// Add another woman to the world
world.addSeed(world.Female, {age: 25});

License

Copyright An Vo @an_voz, 2013-2014.

Licensed under MIT.

world-js's People

Contributors

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