GithubHelp home page GithubHelp logo

karranb / space-battleship Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 5.0 27.64 MB

Multiplayer spaceship game

Home Page: https://spacesbattleship.com

License: GNU General Public License v3.0

JavaScript 0.51% TypeScript 90.40% Shell 0.04% HTML 0.53% CSS 6.22% Java 0.55% Swift 1.47% Ruby 0.27%
game multiplayer nodejs phaser socket

space-battleship's People

Contributors

corners2wall avatar dittafaniab avatar falentio avatar giovannipessiva avatar ighmaz avatar karranb avatar ladam0203 avatar maxime-p avatar olyno avatar thecyberera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

space-battleship's Issues

Validate messages on the backend

Using a package like Zod, validate the messages send by the socket clients to the socket server, returning UNPROCESSED message when a message is invalid.

EG:

Create expected message parser and type

const SetUsernameMessage = z.object({
  name: z.string(),
  version: z.string(),
  countryCode: z.string().optional(),
});

type SetUsernameMessage = z.infer<typeof SetUsernameMessage>;

validate received unknown message

handleSetUserName(socket: Socket, message: unknown): void {
      ...
      const result = SetUsernameMessage.safeParse(message)
      if (result.success === false) {
        throw new SocketError('Invalid message')
      }
      const { name, version, countryCode } = result.data
      ...
}
  • Room (node_server/src/core/game/mixins/room.ts)
  • Challenge (node_server/src/core/game/mixins/challenge.ts)
  • Game (node_server/src/core/game/mixins/game.ts)

Improve graphics / add animations / sound effects

make the game more attractive.

  • Improve loading screen Screen Shot 2022-10-10 at 09 32 27
  • Fix some button images that are stretched Screen Shot 2022-10-10 at 09 29 00
  • Create a new quit button Screen Shot 2022-10-10 at 09 29 20
  • Create screen transitions
  • Add sound effects when, for example, a user signs in / challenges you
  • add some type of animations to the identification scene

improve readme

besides improving its content, one suggestion is to add some gameplay images

Setup CI

With git lab actions a simple job that runs checks the lint, run the tests, and tries to build the front and backend

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.