Replies: 4 comments 1 reply
-
<html>
<head>
<script src="https://www.haxball.com/PFj3geCw/__cache_static__/g/vendor/json5.min.js"></script> <!-- json5 library -->
<script src="https://www.haxball.com/PFj3geCw/__cache_static__/g/vendor/pako.min.js"></script> <!-- pako library -->
<script src="https://cdn.jsdelivr.net/gh/wxyz-abcd/node-haxball/src/api.js"></script> <!-- this file comes from this repo -->
</head>
<body>
<script>
var { ConnectionState, Room, OperationType, Plugin, Utils } = abcHaxballAPI(window, {
WebSocketProxyUrl: "wss://abc-haxball-proxy.up.railway.app/", // let's see how much these urls will last.
HttpProxyUrl: "https://abc-haxball-proxy.up.railway.app/rs/"
});
// now you are ready to use the same functions here.
</script>
</body>
</html>
|
Beta Was this translation helpful? Give feedback.
-
You do not need "Haxball screen" or website in browser to use this. You can create your own Haxball website using this API, because this API has every functionality that Haxball website has. |
Beta Was this translation helpful? Give feedback.
-
If you want to control the player, you need to show the player with a renderer first. Writing a game renderer is not an easy task. I isolated basro's renderer and used it for my own website. I'm working on it now. The website will be available here in a few days. I will also release the source code of the website and lots of other stuff soon after this. But first, I have to open-source basro's renderer and other stuff, so that you can understand what he is doing. Because right now, even I do not understand it all. |
Beta Was this translation helpful? Give feedback.
-
AND you can also control your player with commands from console with Room.setKeyState command, after you create/join a room. You do not need a renderer for this. But you cannot see it on screen. You need to join the room from original Haxball website to see it for now. Either this, or you need a renderer. |
Beta Was this translation helpful? Give feedback.
-
You can do this for me? I don't understand some things.
Beta Was this translation helpful? Give feedback.
All reactions