mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 11:42:06 +00:00
122 lines
2.7 KiB
Markdown
122 lines
2.7 KiB
Markdown
# scoreko-dev
|
|
|
|
NodeCG bundle for producing fighting game overlays.
|
|
|
|
## Project
|
|
|
|
- Repository: https://github.com/Pandipipas/scoreko-dev
|
|
- Stack: NodeCG, Vue 3, TypeScript, Quasar, and Vite.
|
|
|
|
## Requirements
|
|
|
|
- Node.js 24.14.0+
|
|
|
|
## Scripts
|
|
|
|
- `npm run autofix`: automatically fixes lint errors.
|
|
- `npm run build`: builds dashboard/graphics and extension.
|
|
- `npm run lint`: validates project linting.
|
|
- `npm run schema-types`: generates types from schemas.
|
|
- `npm run start`: starts NodeCG using the local dependency (`nodecg start`).
|
|
- `npm run watch`: development mode with watch.
|
|
|
|
## Usage
|
|
|
|
- `npm install`
|
|
- `npm run build`
|
|
- `npm run start` (equivalent to `npx nodecg start`)
|
|
|
|
## Version
|
|
|
|
Initial project version: `0.1.0`.
|
|
|
|
## Assets por HTTP (sin GitHub API)
|
|
|
|
La descarga de assets usa **únicamente HTTP**. Debes configurar un servidor propio.
|
|
|
|
1. En `cfg/scoreko-dev.json`, configura `assetsBaseUrl` (opcional, por defecto `http://localhost`):
|
|
|
|
```json
|
|
{
|
|
"scoreko-dev": {
|
|
"assetsBaseUrl": "http://localhost"
|
|
}
|
|
}
|
|
```
|
|
|
|
2. Sirve por HTTP esta estructura:
|
|
|
|
```text
|
|
games/
|
|
games.json (opcional, para nombres visibles personalizados)
|
|
street-fighter-6/
|
|
street-fighter-6.png
|
|
manifest.json
|
|
fighting-characters.json
|
|
characters/...
|
|
tekken-8/
|
|
tekken-8.png
|
|
manifest.json
|
|
...
|
|
```
|
|
|
|
`games/games.json` es opcional y permite mapear `slug -> nombre visible`.
|
|
|
|
Formato objeto:
|
|
|
|
```json
|
|
{
|
|
"2xko": "2XKO",
|
|
"tekken-8": "Tekken 8"
|
|
}
|
|
```
|
|
|
|
También se acepta array de objetos:
|
|
|
|
```json
|
|
[
|
|
{ "slug": "2xko", "title": "2XKO" },
|
|
{ "slug": "tekken-8", "title": "Tekken 8" }
|
|
]
|
|
```
|
|
|
|
## Logos en servidor HTTP (sin logos locales en el bundle)
|
|
|
|
La vista de "Game Assets" carga los logos directamente desde:
|
|
|
|
```text
|
|
{assetsBaseUrl}/games/{repoFolder}/{logoFile}
|
|
```
|
|
|
|
Ejemplos:
|
|
|
|
- `http://TU_SERVIDOR/games/street-fighter-6/street-fighter-6.png`
|
|
- `http://TU_SERVIDOR/games/tekken-8/tekken-8.png`
|
|
|
|
### Cómo guardarlos en la carpeta HTTP
|
|
|
|
1. Crea la carpeta del juego en tu web root (si no existe).
|
|
2. Copia el logo con el nombre esperado (`logoFile` de `src/shared/fighting-games.ts`).
|
|
3. Verifica desde navegador o `curl` que responde `200`.
|
|
|
|
Ejemplo rápido en Linux (Nginx/Apache):
|
|
|
|
```bash
|
|
sudo mkdir -p /var/www/assets/games/street-fighter-6
|
|
sudo cp ./street-fighter-6.png /var/www/assets/games/street-fighter-6/street-fighter-6.png
|
|
curl -I http://TU_SERVIDOR/games/street-fighter-6/street-fighter-6.png
|
|
```
|
|
|
|
Opcional (recomendado): añade cache HTTP (`Cache-Control`, `ETag`) en tu servidor para que el navegador no los vuelva a descargar en cada visita.
|
|
|
|
3. Cada `manifest.json` debe ser un array con rutas relativas, o con objetos `{ "path", "size", "url" }`.
|
|
|
|
Ejemplo mínimo:
|
|
|
|
```json
|
|
[
|
|
"fighting-characters.json",
|
|
"characters/ryu.png"
|
|
]
|
|
```
|