eliasku / 13

Fast-action P2P multiplayer game 13 (js13k-2022)
https://iioi.herokuapp.com/
94 stars 27 forks source link
browser-game game javascript js13k js13kgames js13kgames2022 multiplayer-game typescript webgl webrtc

Build Twitter Play Now

โ˜ ๏ธ 13 โ˜ ๏ธ

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

๐ŸšชPLAY NOW

๐Ÿ“– How to play

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

๐ŸŽฎ Controls

๐Ÿ–ฑ๏ธMouse | โŒจ๏ธ Keyboard

๐Ÿ“ฑ Touch-screen

๐Ÿ“œ Rules

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

Kill opponents ๐Ÿ’€ | ๐Ÿ‘น | ๐Ÿคก | ๐Ÿค– | ๐ŸŽƒ | ๐Ÿฆ | ๐Ÿ™ | ๐Ÿฐ | ๐ŸฆŒ | ๐Ÿบ | ๐Ÿต | ๐ŸฆŠ | ๐Ÿญ | ๐Ÿฆ | ๐Ÿธ to score FRAG and get 5cr

Kill NPC ๐Ÿ… | ๐Ÿ˜ | ๐Ÿท | ๐ŸŽ…๐Ÿป to score FRAG and get 1cr

Items

Destroy objects ๐Ÿ›ข | ๐Ÿ“ฆ | ๐Ÿชฆ to get items

Weapons

Dev-menu

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

Minimal requirements

Client

Server, build stack

๐Ÿ“ฆ 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.