GithubHelp home page GithubHelp logo

online-tic-tac-toe's Introduction

tic-tac-toe

Origin

Project was created as final assignment for web dev, which focused on using sockets (with socket.io). Goal was to implement a multiplayer game (or a game platform) which would then communicate with players through sockets.

Technologies used

  • pnpm For disk efficiency (used for the whole course!)
  • VS Code Out of the box js/ts/tsx/html/css support is a killer feature, used it despite using Helix as primary text editor.
  • Typescript as both the front and backend language.
  • socket.io 4.7.4

backend

  • expressjs as web framework.
  • ts-node + nodemon for automatic reloads

frontend

  • vite to init and build frontend (allows me to bundle socket.io-client)
  • react since I'm building a game, I'd want to implement interactivity in a well structured manner.

Running in dev

In order to run:

cd ./frontend
pnpm install
pnpm dev
# second tmux/terminal window
cd ./backend
pnpm install
pnpm dev

Running in local network

Swap line in ./backend/src/app.ts
from const origin = ""localhost:${PORT}; to const origin = '*';
and in ./frontend/src/services/socket_service.ts
from const address = "http://localhost"; to const address = "http://192.168.1.200";

then, to start:

cd ./frontend
pnpx vite --host
# second instance
cd ./backend
pnpx dev

online-tic-tac-toe's People

Contributors

viktor-grunwaldt 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.