PDA

View Full Version : Here is what I want to do with SQL...



BLiZZaRD
01-20-2007, 04:06 PM
Okay, so I have several projects going on and I seem to have spread myself a little thin, that or I am as incompetent as I thought. Either way, new ideas and projects seem to just spring into my head and older projects find new ways to need additions.

I have a small personal project I am just starting, and if all goes well I am looking at about 1 to 1 1/2 years to completion. However, I can't move on until I get this question out of my head:

I am going to be making a self installer for this application (it's a game) and I want a registration of sorts. Basically when you download the exe installer you will get a "password" or registration number if you will. What I would like to know is if it is possible to set up a database where those reg numbers are stored, then when you enter the number in the installer it will check the database. If the number is there it will continue the install, if it is not, it will cancel the install. Here is the bonus trick: a 3 use reg number. Meaning the number given with that particular download can be used 3 times, after the 3rd check of that number in the DB I want it deleted from the database.

So, let's say I have the database set up with 50 registration numbers already in the tables. Then Twey downloads the game and gets the registration number: hg782-p0h48-cc419

He will install the game and will be asked for the reg number. He enters the reg number and it checks the DB, the number is there, and so Twey gets to continue the install. He then passes the .exe and the reg number to John, who does the same thing, who then passes it on to Mike. Once Mike checks the reg number and continues install the reg number is then deleted from the database, so if Mike passes it on the next person would have to get a new registration number.

Does that make sense? And is it possible?

thetestingsite
01-20-2007, 04:32 PM
I wouldn't see why it wouldn't be possible. That is if the exe (auto installer thingy) can connect to the sql database and enter information and delete information from it. Not sure how the exe thing would work though. If it is possible to connect to the database and add/remove entries from it, you oculd make the table structure like this:

key -> used

Example:

hg782-p0h48-cc419 (key) -> 0 (used)

When the installer finds the key in the db, it could check to see the number of uses (used column). If the number is 2, delete the record from the db instead of incrementing it and continue with the install. If the used number is less than 2, you oculd simply increment the number till then.

Just some suggestions if the exe can access the db and do this kind of thing.

BLiZZaRD
01-20-2007, 04:44 PM
Yeah I am not sure of the installers capabilities either, although it has to be possible in some aspect, a lot of other installers check registration numbers. I just can't think of how. I don't know that much about SQL yet.

Twey
01-20-2007, 06:04 PM
It is certainly possible. However, do not directly connect to the MySQL database. This would require distributing your login details along with the executable! Instead, use a separate service (HTTP will do if you can't be bothered to create a dedicated protocol).

Also note that this isn't secure: anybody with some modicum of reverse-engineering experience can change the connection details in the executable so that it points to a different server that always returns true.

thetestingsite
01-20-2007, 06:23 PM
Instead, use a separate service (HTTP will do if you can't be bothered to create a dedicated protocol)

How would you create a dedicated protocol, or; in other words, what's involved with doing this? Also, how would you use HTTP protocol to get the MySQL database information? I have no use for it yet, but the knowledge is good to have for a later date.

BLiZZaRD
01-20-2007, 07:07 PM
It is certainly possible. However, do not directly connect to the MySQL database. This would require distributing your login details along with the executable! Instead, use a separate service (HTTP will do if you can't be bothered to create a dedicated protocol).

Also note that this isn't secure: anybody with some modicum of reverse-engineering experience can change the connection details in the executable so that it points to a different server that always returns true.

Do you have a method that is more secure that will do the same things?

As noted above I have time to play around with this :D

Twey
01-20-2007, 07:52 PM
How would you create a dedicated protocol, or; in other words, what's involved with doing this?Writing a protocol designed specifically for the purpose of checking key validity. In this case, the only thing that need be sent is the key and some kind of ending sequence.
Also, how would you use HTTP protocol to get the MySQL database information?Via a server-side language, just as one does when serving to a browser. The result would, of course, be sent as plain text or binary data rather than HTML, to avoid having to parse said markup.
Do you have a method that is more secure that will do the same things?Bigger corporations than we have tried and failed. :)

BLiZZaRD
01-20-2007, 10:26 PM
Bigger corporations than we have tried and failed. :)


Well, over all I am not all that worried about the hackers, I know they are going to, but if I am going to offer this game for around 5 to 10 bucks, I don't want "unlimited" licenses. This idea is what I came up with off the top of my head and thought it was pretty good. But I also knew it was a first thought.

If you (or anyone else) has other options of limiting an install to 3 licenses per download (or C.D.) install I would be open ears to them :D

Twey
01-20-2007, 11:44 PM
Ah, OK. Your idea is perfectly good so long as you're not worrying about hackers.

I'd suspect that you'd make more money out of the game if you were to release it free and ask for donations.

BLiZZaRD
01-21-2007, 03:19 PM
The reason for the charge is because I am offering it on C.D. Mainly the download will be like an instant thing. Like, download now so you can start playing while we mail you the C.D.

If you know me at all you know I don't charge for anything I do on the websites, but I am not going to take a loss if this game takes off, since I will have to buy all the C.D.s and labels myself :D

There will be extras as well though, so you actually get a lot for your 5 or 10 bucks, not just the game, but any and all updates, an instruction booklet, C.D., case, box, and help (for install or settings etc. probably via email or a small chat application, depending on how much time I have free when it goes public.) I want the game to be as close to you going to a software store and buying an Xbox game as possible, except you don't have to go to the store.

Also, we have plans for a sequel, and (fingers crossed) the ability to bring characters from one to the other, etc. Those that buy the first might just get the second for free... :D But if we ever make any patches, new maps, lands, missions, etc you get those for free as well

Twey
01-21-2007, 03:44 PM
The reason for the charge is because I am offering it on C.D. Mainly the download will be like an instant thing. Like, download now so you can start playing while we mail you the C.D.Hm... wouldn't it be a better idea to just offer the game free for download, but have a CD purchase as an alternative option?

BLiZZaRD
01-21-2007, 04:31 PM
Perhaps, but there are so many other things I want to include in the box with the C.D. that those opting to just get the download wouldn't get all the juicy stuff as well, the things I can't offer through a download.

Still a ways to go on it yet, it's not ready to be released tomorrow or anything, LOL so I have time to think about it all.

Twey
01-21-2007, 04:46 PM
Perhaps, but there are so many other things I want to include in the box with the C.D. that those opting to just get the download wouldn't get all the juicy stuff as well, the things I can't offer through a download.Which only means that people are more likely to buy the CD :)

BLiZZaRD
01-21-2007, 04:48 PM
Good point.

Pros and Cons.. so much to think about, so much to code, so little time.

Can someone pay me about 15 bucks an hour to breathe? So I can stay at home and work on the fun things and still support my family? :D

thetestingsite
01-22-2007, 11:29 PM
Can someone pay me about 15 bucks an hour to breathe? So I can stay at home and work on the fun things and still support my family? :D

One can only dream.

BLiZZaRD
01-23-2007, 12:46 AM
Yes, it keeps me alive.

Dreaming things like that makes me hopeful. I had a friend in 10th grade, we both got jobs. I put out about 50 applications and finally landed my very first job at McDonalds, making 3.25 an hour. Not bad for a 15 year old with no expenses.

My buddy put in one application, got the job and made 17 bucks an hour. Besides making more at 15 than I have even gotten close to as an adult (yet, getting closer :D ) wanna hear what his job was?

He worked in the Lay-Z Boy Factory, testing 1 out of every 15 recliners that came off the assembly line.

That's right.. he got paid 17 bucks an hour to sit in recliner chairs for 30 hours a week.

I would have dropped out of high school, LMAO

thetestingsite
01-23-2007, 12:55 AM
That's too funny. I wish I could've found a job like that at that age. My first job was in construction making $8 an hour when I was 12 (under the table type job of course). Done that until about 2 years ago when I moved to another state. Then when I got up here, I got a job in Technical Support for an ISP in town as well as a job with an Electrical Contracting Company. Starting pay was $11/hour (regular wage). Every now and then we get prevailing wage jobs that pay $37 - $40 an hour. I love those. Anyways, back to the post in hand. I like the idea you got going for this; but just a question, what kind of game is it going to be?

BLiZZaRD
01-23-2007, 01:00 AM
It is a detailed RPG type game, NOT MMORPG, just single player.

But we have a great story line and a very nice ability/level up formula, and I personally think, it is a nice little concept for a game.

Everyone involved in the project loves RPGs, and we all have the same thoughts about how all the ones we liked could be better if this was added, or that was removed, etc. etc.

So we designed our own following those guidelines.

Ever seen Pokemon for the gameboy? It will be a very similar play style to that, with some Final Fantasy type elements and some Dino Crisis extras thrown in.

thetestingsite
01-23-2007, 01:38 AM
Nice. If you need a tester for the game ;) (or any other help with it), let me know and I'll help out as much as I can. Not sure what help I could offer, but it's there. :D

BLiZZaRD
01-23-2007, 01:43 AM
I will keep it in mind.

Have any experience in Flash Action Script?

Actually it's the exe installer I will need done. Lots of research on the end product stuff, but again we are months (read: years) away from that point though :D

Also, I would like this Mac compatible as well, but they don't do .exe files, so what can be done? Ideas on that one?

thetestingsite
01-23-2007, 01:45 AM
Let me look into it and get back to you on that one. As far as Flash, not very good at it at all. The flash on my website was made using SwishMax. Still trying to learn as much as I can.

BLiZZaRD
01-23-2007, 01:52 AM
Cool, you can be our "Team Researcher for Weird and Other Useless Facts".

That is now your title :D Your job will be to find out crap like what type of file do Macs need instead of exe and other trivia along those lines :)

thetestingsite
01-23-2007, 01:52 AM
Sounds good, lol.

Twey
01-23-2007, 06:57 AM
Also, I would like this Mac compatible as well, but they don't do .exe files, so what can be done? Ideas on that one?You probably want a .dmg package.

BLiZZaRD
01-23-2007, 01:14 PM
alright.. will look into that. Thanks Twey.