A starting point...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ToOSk3tChY
    New Member
    • Jun 2015
    • 6

    A starting point...

    Hello Bytes Community,

    I am not programmer at all. I run a free forum as a hobby for organised racing and I'm just managing with HTML and CSS right now. I've been doing this since January, never touched a line of HTML really until then but I'm enjoying learning as I go.

    So... this post is just a different method I'm trying, to see if I can get a start on somethings that I am planning next for the forum.

    First of all it's a leaderboard page but driven by a live timing feature so the tables can kind of self serve and be instantly updated. I spend so much time with excel sheets its painful. I imagine the leaderboard page itself having access to current and historical events(through drop downs). Site leaderboards as well and access to a live timing section where members can watch lap times come in and positions in the race.

    The reason for posting in the 'mysql' section is because I think I'd need somewhere for all the data but that's all I know and how on earth do I get access to the data on my console live. I really am an amateur/hobbiest but I'm passionate about this feature.

    The platform is Xbox One. The game is Project Cars.

    To have something like this would be huge for any organised racing site and propel the participation level from the community to another level.

    Does anyone know how to make something like this work?

    Apologies if I seem like a crazy person here.

    Thanks
    2S
  • computerfox
    Contributor
    • Mar 2010
    • 276

    #2
    Welcome to Bytes.
    Is the site hosted on Xbox One or is the racing done on Xbox One?
    If you're hosting the forum on a third party server, it would definitely have this feature already.
    If you are using a package such as PHPBB, it would also have that functionality. What do you have so far? Do you have a site that we can view? Are you collecting the data in the Excel then updating the hard coded HTML?

    This sounds like a fun and small project. Very doable. Yes, the easiest way to go is MySQL, but you would need to know some PHP since the database is in the backend. HTML and CSS will definitely not be enough if you want to have a database in the backend.

    You would then need to layout the database. I suggest having at least 2 tables, one for users and the other for races.

    Code:
    users: id, first, last, age, sex, city, state, zip, country,car_number, last_updated_date
    races: id, city, state, country, race_name,race_date,last_updated_date
    laps: id,lap_number,race_id,user_id,lap_time,last_updated_date
    You can have other tables, but those would work great, I think. Note that all of those fields can be char(80), except for:

    Code:
    last_updated_date timestamp default now() on updated now()
    id int(120) not null primary key auto_increment
    So your create queries should be:
    Code:
    create table if not exists users(id int(50)not null primary key auto_increment,first char(120),last char(120), age int(3) default '0',sex char(1) default 'M',city char(120),state char(120),zip char(7),country char(3) default 'USA', car_number int(4), last_updated_date timestamp default now() on update now(),unique(first,last))
    
    create table if not exists races (id int(50)not null primary key auto_increment,city char(120), state char(120),country char(3) default 'USA', race_name char(120),race_date char(20),last_updated_date timestamp default now() on update now(),unique(city,state,race_date))
    
    create table if not exists laps(id int(120)not null primary key auto_increment,lap_number int(3),race_id int(50),user_id int(50),lap_time float(3,2),last_updated_date timestamp default now() on update now(),unique(lap_number,race_id,user_id))
    Next, put together the PHP, connect the database, maintain the database, and you have a pretty nice dynamic website. You could also have some JavaScript to update every minute or so to fetch the most up-to-date leaderboard.

    Comment

    • ToOSk3tChY
      New Member
      • Jun 2015
      • 6

      #3
      This is great news,

      To answer a couple of questions.

      The site at the moment is hosted by proboards.
      digitaltimeatta ck.proboards.co m

      The game is played on the xbox one and I want the live timing on the site. Not sure the site is suitable though.

      Thanks
      2S

      Comment

      • ToOSk3tChY
        New Member
        • Jun 2015
        • 6

        #4
        what I am doing at the moment is embedding excel online sheets. If I edit them through onedrive then they update automatically on the site but its still a bit of a cumbersome task as I have to check several data sources first then rearrange my sheets(i could probably format the cells better but I want to move away from this, as you know).

        Cheers

        Comment

        • computerfox
          Contributor
          • Mar 2010
          • 276

          #5
          so i took a look at the site and i'm guessing you already have an admin panel. do you know if you have any access to the backend database? if not, then you'd have to set up at least a landing page that would have the leaders board. it would also help when viewing on the xbox so you don't have the full forum.

          Comment

          • ToOSk3tChY
            New Member
            • Jun 2015
            • 6

            #6
            I do have an admin panel but there's no access to a backend server, I've just checked on their support forum.

            I'm seriously considering moving the site over to phpbb now. I don't anticipate it taking me long replicate over there(other than users needing to sign up again). I can easily redirect users to the new URL from the old site anyway. Obviously this will cause a major disruption however, its for the greater good of the site and traffic is very low right now and has been for a month or so.

            So lets say I use phpbb.com or prophpbb.com(I' m actually considering these first). Do I have access to backend servers with them straight away? What would be the first thing I should look at after setting the site backup? I'll try and reach this point and then come back to you.

            Cheers

            Comment

            • ToOSk3tChY
              New Member
              • Jun 2015
              • 6

              #7
              How would the landing page suggestion work as well? I am trying to research this as well.

              EDIT: Would vBulletin be a decent choice of forum hosting do you know?
              EDIT2: Forget vBulletin. its too pricey at this stage.

              Cheers

              Comment

              • ToOSk3tChY
                New Member
                • Jun 2015
                • 6

                #8
                I just discovered that there's no API software for PCARS on XB1

                Shame but looks like this idea is a no go. Head of studio confirmed it on their forum.

                Thanks for the help anyway

                Comment

                • computerfox
                  Contributor
                  • Mar 2010
                  • 276

                  #9
                  Hey just came back to this thread. Sorry, busy weekend with some personal projects.
                  Like I said in the beginning. You can have a free MySQL database of your own and then using PHP, build a one page thing to show the standings. Make sure that the right table is up-to-date and let the PHP code do the rest. You wouldn't need to hard code the table. Add JavaScript to add an update for every minute or something.. Keep in mind, if you don't want to spend money, you will need to learn some new things, otherwise, you need to pay someone to do it. Even if you take someone else's product, it might not work as you want it and you're also depending on the other person's coding ability.

                  In one hand, you don't just get a product for free, but you learn a lot and on the other you pay someone else lots of money and you have no clue what it does.

                  Comment

                  Working...