Code Monkey home page Code Monkey logo

jsfoom's Introduction

jsfoom

jsFoom is a pure JavaScript 2.5D sector/portal-based raycasting game engine.

Why?

This project is just a personal exploration of in-browser JavaScript performance and capabilities. I'm staying away from WebGL and other hardware accelerated features (apart from Canvas, the use of which is unavoidable) to see if it would be possible to re-create a Duke Nukem 3D/Doom type of experience with a completely in-browser full game engine.

jsFoom Level Editor

Features

  • Uses HTML5 Web Workers for multi-threaded rendering & game logic.
  • Sectors with non-orthogonal walls of variable height.
  • Texture mapped floors, ceilings, and walls.
  • Fully dynamic lighting with dynamic shadow maps.
  • Bilinear filtering & mipmapping for images and shadow maps.
  • Objects represented as sprites with multiple angles.
  • Separation of game/engine code.
  • Inventory items
  • Behavioral system for entities.
    • Scriptable NPC conversations
    • NPCs can give player inventory items.
  • Various effect sectors (doors, underwater sectors)
  • Physics and collision detection for player and objects.
  • Level editor:
    • Realtime 3D view.
    • Edit any sector/segment/entity property.
    • Slice sectors/split segments.
    • Undo/redo history.
    • Saves/loads in local storage.

Requirements

  • Modern web browser with fast JIT JavaScript implementation supporting HTML5 features (Canvas, Web Workers, performance.now).
  • Fast multi-core machine. Due to the inherent inefficiency of JS, the engine is very CPU and RAM intensive, requiring at least an i5 dual core machine and dedicated 1 GB of RAM.
  • Web server for hosting. Running locally produces "cross-origin" security errors for texture/sound/map resources.

Current/Future Work

  • Level editor features and bugfixes:
    • Fixing slice/cut errors.
    • Material management, editing.
    • Behavior scripting, editing.
  • In-game UI/settings
  • Better memory use/pre-loading of textures and lighting.
  • More robust framework for game logic, AI, and player objectives.
    • Player/entity inventory
    • Weapons
    • More scriptable entity behaviors (patrol, search, speak, attack, defend)
    • Entities with effects (keys+locked doors, moving platforms, entity drops)
    • Level win/lose conditions.
  • Sound
  • Mini-map showing visited areas a la 'Doom'.
  • Ruby/Rails/MongoDB server storing player data/progress.
  • Distant future: Multiplayer

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.