Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Randomization Generator...
nol
post Feb 13 2008, 11:29 PM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 255
Joined: 27-May 07
Member No.: 43,758



Ok, the title is a little...ya, anyways, I'm in desprate need for somebody to help me with this script im trying to write (dunno even where to start) I know exactly what i want, so ill tell you. But what I want to know if this could easily be done, and if so, how?

Ok, this is exactly what I want

A clan is created (finished this part of the script)
Now, the leader of the clan, can challenge a clan (this part I can do)
The leader of the other clan, can accept the challenge, when this is done, a randomization code is started. It randomizes two things, Map played on, and Gametype. Now, this is not actually starting a game or w/e. THis is for a halo 3 clan thing. It chooses from the gametype database i made, which gametype and which map. Then it displays You will play
Round 1: [gametype] on [map]
Round 2: [gametype] on [map]
Round 3: [gametype] on [map]

Now, I really don't need the random gametype part, as itll be like

Round 1: Team slayer on [random map]

etc, but for round 3 i'll need the random gametype. I'll probably keep the info on a table or something in mysql or w/e, and ill try and delete it when I can or something so ya. Is there anyway I can do this?
Go to the top of the page
 
+Quote Post
KansukeKojima
post Feb 14 2008, 12:30 AM
Post #2


Privileged Member
*********

Group: [HOSTED]
Posts: 519
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



QUOTE


I believe that this should cover it... of course, you'll have to modify some of the general pieces of it to suit your needs... but on the whole, the idea itself should work.... I mean... you'll have to add a file writing section to the code, etc... you probably get the idea.
Go to the top of the page
 
+Quote Post
nol
post Feb 14 2008, 02:02 AM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 255
Joined: 27-May 07
Member No.: 43,758



hmm, do you think id be able to do a insert command? like...

i would randomize it, and then, it would insert it into the database? such as a registration code would? (not talking about login or anything) like do you get what I mean? Im wondering if that would/could even work. It would be somewhat complicated though. Not this portion, but displaying the information, however i think it wouldnt be too hard. I mean, it would just enter the data into rows right? hmm..thank you for that smile.gif if someone just has a script or could tell me what functions I could use to place this information into mysql, that would be great!
Go to the top of the page
 
+Quote Post
jlhaslip
post Feb 14 2008, 04:10 AM
Post #4


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,844
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Rough outline of a Normalized Database Schema I'd look at for this would be something along these lines"
CODE
Table - Map
      map id
      map name
      map info and description

Table - Gametype
      game id
      game name
      game info and description
      
Table - Clans
      clan id
      name
      description
      leader name
      email
      wins
      losses

Table - Challenges
      challenge id
      clan1 name
      clan2 name
      clan1 issue challenge date/time
      clan2 accept challenge date/time


Table - Games
      game id
      clan1 id
      clan2 id
      challenge
      game number
      game type
      game map
      score clan1
      score clan2


define the maps and gametypes
define the Clans
Clans issue challenges
Clans accept challenges

Randomly select 3 gametypes and maps --> this is where you need the randomization script

play the challenge and record the scores

Update the wins/losses


Would probably not need a whole bunch more than this to Admin the process, but some of the Reports might get a little hairy. Compound Joins, etc, but should be doable.
Go to the top of the page
 
+Quote Post
nol
post Feb 14 2008, 09:27 PM
Post #5


Super Member
*********

Group: [HOSTED]
Posts: 255
Joined: 27-May 07
Member No.: 43,758



hmm the biggest thing im having a trouble grasping is, would it be easier to have one database, for the whole site, and multiple tables, or many databases, for more organization. If i were to do the second one, would it work to have transfers from databases, and to connect to two different databases on one thing? I think I'll go towards the first one, where theres all the user info, clan info etc. Also, I can't grasp how I will show like the members in a clan. I don't really know at all how I'd do that, I like your set up jl, I might go with that, but I just don't see how I could work the members in a clan in. Unless I'd create a new table for every clan, which in that case that would take a lot of database space wouldn't it?

Also, the system will run on a HONESTY system. Where, both teams report the scores after all 3 matches have been played.

Clan 1
Round one: (scores)
Round Two: (scores)
Round three: (scores)

Clan 2
same thing

if something is clashing like the scores are different, a email will be sent (this I can probably do) and a administrator checks bungie.net for true game records. If one clan doesn't do the scores in within two hours of the first clan to put theirs in, it automatically goes as a win for the first team (or basically whatever they got)

Hopefully this might be a little more detailed when it comes to the outcome of a match. However, for the clan challenges. Basically, on the forums they post a topic, another clan accepts, and then the clan sends the other clan a clan invitation. The invitation will be a generated message, they say what time they want etc, and the other clan accepts. The clan challenge will show up on both clan's recent games, however outcome will be a - . Until the game is done, and over with. Then itll say W for win L for loss. When the clans do it, the same thing will show up next to recent games, next to the - itll say Details, itll show the following somewhat:

Round one: [Gametype] on [map] - [outcome here]
Round two: etc
Round three: etc

and basically that. Later I'll probably add where it deletes this info after 48 hours, and puts it in their record etc. Does this help you ?

This post has been edited by nol: Feb 14 2008, 09:34 PM
Go to the top of the page
 
+Quote Post
KansukeKojima
post Feb 14 2008, 09:29 PM
Post #6


Privileged Member
*********

Group: [HOSTED]
Posts: 519
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



another method.... depending on how complicated you need it to be... you could use flat-files... unless it needs to be really complicated... then don't use them.
Go to the top of the page
 
+Quote Post
jlhaslip
post Feb 14 2008, 09:32 PM
Post #7


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,844
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



simply add a Member Table to the above layout with their Clan id in their profile
Go to the top of the page
 
+Quote Post
nol
post Feb 14 2008, 09:38 PM
Post #8


Super Member
*********

Group: [HOSTED]
Posts: 255
Joined: 27-May 07
Member No.: 43,758



QUOTE(jlhaslip @ Feb 14 2008, 09:32 PM) *
simply add a Member Table to the above layout with their Clan id in their profile

oooh thats sneeky little man....never thought of that, so what you mean, is like I add a table like...

clanmembers
id
clanid
username
rank

etc?

hmm thanks smile.gif hopefully i can get this randomization script working then. Haven't really tried it just yet.
Go to the top of the page
 
+Quote Post
jlhaslip
post Feb 14 2008, 09:44 PM
Post #9