Hey guys, I finished a beta version of my scoreboard. In fact, it wasn't supposed to be a scoreboard in the start, as I only wanted to do a software that could do some stats in-game. There's no secret, we can't get data directly from the game, so I had to be innovative and find another way to get some datas. Then, I found what they call "image processing" which basically consist of scanning an image with different tools. Happily, haxball isn't a very graphic game, and the objects are all basic forms (lines, circles, ...). So what my software do is, it takes 2 screenshot per second, and each time it scans the image and try to find blobs (circles), then if it manages to find the ball, and some goal posts, it can determine in which territory is the ball, by checking the color difference between the poles, etc.
Before coding this little software, I didn't program anything in a long time, so I would say my code isn't clean at all, but you won't see it anyway. Although, I will release another version in a while, depending if it worths it or not. I never streamed anything, so I don't know at all if my program will run smoothly or not, I hope so, but I really can't guarantee anything. Indeed, I made some tests (on my not-so-good pc), I would say my software uses about 10% of my CPU usage, so hopefully you guys have good computers.
Well I'm really sorry but I had to do a bit of theory. So, the main point of my scoreboard is, that it counts the time of possession of each team. In other words, when the ball is deep in a zone (so that we see one of the net), the time counts. As simple as that. It's not the most accurate stats, since it only checks 2 times per second, and if the ball is in one of the zone, I simply add 0.5 sec to the team's possession. But overall, I think it can be interesting and really gives a good sight of what is happening in the game.
I hurried myself to be able to publish my beta version before the playoffs, so I really hope some of you will try it. If it's too laggy, then I'll review my code.
Here's a quick tutorial if you want to use my scoreboard (link to download it at bottom)
So, once you open it, you will see the scoreboard with his default settings : teams names (Red and Blue), score (0-0), Period (Pre for Pregame/lagtest), and the colors (Red and Blue). You might want to change the team names and the degraded backgrounds first. Simply double click somewhere in the top half of the team's section to set the team name, and double-click in the lower half (you have to double click beside the chrono) to set the degraded color. Then you can set the Period by right clicking somewhere (not on texts) and then go to Period and select in the list.
You can use the scoreboard without the "Time on Attack" function. Although, if you want to use it (might be cool), you should consider setting the Game zone. You simply have to place and resize the form inside the gamezone (the titlebar and borders can be inside too). As I explained above, my program "scans" the images, by defining a Game zone, it will reduce the size of the image, and enhance the program performance. Once you are set, simply click on "Time on Attack" to start the function.
I think you can discover the rest of the functions by yourself, I tried to make it the most intuitive as possible.
So yea hm, you can drag the scoreboard by clicking and holding it (don't click on the chronos and the score though, it won't work), I also didn't mention it but, I realized while I was making my program that it could detect (most of) the goals, so if you're using the "Time on Attack" function, it will also update the score automatically. There's a default though, since it would count a goal scored after the buzzer (I will fix it in the other version). It's the same for the Time on Attack, it continue counting even after the buzzer (it's only 2-3 secs, so not a big deal) but I will fix it eventually. I added an option to edit the score manually (right click on the scoreboard) in case. Also, my scoreboard doesn't detect when the game is Paused yet, so be aware and disable the Time on Attack function while it's paused (I will fix that too).Here's the link to download my scoreboardHere's a quick tutorial on how to install it. In fact, all you need is in this zip, but if you want to keep this clean, you should extract the document in Program Files or something, and then make a shortcut of the Exe file on your desktop (right click on the Exe file -> Send to -> Desktop (shortcut)
p.s : sorry for the bad english, I hope you guys managed to understand me, had to write it quickly