SessionRockers.com

GuitarFreaks, DrumMania, keyboardmania

Moderator: Moderators

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

SessionRockers.com

Post by Merk » Wed Dec 07, 2011 12:15 am

Let's Session Rockering!

So now that I have a little bit of ColdFusion under my belt and some time on my hands coming up, I've decided to get the ball rolling on making a DrumMania score tracker ala VJArmy, ScoreHero, DDRRecall, etc.

Yes I know this is a bad idea and no one will use it. DM is way more niche than Pop'n or Beet thanks to shitty CS controllers / games. At worst I'll get some more development experience under my belt and I can actually get a real job (again) and make fat baller cash (again) to spend on more DrumMania cabinets. More than likely this will leave a burning hole in my wallet monthly but whatever at least it's not something retarded like WoW.

Here's a quick database schema I wrote:

Code: Select all


Songs
---------
SongID
Name
Notecount


Mixes
---------
MixID
Name


SongsInMixes
---------
SongInMixID
f_MixID
f_SongID


Users
---------
UserID
Username
Password (hashed, obviously)
Role (deliminates user as a regular user or admin)


Scores
---------
ScoreID
f_UserID
f_SongID
Difficulty
Grade
SkillPercent
NumberOfPerfects
NumberOfGreats
NumberOfGoods
NumberOfBoos
NumberOfMisses

This should give users the ability to register a username, look at and compare scores, input scores, and edit scores. I'd like to create Admin pages so I can populate databases through the website itself instead of having to dick around in whatever MySQL command-line shit is out there.

This is very much a work in progress. I'll start off with just ColdFusion/HTML/CSS and Notepad++. Once I get a grasp on things I'll throw in some neato Javascript AJAX shit that is oh so common these days (this probably won't happen).

Does anyone have server space? Platform doesn't matter so Linux is fine. It will need Apache, Notepad++, OpenBD (ColdFusion interpreter - http://www.openbd.org/), and some sort of GUI since I am a big stupid babby. Yes I know I should be using a fancy command-line server version of a Linux distro but I am way too dependent on a mouse.

I'm guessing no one will have server space. Does anyone have a host recommendation that lets me VPN in from Windows and fuck around in a GUI?


And yes I am parking the domain, http://www.sessionrockers.com
Last edited by Merk on Wed Dec 07, 2011 10:17 am, edited 1 time in total.
Image

User avatar
Fluffyumpkins
Moderator
Moderator
Posts: 6592
Joined: Wed Feb 02, 2005 1:53 pm

Re: SessionRockers.com

Post by Fluffyumpkins » Wed Dec 07, 2011 9:21 am

How will you actually name 95% of drummania songs? They're just weird hieroglyphs.

User avatar
Ho
Site Admin
Site Admin
Posts: 5645
Joined: Fri Dec 31, 2004 10:26 am
Location: The Ho-House

Re: SessionRockers.com

Post by Ho » Wed Dec 07, 2011 9:31 am

Fluffyumpkins wrote:How will you actually name 95% of drummania songs? They're just weird hieroglyphs.
friggin' moonspeak

But seriously, I think other score trackers just use the kanji or kana...and if they're nice, romaji, too. I suggest finding a song listing you can copy/paste from unless you're interested in learning how to type in Japanese. ;)

On a side note, I thought a service like this already existed for GFDM...
Image

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 10:17 am

Fluffyumpkins wrote:How will you actually name 95% of drummania songs? They're just weird hieroglyphs.
Good question! I'm pretty sure MySQL supports non-ASCII characters either out of the box or through some sort of mod. Obviously it's possible since VJArmy does it and the glorious Nipponese peoples have their own little slice of the internet.

I've considered just having users identify songs by song banner but that would be hella difficult to sort and I'm positive I would not be able to find all song banners. Not to mention that would mean the site will have to take up a lot more space with all those images.

But seriously, I think other score trackers just use the kanji or kana...and if they're nice, romaji, too. I suggest finding a song listing you can copy/paste from unless you're interested in learning how to type in Japanese. ;)

