• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

[WIP] Elo Ratings System

Juggleguy

Smash Grimer
Premium
Joined
Aug 16, 2005
Messages
9,354
Location
Ann Arbor, MI
I can see about possibly installing python on http://ssbpd.smashboards.com once we transfer to the new server. The new server is probably running nginx instead of Apache, so I'll look up how to hook nginx and Python.

I'd be greatful if you could do MySQL instead, since combining that with the forums would be 100x easier :p and with this you can fetch Smashboards user data to combine usernames/user ID's to the SSBPD names.
This is the kind of connectivity between the new SSBPD and Smashboards that I think would greatly benefit the community. Please please please make this happen, Terral and Bio! :bee:

More importantly though, we have to get all TOs back on board with the notion of saving their tio files and uploading them to SSBPD. Can anyone start contacting the TOs for major tourneys starting in April 2012 and collecting a copy of the tio files? There was already a lot of momentum before the site went down, and this could really accomplish a lot even before the new SSBPD is ready to launch.
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
There isn't a better option than SQL for most applications, but that doesn't mean it's pleasant to work with.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Ugh i got distracted with other things and didn't finish my plans. Didn't think people were too interested anyways. If theres interest i'll finish them up over the weekend.


... but you were probably talking to terral so i'll go away now :zoidberg:
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
Nothing new, I haven't had time for anything. There were a few things I wanted to fix before I gave up and released the source code, but that never really happened. I may or may not have time to work on it next month, depending on how money-related things go. Sorry for volunteering to work on this, I thought that things would be going differently right now and I'd be in a better position.
 

Zivilyn Bane

Smash Master
Joined
Nov 18, 2004
Messages
3,119
Location
Springfield, MO
No apology necessary. If I could make a recommendation though, you might try delegating some of the work to others that are involved in the project. There are a couple of other programmers that you can work with to get things done faster, while lowering your work load. It will take a little bit of time to network with the others, but likely much less time than it would otherwise take you to do it all yourself.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Yeah I would be willing to commit to chipping in X amount of functions/bugs/classes a month or something. Semester started so maybe the number will be low, like 1 or 2, but thats still bigger than 0
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
I was pretty sure I had made a reply, but I guess I got distracted and didn't actually post it. My original plan was to make the website as quickly as possible and cut some corners code quality-wise, so what I have now is a partially-optimized mess that I don't expect anyone else to be able to understand. I was going to use extra time to restructure and reorganize so that it would be presentable before making it open-source.

The easiest way for other people to help right now would probably be to design the layouts, keeping in mind that we can do a lot of dynamic stuff with JavaScript and ajax. It's not so much that layout design is hard and time-consuming, more that having collected several different ideas for how various parts of the site could be designed would make it a lot easier to improve on things to make the layout the best possible.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Design really isn't my forte, I prefer coding and back end stuff. I promise i wont make fun of you for not commenting your shiz
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
I ended up doing a bit of work on it today, and I fixed the last issue I was wanting to fix before adding more features, which was a small hypothetical security issue with the way I was handling ajax requests. If I don't get the time to restructure everything before I open-source this, it will at least give everyone more appreciation for standard practices.
 

Nintendude

Smash Hero
Joined
Feb 23, 2006
Messages
5,024
Location
San Francisco
Ok, so I think we need to start actively searching for new programmers. Does anyone have any recommendations? If not then I need to just open this up to the general smashboards public. If I end up doing that, does anyone have suggestions on how to screen out interested people?
 

Isatis

If specified, this will repl[0x00000000]ce the
Premium
BRoomer
Joined
Dec 18, 2008
Messages
10,253
Location
San Francisco, CA
NNID
reverite
I prefer people who can do PHP/MySQL as I can be lazy & don't have to install python onto a different subdomain. :p
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
You should make sure there are multiple programmers working. Solo programmers tend to make mistakes and cut corners, while on a team people check each other's work and are forced to write readable code.
 

Strong Badam

