Writing multiplayer Tic-Tac-Toe game using Babylon.js and TypeScript

I decided to write simple multiplayer games for my portfolio. Maybe my code will be useful for someone. I will write detailed commits on GitHub. Everyone can use my code for free.

The Game will be here: Click To Run

Source Code: https://github.com/8Observer8/tic-tac-toe-socketio-ts

I use:

  • TypeScript
  • VSCode
  • Free Heroku hosting that are connected with GitHub. My game deployed automatically when I push on GitHub
  • AMD and RequireJS for debug version
  • CommonJS, Browserify, UglifyJS for release version

Now my game just shows a box. I will write here about of process of development. You can ask me about my code. Please, report me if you find some errors. Maybe I will take a feedback from how to improve my code.

Date: Sat Jun 29 23:35:23 2019 +0400
The server sends JSON message ‘Hello from server’. Client display this message on the page.

4 Likes

Date: Sat Jun 29 23:35:23 2019 +0400
The server sends JSON message ‘Hello from server’. Client display this message on the page.

1 Like

I made a boilerplate: https://github.com/8Observer8/boilerplate-socketio-typepescript-unit-tests-jasmine-specs

1 Like

I added compound debugging with VSCode​​​​​​​ for Server and Client to the boilerplate: https://github.com/8Observer8/boilerplate-socketio-typepescript-unit-tests-jasmine-specs

1 Like

I create the separate topic for my boilerplate: Boilerplate, SocketIO, Jasmine, TypeScript

1 Like

@8Observer8, thanks for your boilerplate examples. These look like a great starting place for multiplayer games. Looking forward to your Tic-Tac-Toe implentation!

2 Likes

@Drigax thank you. I glad that it is useful for you. Please, click the “Star” button here: GitHub - 8Observer8/boilerplate-socketio-typepescript-unit-tests-jasmine-specs

See how it is simple to deploy your application that based of my boilerplate on Heroku:

  • Create a new repository on Github
  • Create a new Node.js web application on Heroku:
    https://www.heroku.com/
  • Set “GitHub” in “Deployment method” on the Deploy tab of heroku
  • Push your changes on GitHub

Your server and client well be deployed automatically on Heroku. Heroku will be automatically deploy your app from Github every time when you push your commits on GitHub. See the “Activity” tab when deployment will be finished.

2 Likes

Now I am ready for this.

1 Like

I made repository link private for a while. I will make them public when I finish the first playable game. Sorry for that.

2 Likes

Multiplayer is fun, more complicated but fun :smiley:

I’m also using socket.io, json and heroku as host but do manual deploys.

Good luck with your project!

2 Likes

Thank you! I will not be lazy :slight_smile:

If you did not try auto deploy from GitHub try it. You need just go to Deploy on Heroku app and clink on the “Connect to GitHub” button. When you “push” on GitHub the Heroku will deploy the application from GitHub.