On a side note, I thought a service like this already existed for GFDM...
http://vjarmy.com/wiki/index.php/Gitadoraicon has songs by mix. I'm not sure it's 100% complete but I'll take its word for it. Notecounts might be a little hard to find but if push comes to shove I can just autoplay a song, as tedious as that may be.

I'm positive a score tracker for GFDM doesn't exist. There might be a now-defunct one for Japan but they have e-amuse so they can use that.
Image

User avatar
Ho
Site Admin
Site Admin
Posts: 5645
Joined: Fri Dec 31, 2004 10:26 am
Location: The Ho-House

Re: SessionRockers.com

Post by Ho » Wed Dec 07, 2011 10:40 am

Merk wrote:I've considered just having users identify songs by song banner but that would be hella difficult to sort and I'm positive I would not be able to find all song banners. Not to mention that would mean the site will have to take up a lot more space with all those images.
I'll bet they could be ripped right out of the game. Given that they're PC-based--in fact, Windows-based--this would probably not be a terribly difficult project (and has probably already been done at this point). For the 573 stuff, I used an off-the-shelf tool to rip the song banners out of the old DDR mixes (they were in a standard Playstation format). I'd suspect something similar could be done for 573-based GFDM. I don't know about tools for the Python2-based (Playstation2) games (V-V3). They may exist, but I don't know about them. But even if they don't, a lot of those banners are probably in one or more of the PC games or are otherwise available in some way.

You're right that these would take up more space on a website, but they would be fairly small images and I doubt would put much of a strain on even the smallest of hosting packages.
Image

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 10:45 am

We'll see. I'm going to have to have a Name column in the Songs table anyway if I want to have any ability to sort songs alphabetically so I'll work with that first. If I want to roll out SessionRockers 2.0 I can always add another column where I can reference a link to an image.

Oh my God I need hosting.
Image

User avatar
Fluffyumpkins
Moderator
Moderator
Posts: 6592
Joined: Wed Feb 02, 2005 1:53 pm

Re: SessionRockers.com

Post by Fluffyumpkins » Wed Dec 07, 2011 11:38 am

Having an idea is useless without follow-through. I admire this project.

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 12:45 pm

A SQL call to show user scores:

Code: Select all


	<cfquery datasource = "#DSNName#" name="ViewUserScores">
		SELECT *, SUM(Songs.NumberOfPerfect, Songs.NumberOfPerfect, Songs.NumberOfGreats) AS EXPoints
		FROM Scores, Songs
		WHERE Scores.f_UserID = s_UserID <!--- this is the user's ID as a session variable --->
                AND Scores.f_SongID = Songs.SongID
                AND Scores.Difficulty = <cfoutput>#Selected_Difficulty#</cfoutput>
                ORDER BY Scores.SongName
	</cfquery>

	<table border="0" cellpadding="3" cellspacing="3">
		<tr>
			<th width="100">Song Name</th>
			<th>Grade</th>
			<th>Skill Level</th>
			<th>EX Points</th>
			<th>Difficulty</th>
		</tr>
		
		<cfoutput query= "ViewUserScores">
		<tr>
			<td>#SongName#</td>
			<td>#Grade#</td>
			<td>#SkillPercent#</td>
			<td>#EXPoints#</td>
         <td>#Difficulty#</td>
		</tr>
		</cfoutput>
	</table>

This should select all songs for a user for a selected difficulty, sorted by name, and display them into a table. This doesn't select songs by mix or anything so if I had the Songs table populated with every DM song then it would be balls huge. But hey... baby steps.
Image

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 1:00 pm

Code: Select all

   

<cfquery datasource = "#DSNName#" name="ViewUserScoresByMix">
      SELECT *, SUM(Songs.NumberOfPerfect, Songs.NumberOfPerfect, Songs.NumberOfGreats) AS EXPoints
      FROM Scores, Songs, Mixes, SongsInMixes
      WHERE Scores.f_UserID = s_UserID <!--- this is the user's ID as a session variable --->
      AND Scores.f_SongID = Songs.SongID
      AND Scores.Difficulty = <cfoutput>#Selected_Difficulty#</cfoutput>
      AND SongsInMixes.f_MixID = <cfoutput>#Selected_Mix#</cfoutput>
      AND SongsInMixes.f_SongID = Songs.SongID
      ORDER BY Scores.SongName
