Git Product home page Git Product logo

13's Introduction

‍☠️ 13 ‍☠️

Fast-paced multiplayer top-down shooting game for js13k 2022 competition

📖 How to play

Select room, share the link and wait friends to play:

  1. Play on 🚪 grtc | 🇪🇺 Europe
  2. Play on 🚪 ga13 | 🇺🇸 US

🎮 Controls

🖱️Mouse | ⌨️ Keyboard

  • Move Mouse to aim and look around
  • Push Mouse button to shoot
  • Use W A S D / ↑ ← ↓ → to move
  • Hold Shift to slow down moving
  • Press E to drop the weapon
  • Press Space to jump

📱 Touch-screen

  • Use Left Joystick to walk-run-jump
  • Use Right Joystick to aim-shoot (Move around aim-shoot zones to trigger some weapons like Pistol)
  • Use DROP button to drop the weapon

📜 Rules

At spawn each Player or NPC has 10 hit points.

  • Player kills neutral NPC to gain +1 score.
  • Player kills another Player to gain +10 scores.

Kill opponents 💀 | 👹 | 🤡 | 🤖 | 🎃 | 🦝 | 🐙 | 🐰 | 🦌 | 🐺 | 🐵 | 🦊 | 🐭 | 🦍 to gain scores

Kill NPC 🍅 | 😐 | 🐷 to get scores

Items

Destroy objects 🛢 | 📦 | 🪦 to get items

  • ❤️ Heart: pick to restore 1hp

Weapons

  • 🔪 Knife (melee)
  • 🪓 Axe (melee)
  • 🔫 Pistol (trigger)
  • 🖊 Machine-gun (auto)
  • ️✏️ Heavy machine-gun (auto)
  • 🪥 Shotgun (bouncing, scatter)
  • ⛏ Crossbow (high velocity)
  • 🔌 Plasma-gun (bouncing, auto)
  • 🧵 Rail-gun (piercing)

Minimal requirements

  • Good, low-latency network connection is required for each playing client
  • Fast mobile device or desktop to not lag other clients
  • NodeJS 16 or higher is required for server
  • WebAudio AudioContext support is required (available from Safari iOS 14.5, April 2021)
  • WebGL context and instanced arrays ANGLE extension are required
  • Modern JS syntax support
  • Checked in the latest Chrome, Safari, Firefox on iOS, Android and Mac.

📦 Resources

Code for Music generation in runtime created by author. Some instrument samples are picked from ZzFXM example song Depp

Emoji Font Twemoji Mozilla is used for cross-platform emoji rendering. Game is able to work without e.ttf file, but some icons are incorrect rotation angle, or different at all. But game should be playable anyway.

2D graphics rendering is started from js13k-2d and highly rewritten for what I need.

Sound Effects - ZZFX.

💾 Build compression

Shaders are minified in TypeScript source code by GLSLX - online minifier

  1. html-minifier minifies index.html
  2. esbuild creates bundle from TypeScript source-code
  3. Merge and rename properties which are non-overlapping in scope of Type.
  4. terser is used to minify and mangle javascript files
  5. Rehash properties for selected Web API classes (WebGLRenderingContext, CanvasRenderingContext2D, AudioContext, etc)
  6. Pack client with RoadRoller is used for final compression
  7. Zip with AdvanceCOMP

Build instructions

npm i
npm run build --zip
npm run start

Navigate to localhost:8080

Use npm run build --debug to generate debug.js and index4.html / debug4.html to enable testing 4-players on a page.

13's People

Contributors

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