gabrielbrunop / haxball-server

A small server utility for Haxball
20 stars 4 forks source link

Usage and Communication #2

Closed EmirhanOlgn closed 2 years ago

EmirhanOlgn commented 3 years ago

Hello, I didn't quite understand how to run this server, how to open more than one server. I have no idea how to design my own bot and I don't know its features. Can you explain them to me? And if appropriate, can I ask for your social media accounts you use such as Discord, Instagram? I want to contact @gabrielbrop

gabrielbrunop commented 3 years ago

The goal of this project is to help people who want to run their rooms from a VPS, cloud server or any kind of remote server.

As it is now, everyone's creating their own basic scripts using Puppeteer and wasting a lot of time that they could have spent developing their rooms.

To use Haxball Server, you must install it using some package manager such as NPM, create a configuration file as specified in the docs and run it from the command line. In the configuration file you must specify a Discord token so that when you run Haxball Server it'll connect to a Discord bot (which will be used as a control panel where you can open or close rooms).

If you didn't develop your room yet, you should check Haxball Headless Host.

EmirhanOlgn commented 2 years ago

@gabrielbrop Hello again. I think I more or less understood the use of the bot, but I still don't know how to create the bot.

"bots": [
    { "name": "example1", "displayName": "Example room 1", "path": "path/to/example1.js" },
    { "name": "example2", "displayName": "Example room 2", "path": "path/to/example2.js" }
],

I don't know what to write inside the javascript folder shown. Can you open a sample usage project and show some features? for example: room.sendAnnouncement

And I am getting an error like this:

Unable to open the room!
Error: Failed to launch the browser process! spawn your/path/to/chrome.exe ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
gabrielbrunop commented 2 years ago

About the error: You need to install Chrome and specify its path in the configuration file.

This project won't help you create your room. This is nothing more than a simple interface over Puppeteer. People who have already developed their rooms need a way to make them run on a VPS/Cloud, and that's the problem this project solves.

You should check the Haxball Headless API and ask questions about Haxball development in haxball-issues.