</cfquery>

I think that'll let you grab songs by mix. Not sure on any of these! I'm very much a "throw some code out there, see what happens, make changes" type of guy.
Image

User avatar
MonMotha
Site Code Monkey
Site Code Monkey
Posts: 2505
Joined: Sun Jan 23, 2005 9:18 pm

Re: SessionRockers.com

Post by MonMotha » Wed Dec 07, 2011 2:42 pm

Are you seriously using Cold Fusion for a new project? What is this, 1998?

And yes, MySQL supports "moonspeak" characters. Just set your collation to UTF-8 or UTF-16LE if you want to be all Windowsish (and piss off everybody normal). I'd really recommend PostgreSQL, though. It's much more fully featured, and I'd be worried about MySQL being a dead end product now that it's owned by Oracle. If you do use MySQL, at least make sure you use InnoDB tables. MyISAM is essentially guaranteed to eventually eat your data.

Also, unless CF does some magic there, it looks like you've probably got some nice SQL injection capabilities going on.

Also, yes, I have some server space. It's not free, but it can be cheap if you don't need a ton of BW or storage. I have Postgres, Apache, PHP, and I think phusion passenger, and I can install other stuff if you need it. If you want a full VM, get back with me in a couple months. If you need a full GUI, I can do that, but the resources required goes up substantially (the GUI is well larger than any of the server software), which of course costs money.
A normality test:
+++ATH
If you are no longer connected to the internet, you need to apply more wax to your modem: it'll make it go faster.
If you find this funny, you're a nerd.
If neither of the above apply, you are normal. Congratulations.

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 4:02 pm

HOW DO I STOPPED SQL INJECTIONS?

How would you do it, Brandon?
Image

User avatar
MonMotha
Site Code Monkey
Site Code Monkey
Posts: 2505
Joined: Sun Jan 23, 2005 9:18 pm

Re: SessionRockers.com

Post by MonMotha » Wed Dec 07, 2011 4:06 pm

Look up "parameterized query". Almost all languages have some sort of support for them. These provided dedicated spots for inputs, and the database layer will ensure that the information is 100% sanitized and cannot cause injection. In many cases, this actually happens by submitting the query without the data in it with the data submitted as a separate list of arguments so that there's no ambiguity from the database's point of view as to what is query string and what is parameter or data.

I'd also look into other frameworks. Rails (Ruby) is popular, but some people don't like it. PHP is an old standby, but it's crufty (not nearly as bad as CF). I've heard decent things about Django (which is Python based), but nothing specific, and I don't know many users of it. I've been told you might also look at Sinatra, which is also Ruby.
A normality test:
+++ATH
If you are no longer connected to the internet, you need to apply more wax to your modem: it'll make it go faster.
If you find this funny, you're a nerd.
If neither of the above apply, you are normal. Congratulations.

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 4:23 pm

http://kb2.adobe.com/cps/300/300b670e.html

Seems simple enough.

Brandon, god damn it, how do I coded PHP? I should probably learn it since it's ubiquitous. Out the door I don't need this to do anything special, just HTML and SQL calls.
Image

User avatar
Fluffyumpkins
Moderator
Moderator
Posts: 6592
Joined: Wed Feb 02, 2005 1:53 pm

Re: SessionRockers.com

Post by Fluffyumpkins » Wed Dec 07, 2011 4:43 pm

Merk wrote:http://kb2.adobe.com/cps/300/300b670e.html

Seems simple enough.

Brandon, god damn it, how do I coded PHP? I should probably learn it since it's ubiquitous. Out the door I don't need this to do anything special, just HTML and SQL calls.
Ruby. It's more hipster.

User avatar
Merk
Lady Banned Son of Switzerland
Lady Banned Son of Switzerland
Posts: 8274
Joined: Wed Feb 02, 2005 9:33 am
Location: Bloomington / Ft. Wayne
Contact:

Re: SessionRockers.com

Post by Merk » Wed Dec 07, 2011 4:46 pm

I started reading about Ruby and shit when I first started working at Apparatus and boy howdy did it have a lot of colons in it.

SCAFFOLDING!
Image

Post Reply