Super Vegeta
Administrator
Premium
BRoomer
Joined
Feb 27, 2008
Messages
26,515
Ideally I'd like the Elo Ratings project to be fully integrated with Smashboards, with TOs being able to upload their .tio files when they post a results thread and some automated stuff like bracket images and results being spat out to help streamline the process of posting up a results thread. From there, you'd just need a group of people with the task of approving & double checking (for spelling etc.) results threads and they'd be added to the database.
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
I'm sorry I haven't been able to get more work done on the site. It was a lot of fun making it, it's just hard to find time. I went ahead and put the source code up on GitHub, but it's still a mess. If we're preferring to bring it to PHP, I'd be happy to help out with any database stuff and front-end/JavaScript if I get the time to (could probably use a similar database design unless someone else has a better idea), but I don't really like PHP and I don't have much experience with it.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Woo open source!


@Strong Bad, there was a design screenshot posted the other day of the upcoming site changes, there was one tab that looked like a link to a tournament database...
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
Extracting data from .tio files is pretty simple, since it's just an XML file. The basic idea is that each player is assigned a GUID (I have no idea why, honestly, and it multiplies the file size by no small amount over just using an incremented ID because these players are referenced all over the place), and then byes seem to be GUIDs that don't reference players. I couldn't quite work out a consistent way to determine what is a bye aside from "not a player". Everything else is straightforward from what I recall.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
I've gone through the TIO file type and converted it to sql tables, gonna make a create table and write up a php script to translate it now. From there everything else seems pretty straightforward. I'd like to create a browser based tournament system using html5, but my knowledge on the subject is pretty poor at the moment.
 

Zankoku

Never Knows Best
Administrator
Premium
BRoomer
Joined
Nov 8, 2006
Messages
22,994
Location
Milpitas, CA
NNID
SSBM_PLAYER
Just note that the order of matches in the tio file is not perfectly chronological... I don't remember the exact issue but I had to actually use the IsChampionship and IsSecondChampionship attributes to determine that the match was grand finals and to leave it for last.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Yeah. I could be wrong, but it seems grand finals (1st set) is chronologically after WF but if there is a 2nd set it is chronologically after LF. For now I am keeping the structure of the tables the same as the structure of the tio file (including the ischampionship and is2ndchampionship bools), but eventually i'll go back to clear up unnecessary storage. Also, I agree with terral about the player's IDs in the tio file and logically i'm just converting it to an incremental ID



edit- what DBMS does smashboards use? mysql?

edit2- looked back and bionic asked for mysql, so i'll go with that.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
That'd be really cool bionic! I could use somewhere to debug on since i dont have sql on my pc
 

Zankoku

Never Knows Best
Administrator
Premium
BRoomer
Joined
Nov 8, 2006
Messages
22,994
Location
Milpitas, CA
NNID
SSBM_PLAYER
Yeah. I could be wrong, but it seems grand finals (1st set) is chronologically after WF but if there is a 2nd set it is chronologically after LF.
Ah right, I think I rationalized its logic as GF (1st set) being in winners' brackets and GF (2nd set) being in losers' brackets, and all the matches being organized in order of winners' brackets matches, followed by losers' brackets matches.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Yeah that makes sense. I was thinking along the lines that the 2nd set may or may not even exist, so it wouldn't make sense to reserve it in the file space and instead tack it on at the end if it occurred.


i'm probably done working on this for today, so no rush bionic. Gonna go play some smash :)
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
I remember dealing with the grand finals set 2 placement, loads of fun. Questionable design choices everywhere in that file format.

The bracket viewer that's on the Python site uses HTML5/Canvas, taken from an oldish project of mine to make a full tournament organizer in JavaScript (it's mostly complete but I got tired of working on it for some reason, partly dreading TIO compatibility). It can load data through Ajax and all sorts of fancy stuff. In the Python site I have it cache the bracket data (which is very, very small; just a couple KB for even large tournaments) in the database and return that when requested, but right now it never updates it after loading from the TIO file, so name changes and such won't be reflected. I guess the Python site isn't of much importance anymore because it sounds like we are just rebuilding from the ground up in PHP, now.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Well there is some redundant information, but I can see the purpose for it. For example, the IsWinners in double elim matches isn't really necessary since we have complete bracket information already, but its much quicker to save a bool and check it than to build the bracket and determine with an algorithm.

