Division I
Division II


Author Topic: HaxStats Beta (scoreboard)  (Read 2774 times)

0 Members and 1 Guest are viewing this topic.

Online silverlight

  • *
  • [D1] Robot Bears
  • Position: Goalkeeper
  • Posts: 536
  • Respect: +1236
  • Awards Player was voted as the Best Goalkeeper of Season 11 Player was voted as the Best Goalkeeper of Season 4 Player was voted as the Most Valuable Player of Season 11 Member of the Season 3 Division 1 Champion - Compton Cop Killas
HaxStats Beta (scoreboard)
« on: May 14, 2012, 08:18:50 pm »
+57
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 scoreboard

Here'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
« Last Edit: June 04, 2012, 05:23:51 pm by silverlight »

Offline CAFFCITYBITCH

  • *
  • [D2] Staten Island Shaolin
  • Position: Midfielder
  • Past Name: Caff
  • Posts: 597
  • Respect: +280
  • Awards Member of the Season 9 Division 2 Champion - Staten Island Shaolin Division 2 Best 5th Man - Season 15 Member of the Season 15 Division 2 Champion - Qatari Princes
Re: HaxStats Beta (scoreboard)
« Reply #1 on: May 14, 2012, 08:28:04 pm »
+1
rep this man.

Offline Dr. Rad

  • *
  • Inactive
  • Position: Forward
  • Posts: 4090
  • Respect: +4832
  • Awards Player was voted as the Best Offensive Player of Season 7 Player was voted as the Most Valuable Player of Season 12 Player was voted as the Most Valuable Player of Season 5 Member of the Season 11 Division 1 Champion - New York Islanders Member of the Season 10 Division 1 Champion - New York Islanders Member of the Season 9 Division 1 Champion - New York Islanders Member of the Season 5 Division 1 Champion - New York Islanders
Re: HaxStats Beta (scoreboard)
« Reply #2 on: May 14, 2012, 08:28:27 pm »
0
Mindblown.

Offline Marcadius

  • *
  • Inactive
  • Position: Goalkeeper
  • Posts: 1154
  • Respect: +1396
Re: HaxStats Beta (scoreboard)
« Reply #3 on: May 14, 2012, 08:28:44 pm »
0
Thanks, sl. I know I will be using this in the coming seasons.
Season 1: Founder of Nannies
Season 4: Swagg
Season 5: Shaolin
Season 6-8, 11: Crabs
Season 9, 14: Princes
Season 10: Boss/Stanzas

Offline Jso

  • *
  • Inactive
  • Position: Forward
  • Posts: 305
  • Professional RL hax player
  • Respect: +130
Re: HaxStats Beta (scoreboard)
« Reply #4 on: May 14, 2012, 08:31:05 pm »
0

Offline K2.

  • *
  • Inactive
  • Position: Forward
  • 2MuchK2InUluru
  • Posts: 2446
  • Respect: +1867

Offline Cool Beans

  • *
  • Inactive
  • Position: Goalkeeper
  • Easiest GK to Score On
  • Posts: 202
  • Respect: +189
S6: Huntington Beach Hipsters
S5: Newark Nymphs
S4: Rostock U-Boats

Offline Yuguer

  • *
  • Inactive
  • Position: Midfielder
  • Posts: 2860
  • #warwinter
  • Respect: +2614
  • Awards Member of the Season 5 Division 2 Champion - Moscow MOABS Member of the Season 16 Division 3 Champion - Waco Raiders
Re: HaxStats Beta (scoreboard)
« Reply #7 on: May 14, 2012, 09:07:53 pm »
0
it didnt work for me (sad)

Online silverlight

  • *
  • [D1] Robot Bears
  • Position: Goalkeeper
  • Posts: 536
  • Respect: +1236
  • Awards Player was voted as the Best Goalkeeper of Season 11 Player was voted as the Best Goalkeeper of Season 4 Player was voted as the Most Valuable Player of Season 11 Member of the Season 3 Division 1 Champion - Compton Cop Killas
Re: HaxStats Beta (scoreboard)
« Reply #8 on: May 14, 2012, 10:15:19 pm »
0
Yes, I'm sorry for this, I'm working to fix it right now

Offline Jay

  • *
  • Inactive
  • Position: Forward
  • Posts: 1796
  • Respect: +1657
Re: HaxStats Beta (scoreboard)
« Reply #9 on: May 14, 2012, 10:19:20 pm »
+1
The screen scanning is similar to what I was working on for my current project. Very cool, will look at it later.

Offline Rfranklinz

  • *
  • [D1] Sendai Tsunamis
  • Position: Forward
  • ( ͡ ͜ʖ ͡)( ͡ ͜ʖ ͡)( ͡ ͜ʖ ͡)( ͡ ͜ʖ ͡)
  • Posts: 6528
  • ( ͡ ͜ʖ ͡)( ͡ ͜ʖ ͡)( ͡ ͜ʖ ͡)( ͡ ͜ʖ ͡)
  • Respect: +8138
Re: HaxStats Beta (scoreboard)
« Reply #10 on: May 14, 2012, 10:27:11 pm »
0
solid work sl :)
ヽ༼ຈل͜ຈ༽ノ smoke weed everyday ヽ༼ຈل͜ຈ༽ノ

USA USA USA USA USA USA USA

I BELIEVE THAT WE WILL WIN




Offline INSINUATE

  • *
  • Inactive
  • Position: Forward
  • Past Name: INSINUATE
  • Posts: 4012
  • Respect: +2156
Re: HaxStats Beta (scoreboard)
« Reply #11 on: May 14, 2012, 10:37:35 pm »
+1
Yes I'm Gay

Online Waterloo

  • *
  • [D1] Sendai Tsunamis
  • Position: Coach
  • The Showstopper
  • Posts: 1128
  • waterloo doing?
  • Respect: +4373
  • Awards Division 3 Best 5th Woman - Season 16 Member of the Season 9 Division 1 Champion - New York Islanders Member of the Season 15 Division 2 Champion - Qatari Princes Member of the Season 14 Division 2 Champion - Toronto Huskies
    • Steam

I'm the hero in this story, I don't need no saving

Online silverlight

  • *
  • [D1] Robot Bears
  • Position: Goalkeeper
  • Posts: 536
  • Respect: +1236
  • Awards Player was voted as the Best Goalkeeper of Season 11 Player was voted as the Best Goalkeeper of Season 4 Player was voted as the Most Valuable Player of Season 11 Member of the Season 3 Division 1 Champion - Compton Cop Killas
Re: HaxStats Beta (scoreboard)
« Reply #13 on: May 14, 2012, 11:36:31 pm »
+1
Fixed, sorry again guys, my fail. I only gave you the Exe file, but my program need some external dlls to work (I used a framework called AForge to do the image processing). I updated the link in my first post, and I added how you should "install" it, note that you aren't forced to put my program in Program Files, you can keep the whole thing on the desktop.

edit : also, thanks for the nice comments guys, really appreciated!
« Last Edit: May 15, 2012, 01:32:10 am by silverlight »

Offline Bones

  • *
  • Inactive
  • Position: Forward
  • Posts: 22
  • /SP/HB Newbie
  • Respect: +18
Re: HaxStats Beta (scoreboard)
« Reply #14 on: May 15, 2012, 12:20:33 pm »
+1
Fucking amazing.  All glory to the silverlight.