error running new game

127 views
Skip to first unread message

Drew Cranford

unread,
Jul 6, 2023, 2:56:36 PM7/6/23
to nodeGame
Hi Stefano,
I am having a problem running a second game on my server.
The second game is very similar to the first, so I made a copy of the first game in the games_available directory, renamed it, and then created a symlink in the games directory. In the new game, I went through all of the files and updated the old game name and path to match the the new game name and path.
However, when I go to play the new game, it seems to be pointing to the original game.
For example, the original game is named 'GameA', and the new game is 'GameB'.
When I enter the url 'http://localhost:8080/GameB' it starts playing 'GameA'.
It seems I am missing something to specify the correct path for GameB. What files can I find the path pointers?
Thanks,
Drew

shakty

unread,
Jul 6, 2023, 3:00:08 PM7/6/23
to nodeGame
Hi Andrew,

Each game connects to the endpoint of the channel, which is hardcoded in public/js/index.js. It looks like perhaps you have missed that one. It is a line like:

 node.connect('/gameB');

where '/gameB' is what is defined inside channel/channel.settings.js

  playerServer: {

        endpoint: 'gameB',
        // ....


Cheers,
Stefano

Drew Cranford

unread,
Jul 6, 2023, 3:58:53 PM7/6/23
to nodeGame
Thanks Stefano,
Turns out it was two issues. The one you described was one. But I fixed that and was still having problems. The second issue was a browser cache problem. I tried to start the new game by renaming the url in an existing tab that was used to run the old game. Closing that tab and opening a new one allowed the game to run as intended.
Everything is working now.
Thanks for the help!
Best,
Drew
Reply all
Reply to author
Forward
0 new messages