I have to check out that bracket viewer, man. Sounds pretty sweet. Idk if I will use ajax. I think it can all be done in jscript and be client side until the bracket is updated with the server via a save button. I am hesitant to be wasteful with storage, since this will be integrated into swf and scalability is a real issue.
 

Isatis

If specified, this will repl[0x00000000]ce the
Premium
BRoomer
Joined
Dec 18, 2008
Messages
10,253
Location
San Francisco, CA
NNID
reverite
I have made Sveet a developer. I'll send you the FTP and MySQL info in half an hour. Wait I can't since admin control panel is giving 500 errors. Well, whenever you see a red name.

Who all is the SSBPD team now btw? Who are the developers and who are the people giving input? I'm going to add the programmers into the dev group (which sees the dev depot and have FTP/MySQL), and the people giving input setting an access flag to the dev depot forum... and then move this topic into there, since Marc is doing stuff with the MBR.
 

Nintendude

Smash Hero
Joined
Feb 23, 2006
Messages
5,024
Location
San Francisco
I think formally, the people programming right now are Terral and Sveet. Me and Zivilyn Bane are giving input, but a bunch of MBR people have chimed in from time to time.
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
I have to check out that bracket viewer, man. Sounds pretty sweet. Idk if I will use ajax. I think it can all be done in jscript and be client side until the bracket is updated with the server via a save button. I am hesitant to be wasteful with storage, since this will be integrated into swf and scalability is a real issue.
The bracket viewer on there only loads the bracket data through Ajax (or if the data is already embedded in the container element, it will load from that). You can't use it to edit brackets, because I had removed that functionality when I extracted it from the main tournament organizer project, but that can probably be merged back in. It doesn't use the best save format, though, considering it's mostly optimized for space efficiency. The data would hypothetically be exportable, though. I'd definitely recommend caching the bracket files because of the complexity required to generate them and the small file sizes. The bracket files for the average tournament are smaller than a lot of forum posts.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
Alright lmk when its going down Bionic. We need to talk anyways.

I still have a few fields to add and probably a syntax error, but other than that my create tables has been done for a few days. Slept a few nights on the conversion script but I finally made a decision. I don't like how php natively handles xml; everything is handled through various parser objects and functions, and while the approach is valid, i find it to be convoluted for our needs. If I am proven wrong later, i wouldn't mind converting. Instead I am simply handling the file sequentially, using sscanf to handle the processing. I have the format mapped, at this point its just following it to the treasure. I expect the database to be ready for uploads within the next week or two. After this its just a matter of formatting the data to fit the site.


edit- Could anyone send me a tio file of a large national. FC/Apex/Pound/Rom/etc. Preferably one that was used by the TO to manage the tournament and not one that was rebuilt for our records.
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
You should always use a real XML parser to read XML data. There are rare circumstances where you won't gain much benefit from doing so, but even in those situations other programmers will crucify you for it. I was a little weary of using string replacements for some custom XML tags in the Python player database's content pages, and when I showed it to some people to get their opinions on the code that was one of the first things they complained about. I never got around to tidying up, so it's still there.

Also, I looked into PHP's XML stuff, and it looks like it has just a standard DOM setup, along with some weird event-based thing that might be what you were referring to. I don't see anything strange about its DOM implementation, aside from maybe missing a few methods here and there that you wouldn't be using anyway.
 

Fortress | Sveet

▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀
Joined
Dec 21, 2005
Messages
16,260
Location
Northern IL
You made me give a second look and i'm glad I did. Instead of doing
PHP:
sscanf($cline, "<Version>%s</Version>", $version);
i can do something like
PHP:
$Version = $file->Version;
the method uses functions only available in php5, will that be compatible with this site?
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
Even if I'm not particularly proud of the quality of all this Python code, it's still painful to think that it's not going to be used considering how much time and effort I put into it. When are you thinking you'll get the PHP stuff up on GitHub (or whatever site you'd prefer, Google Code is pretty good too)?
 

Terral

bluehexagons
Joined
Oct 18, 2008
Messages
786
Location
MO
Slippi.gg
TERA#282
Has any progress been made on this? Am I still going to be involved in some way or is this going back to a one-man job?
 
Top Bottom