- Replace socket.io relay with Colyseus 0.15 authoritative server - GameRoom with GameState schema (players, units, resources) - Pure TS services: CombatResolver, EconomyService, PathfindingService, UnitManager - POST /api/create-room → 4-char invite code - React/MUI LobbyScreen: Create (shows code + START GAME) / Join by code - ColyseusClient: joinOrCreate/join by room type = invite code - Nginx: static assets direct, all else proxied to Colyseus (WS upgrade) - Content-hashed JS bundles for Cloudflare cache-busting - 1-player lobbies: START GAME button bypasses 2-player wait
97 lines
2.8 KiB
JSON
97 lines
2.8 KiB
JSON
{
|
|
"name": "hackathon",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"engines": {
|
|
"node": ">=16.18.0"
|
|
},
|
|
"scripts": {
|
|
"install": "npm install dotenv -g",
|
|
"socket_server": "node --inspect ./gameServer/main.js",
|
|
"start:webpack": "npm run install && npm run serve",
|
|
"start:socket_server": "npm run install && npm run socket_server",
|
|
"start:all": "npm run install && npm run socket_server && npm run serve",
|
|
"serve": "webpack serve --open",
|
|
"test": "jest --verbose --coverage"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/kaykayyali/side-scroller-game.git"
|
|
},
|
|
"author": "",
|
|
"license": "ISC",
|
|
"bugs": {
|
|
"url": "https://github.com/kaykayyali/side-scroller-game/issues"
|
|
},
|
|
"homepage": "https://github.com/kaykayyali/side-scroller-game#readme",
|
|
"dependencies": {
|
|
"@babel/preset-env": "^7.19.4",
|
|
"@emotion/react": "^11.10.4",
|
|
"@emotion/styled": "^11.10.4",
|
|
"@fontsource/roboto": "^4.5.8",
|
|
"@mui/icons-material": "^5.10.9",
|
|
"@mui/material": "^5.10.9",
|
|
"@mui/styled-engine-sc": "^5.10.6",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"babel-loader": "^8.2.5",
|
|
"colyseus.js": "^0.16.22",
|
|
"dat.gui": "^0.7.9",
|
|
"dotenv": "^16.0.3",
|
|
"easystarjs": "^0.4.4",
|
|
"install": "^0.13.0",
|
|
"lodash": "^4.17.21",
|
|
"npm": "^8.19.2",
|
|
"phaser": "^3.55.2",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"socket.io": "^4.5.3",
|
|
"styled-components": "^5.3.6",
|
|
"xstate": "^4.33.6"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/preset-react": "^7.18.6",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"canvas": "^2.10.2",
|
|
"css-loader": "^6.7.1",
|
|
"html-webpack-plugin": "^5.5.0",
|
|
"jest": "^30.4.2",
|
|
"jest-environment-jsdom": "^30.4.1",
|
|
"style-loader": "^3.3.1",
|
|
"webpack": "^5.74.0",
|
|
"webpack-cli": "^4.10.0",
|
|
"webpack-dev-server": "^4.11.1"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "jsdom",
|
|
"transform": {
|
|
"^.+\\.jsx?$": "babel-jest"
|
|
},
|
|
"transformIgnorePatterns": [
|
|
"/node_modules/(?!(phaser|easystarjs|xstate)/)"
|
|
],
|
|
"moduleNameMapper": {
|
|
"^Scenes/(.*)$": "<rootDir>/src/scenes/$1",
|
|
"^PhaserClasses/(.*)$": "<rootDir>/src/phaserClasses/$1",
|
|
"^Components/(.*)$": "<rootDir>/src/components/$1",
|
|
"^Entities/(.*)$": "<rootDir>/src/entities/$1",
|
|
"^Systems/(.*)$": "<rootDir>/src/systems/$1",
|
|
"^phaser$": "<rootDir>/node_modules/phaser/dist/phaser.js",
|
|
"^colyseus\\.js$": "<rootDir>/node_modules/colyseus.js/dist/colyseus.js"
|
|
},
|
|
"setupFilesAfterEnv": [
|
|
"<rootDir>/tests/setup.js"
|
|
],
|
|
"testPathIgnorePatterns": [
|
|
"/node_modules/",
|
|
"/dist/"
|
|
],
|
|
"collectCoverageFrom": [
|
|
"src/systems/**/*.js",
|
|
"src/entities/**/*.js"
|
|
],
|
|
"coverageDirectory": "coverage"
|
|
}
|
|
}
|