mgechev/mk.js
mgechev/mk.js has 1,555 GitHub stars and 447 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 04:13 UTC. Last push 2022-02-23.
Canvas implementation of basic fighting game which allows multiplayer over the network.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalmk.js
This is simple fighting game created with HTML5 canvas and JavaScript. It has three game modes:
Basic- with one active and on inactive player.Multiplayer- with two active players on one computer.Network- with two active players, playing over the network.
Each mode can be easily chosen by picking a gameType when specifying the game options.
The multiplayer mode can be tested here.
The Network mode with Web RTC Data Channel Demo here.
For the network game you need to install the server:
git clone [email protected]:mgechev/mk.js
cd mk.js/server
npm install
node server.js
The server will be started on port 55555. Open your browser and go to http://localhost:55555. Both players must enter the same game name to play together.
Configuration
In this section I'll describe in short how you can configure mk.js.
arena- object which contains different properties for the arena.arena- type of the arena. The different arenas are listed at:mk.arenas.typescontainer- parent container of the canvas which is the actual arena.
fighters- array of two objects which are the two players.name- player's name. It's case insensitive string without any special characters and white space.
callbacks- callbacks which will be invoked when some events happens.attack- callback which will be invoked on successful attackgame-end- callback which will be invoked on game endplayer-connected- callback which will be invoked innetworkgame when the second player is connected.
game-type- specifies the game controller which will be used. Possible values are:network,basicandmultiplayer.gameName- used innetworkgame.isHost- used innetworkgame, tells the game controller whether the current user have created the game.reset- a method which reset the game. It clean some references and call the reset methods of lower level components. Calling it will lead to removal of the game canvas.
License
This software is distributed under the terms of the MIT license.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,072 starspublic-apis/public-apis
A collective list of free APIs
497,313 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
443,622 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,216 stars