• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿš— ๐ŸŽ๏ธ ๐ŸŽฎ online 3D multiplayer neural networks based racing game

micro-racing

multiplayer 3D isometric racing game written in WebGL 2.x. Steering(both): WSAD / Arrows.

Live demo: https://micro-racing.herokuapp.com/ (it uses free server so it can be really slow)

Gameplay

GIF
Screen
Screen 3
Screen 2

Todo

  • Improve client side prediction
  • Improve overall performance of server
  • Improve controls

Installation

Development mode (running at http://lvh.me:3000):

yarn install
yarn run develop

Production:

yarn install
yarn run build:production

Features

  • Client side prediction
  • High performance isometric engine using WebGL 2.x
  • Neural networks trained using evolution algorithms
  • Function precompilation in stuct-pack deserializers
  • Physics engine
  • Optimistic forms

Goals

  • Use monorepo, separated logic
  • Create tiny matrix math library
  • Create 3D isometric WebGL 2.0 functional wrapper(it should handle depth sorting and other stuff)
  • Car steering logic (using Marco Monster approach)
  • Procedural generated racetrack
  • Bots using Neural Network for AI(see neural-cars)
  • Multiplayer

Parts

Neural Network Implementation

forward propagation: https://github.com/Mati365/micro-racing/blob/master/src/packages/neural-network/src/unsafe/forwardPropagate.js

backward propagation: https://github.com/Mati365/micro-racing/blob/master/src/packages/neural-network/src/unsafe/backwardPropagate.js

evolution population train generation: https://github.com/Mati365/micro-racing/blob/master/src/packages/neural-network/src/genetic/forkPopulation.js#L70

ai car driver: https://github.com/Mati365/micro-racing/blob/master/src/network/shared/logic/drivers/neural/CarNeuralAI.js

ai cars trainer: https://github.com/Mati365/micro-racing/blob/master/src/network/shared/logic/drivers/neural/CarNeuralTrainer.js

cars intersection rays: https://github.com/Mati365/micro-racing/blob/master/src/network/shared/logic/drivers/neural/CarIntersectRays.js

Quad Tree

implementation: https://github.com/Mati365/micro-racing/blob/master/src/packages/quad-tree/src/index.js

Quad Tree handles multiple moving objects as list, stores only static objects

CSS in JS implementation

https://github.com/Mati365/micro-racing/tree/master/src/packages/fast-stylesheet

Bezier lines and de Castelja algorithm implementation

https://github.com/Mati365/micro-racing/blob/master/src/packages/beizer-lines/src/index.js

Car steering logic based on Marco Monster docs

https://github.com/Mati365/micro-racing/blob/master/src/network/shared/logic/physics/CarPhysicsBody.js#L43

Server update loop

https://github.com/Mati365/micro-racing/blob/master/src/network/server/RoomRacing.js#L148

See also

https://webcache.googleusercontent.com/search?q=cache%3A5cH3UfBvb2YJ%3Avodacek.zvb.cz%2Farchiv%2F681.html&hl=en&gl=us&strip=1&vwsrc=0&fbclid=IwAR2jxD6EayJZqvcOSNOBHgww35indUbC6pAeVA_3XtTCckCVeabjnbEuJvI
http://buildnewgames.com/real-time-multiplayer/
https://codea.io/talk/discussion/6648/port-of-marco-monsters-2d-car-physics-now-with-video
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
http://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html
https://github.com/nadako/cars/blob/gh-pages/Car.hx
https://github.com/spacejack/carphysics2d/blob/master/marco/Cardemo.c
https://www.sevenson.com.au/actionscript/sat
http://www.dyn4j.org/2010/01/sat
HTML UI in AAA games:
https://www.gdcvault.com/play/1022055/How-to-Implement-AAA-Game

License

MIT

Resources

Icons: https://png.is/f/chatbot-robot-internet-bot-artificial-intelligence-icon-vector-robot/6051723894325248-201812161840.html https://icons8.com/icon/38824/meat https://www.kisscc0.com/clipart/u-turn-traffic-sign-turnaround-computer-icons-caut-y4h8ur/ https://dryicons.com/icon/zombie-brains-icon-11516 https://fontawesome.com/icons/car

Cars: https://opengameart.org/content/low-poly-cars https://free3d.com/3d-model/cartoon-low-poly-city-cars-pack-32084.html

Elements: https://free3d.com/3d-model/road-elements-40062.html

Map Elements: https://sketchfab.com/3d-models/muro-hormigon-981c60ea68ce4fcfa168d56ff8ee59ca by talekliaran

https://sketchfab.com/3d-models/cactus-low-poly-8027a1cceedb4d8189592f316b0c4704 by kaltyiontrish

More Repositories

1

ts-c-compiler

โš™๏ธ Multipass C Compiler, Assembler and X86 emulator written in TypeScript
TypeScript
330
star
2

librus-api

Advanced node.js Librus scraping API(http://synergia.librus.pl/)
JavaScript
93
star
3

pyWinUSB

Create bootable Windows USB drives the easy way
Python
76
star
4

Soccer.js

๐ŸŽฎ โšฝ html5 socket based soccer game inspired by haxball
JavaScript
61
star
5

reddit-news

๐Ÿ“ฐ simple browser extension that shows recent news from reddit.com
JavaScript
50
star
6

neural-cars

๐Ÿš— Neural Network 2D cars ray collision detection
JavaScript
23
star
7

upolujksiazke.pl

๐Ÿ“– Open-source platform that aggregates reviews, book ratings and brochures written in React + TypeScript + NestJS + Redis + ElasticSearch
TypeScript
15
star
8

under-control

๐Ÿ“ ๐Ÿ• Are you losing sanity every time you need to make a form? Are you have enough of all antipatterns and cursed frameworks in React? Screw that! Treat all forms and inputs as a recursive composable control!
TypeScript
10
star
9

bower-sinopia-proxy

Download NPM/sinopia packages using Bower
JavaScript
8
star
10

nomad-cheap-cluster

Cheap Nomad + Vault + Consul + Pulumi + Traefik + Ansible IaC cloud cluster live example
HCL
8
star
11

android-puzzle

4x4 android animated puzzle
Kotlin
7
star
12

chrome-otp

Generate OTP password in chrome extension
JavaScript
6
star
13

rails-critical-css

Generate on demand critical css for component actions
Ruby
6
star
14

WykopExt

A simple web browser extension that shows notifications from Wykop.pl
TypeScript
5
star
15

node-searchpunch

Simple Elasticsearch Searchkick alternative for TypeORM / other Node.js ORMs. Punch your ES search queries up ๐Ÿ‘Š
JavaScript
5
star
16

ansible-docker-swarm-traefik-template

Ansible template that shows how to create dynamic staging servers with <branch-name>.<host>.com
JavaScript
5
star
17

posix-tree

Tree style like file listing written in C
C
4
star
18

ramda-graph

Simple functional graph implementation in Ramda.js
JavaScript
4
star
19

ts-union-struct

Small typescript utility class that helps with creating bit fields
TypeScript
4
star
20

news-hub

JavaScript
3
star
21

pyFileTransfer

Small python3 tool that helps with sending files through local network
Python
3
star
22

nixos-nomad-vault-consul

Example configuration of Nomad, Consul and Vault in NixOS
2
star
23

react-asynchronous-ssr-blog

SSR rendering asynchronous react components in Express with Knex/Objection.js DB connection
JavaScript
2
star
24

ad-tester

Simple browser extension that helps with live debugging frame ads
JavaScript
2
star
25

java-redux

Redux implementation written in Java
Java
2
star
26

express-graphql-sequelize-example

Example app using Express.js, GraphQL, sequelize and redis in Node.js
JavaScript
2
star
27

gh-copilot-extension

๐Ÿค– An unofficial extension that enables GitHub Copilot AI to function within your web browser.
1
star
28

podman-quadlet-ci

Podman quadlet CI deployment playground managed by using Ansible for simple applications
Shell
1
star
29

WebBugs

Monsters that destroy websites!
JavaScript
1
star
30

ansible-consul-nomad-template

Ansible + Consul (with TLS, ACLs and encryption) + Nomad + Docker + Vagrant template
HCL
1
star
31

cli-calculator

ONP cli calculator written in Java
Java
1
star
32

SkiJump.js

Simple multiplayer ski jumping game that works in browser
JavaScript
1
star
33

libreblok

๐ŸŒฟ Self hosted, free and open-source headless CMS designed to be fully compatible with Storyblok
1
star
34

Map-Editor

Map editor to Rectangle Adventures
Java
1
star
35

MOSIR-Messaging

PHP
1
star
36

CleanCSS

Tiny Semantic's style LESS library
CSS
1
star
37

CDK-for-VPS

โšก CDK for VPS. Manage your VPS with TypeScript and the Infrastructure as a Code approach. Fire up docker images like an ECS CDK.
1
star
38

Tetris.js

Simple tetris written in JavaScript
JavaScript
1
star
39

gruszko-bot

Bot, ktรณry dopilnuje porzฤ…dku na Wykopie zgล‚aszajฤ…c komentarze i wpisy ล‚amiฤ…ce regulamin
JavaScript
1
star
40

slide-puzzle

Java Swing 4x4 slide puzzle game
Java
1
star
41

bubbles

Messanger style chat bubble heads
1
star
42

tampermonkey-scripts

Collection of small tampermonkey scripts
JavaScript
1
star
43

arduino-tetris

Arduino Tetris that uses SN74HC595 shift registers and matrix led displays
C++
1
star