#lobby and in game sound tracks

45 messages · Page 1 of 1 (latest)

sand stratus
#

// Lobby class
class Lobby {
constructor(name) {
this.name = name;
this.players = []; // List of players in the lobby
}

addPlayer(player) {
    this.players.push(player);
    console.log(`${player} joined the lobby: ${this.name}`);
}

removePlayer(player) {
    this.players = this.players.filter(p => p !== player);
    console.log(`${player} left the lobby: ${this.name}`);
}

listPlayers() {
    console.log(`Players in ${this.name}:`, this.players);
}

}

// Game class
class Game {
constructor(lobby) {
this.lobby = lobby
this.isRunning = false;
}

start() {
    if (this.lobby.players.length === 0) {
        console.log("Cannot start the game. No players in the lobby.");
        return;
    }
    this.isRunning = true;
    console.log(`Game started with players: ${this.lobby.players.join(", ")}`);
    this.playSoundtrack();
}

stop() {
    this.isRunning = false;
    console.log("Game stopped.");
}

playSoundtrack() {
    const audio = new Audio("path/to/soundtrack.mp3"); // Replace with actual path
    audio.loop = true;
    audio.play().then(() => {
        console.log("Soundtrack playing...");
    }).catch(err => {
        console.error("Error playing soundtrack:", err);
    });
}

}

// Example
const lobby = new Lobby("Battle Arena");
lobby.addPlayer("Player1");
lobby.addPlayer("Player2");
lobby.listPlayers();

const game = new Game(lobby);
game.start();

setTimeout(() => {
game.stop();
}, 10000);

#

@inner granite

#

i totaly did not steal this from one of my websites

inner granite
#

wha

#

lol

#

if im honest, their should be settings

#

like flags, you can make your country

sand stratus
#

dog ur the dev not me

inner granite
sand stratus
#

bruh

odd tapir
odd tapir
inner granite
#

i´ll make it simple.

sand stratus
#

i have a fully working particvcle system in python i can just scrape the math out and make it in ts

inner granite
#

or no

#

can i get a answer?

odd tapir
#

Hmm?

sand stratus
#

ban @inner granite

inner granite
#

make the ui?

odd tapir
inner granite
#

make the ui

#

like the art for the ui.

odd tapir
#

That would be neat

inner granite
#

alrighty.

odd tapir
#

Go ask OF Creator

#

Tho

inner granite
#

alrighty

#

where do i ping him?

odd tapir
odd tapir
inner granite
#

alr

#

i´ll ask him

sand stratus
#

would particles from explosions be good

#

like battleships n stuff

indigo osprey
#

man, need a sound designer in that case

surreal shuttle
#

okay chat how about we copy rise of nation's soundtracks

stuck pythonBOT
#

@surreal shuttle has reached level 2. GG!

indigo osprey
#

gets copyright striked

inner granite
indigo osprey
#

they are in the same genre but different

inner granite