Skip to content

Conversation

@ivojawer
Copy link
Contributor

@ivojawer ivojawer commented Dec 23, 2025

Cambios para poder correr LocalGame en una aplicacion React, que es lo que estuve laburando aca con la intencion de no tener que cargar LocalGame como parte del objeto window si no como una clase comun y corriente que existe en el mundo typescript

  • Cambia tipo de traspilacion a es2022
  • Migracion a esm
    • Igualmente lo bundleado (la carpeta /dist/web) sigue siendo commonjs (para no romper todos los uses que le damos), en un futuro probablemente deberiamos separar en 2 packages lo bundleado y el esm porque ahora el package debe estar pesando ~2x lo que deberia
  • No usamos mas sonidos nativos de p5 (dependia de la existencia de p5 en window), empezamos a usar Howler
  • Permitir cargar imagenes como base64 en vez de URLs (0eba7fa

A esto le falta lo que @fdodino propuso en #28 pero creo que puede ir por separado

@ivojawer ivojawer changed the title Game runner ESM, Howler y base64 assets Dec 30, 2025
@ivojawer ivojawer marked this pull request as ready for review December 30, 2025 03:02
@ivojawer ivojawer requested review from PalumboN and fdodino December 30, 2025 03:02
Copy link
Contributor

@fdodino fdodino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

banco fuerte esta movida, es la que va!!!
Bien ahí Ivo!!

<script>var process = {};</script>
<link rel="stylesheet" href="game.css" />
<script>
var process = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahora que lo veo, no debería ser let process = {};? O la queremos así, hoisted?

no tengo ni idea qué hace acá

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si tengo que adivinar esto debe ser por p5 que usa mucho las variables globales de node (malisimo). Pero realmente no tengo contexto, el que sabe de esto es @PalumboN

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eso estaba así porque sino rompía algo de p5, habría que probar sacándolo y viendo que todo funcione :P

Copy link
Contributor

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alto perriiiiiiii 🚀

Para mí debería exportarse el SocketGame para usarlo desde CLI y estamos 💯

src/index.ts Outdated
export * from './game/utils' No newline at end of file
export * from './game/utils.js'

export { LocalGame } from './game/game.js' No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y el SocketGame ?

keyboard.space().onPressDo({
game.say(pepita, "Ouch")
// game.sound('musica.mp3').play()
game.sound('musica.mp3').play()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

@ivojawer ivojawer merged commit 1b173d5 into main Jan 14, 2026
2 checks passed
@ivojawer ivojawer deleted the game-runner branch January 14, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants