Giter Site home page Giter Site logo

13's Introduction

Build Twitter Play Now

☠️ 13 ☠️

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

🚪PLAY NOW

  • 🎖️ 7-th place winner!
  • 🥇 1-st place in Server category
  • 🥉 3-rd place in Mobile category
  • Check out 13 game post-mortem
  • Check out initial 13kb submission source-code in js13k branch

📖 How to play

Start game, share the link and wait friends to play:

🎮 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 to PICK weapon on the map or DROP your current weapon
  • Press Space to jump
  • Press R to reload weapon
  • Press Q to switch secondary weapon slot

📱 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 pick weapon on the map or drop your current weapon
  • Use RELOAD button to reload the weapon
  • Use SWAP button to swap the secondary weapon slot

📜 Rules

At spawn each Player or NPC has 10hp (hit points). You are able to get extra 10sp (shield points) on top of that.

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

Kill opponents 💀 | 👹 | 🤡 | 🤖 | 🎃 | 🦝 | 🐙 | 🐰 | 🦌 | 🐺 | 🐵 | 🦊 | 🐭 | 🦍 | 🐸 to score FRAG and get 5cr

Kill NPC 🍅 | 😐 | 🐷 | 🎅🏻 to score FRAG and get 1cr

Items

Destroy objects 🛢 | 📦 | 🪦 to get items

  • ❤️ Heart: pick to restore 1hp
  • 💊️ Pill: pick to restore 2hp
  • 🪙️ Coin: pick for 1cr (credits)
  • 💎️ Diamond: pick for 5cr (credits)
  • 🛡️ Shield: pick to add 1sp (shield-point)
  • 🧱️ Ammo Magazine: pick to add 1am (ammo-magazine)

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)
  • 🧣 Uzi (tracer bullets, rapid fire)

Dev-menu

Tap 4 times on the main game logo to unlock dev-mode and dev-settings.

Minimal requirements

Client

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

Server, build stack

  • NodeJS v18 or higher is required
  • NPM v7 or higher is required for workspaces

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

How to build

First of all, install dependencies:

npm i

Use start script to build and watch for changes, run local server (localhost:8080)

npm start

To deploy the game run the build script and then start the server

# build only
npm run build
# run server
node server.js

Modify game config

  1. Recommended way to change global game configuration is via packages/tools/src/config.ts file. It provides types and some good utilities to compose the final configuration.
  2. Generate packages/client/assets/config.json by running npm run config.
  3. Run npm start or npm run build - scripts will copy packages/client/assets/config.json to public/config.json, it will be loaded by the game and will be used for all global configuration.

If you need some new option from the code to be exposed in config.json, please create the issue.

13's People

Contributors

dependabot[bot] avatar eliasku avatar github-actions[bot] avatar thz-p 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.