GTP event data entry project

  • Thread starter Vaxen
  • 61 comments
  • 4,343 views

Vaxen

GTP Race Admin
Moderator
3,118
United States
Sunnyvale, CA
GTP_Vaxen
This is a call for ideas, discussion, and above all, volunteers to help in a project to help automate the data entry associated with GTP race events, especially of the official variety.

Currently, when someone wants to run an event on a GT game (currently most activity is on GT5p and GT4), the event rules are posted in a thread, and times/results are submitted either by a post in the event thread, or by PM to the event organizer. For smaller events, this works fine, but for larger events, it ends up being a huge task for the event organizer, especially if the event in question requires PM submissions. This doesn't even take into account the hassles in dealing with incorrect data, or submissions which are sent to the wrong place, use the wrong format, or violate other rules.

So the idea is to craft a web front end (likely using php) to a backend database (likely mysql), possibly (eventually) interfacing with the GTPlanet bboard (vbulletin) (for user information, if nothing else).

Administrators would need to have the ability to set up new events, validate results, request more information from a submitter, publish results, and possibly do multi-event collation as well.

Users would need to be able to enter results (TT and online race results), upload replays, view results, and ideally run some reports on the event database.

The tool should also be able to recognize when multiple or updated results are entered for the same event/race, and flag any conflicts or collate the results if no conflict is found.

So again:
- Ideas
- Discussion
- Volunteers

If you'd like to volunteer, please describe briefly your experience level with the tools at hand, and also the amount of time you'd be able to contribute to the project. Personally, I've been a professional programmer for 20 years, but my php/mysql/vbulletin skills are admittedly at the novice level.

I'll keep a running list of those involved:
- Sphinx (alpha user)
- Vaxen
- P3nT4gR4m
- Suede53
- Ardius
- Bigracer (beta user)
- letdown427
 
Last edited:
i've been working on 1 already. Not much is done, only the database and main layout.
I have been busy, and when not busy is was too lazy.

http://dhost.info/gt5pmeeting/organiser/

Basicly I wanted to make an organiser where everyone can make races.
The database also allows organising of championships.

Races can have different restrictions (cars, drivetrain, etc...)

I was thinking of asking Jordan to make a php class where I can login with a username and password so that he can still have control of login security.
 
Last edited:
i've been working on 1 already. Not much is done, only the database and main layout.
I have been busy, and when not busy is was too lazy.

http://dhost.info/gt5pmeeting/organiser/

Excellent!

Consider yourself drafted!:D

Note: everyone will have different amount of time and/or energy they can dedicate to the project. Also, if you'd prefer to do your own thing, that's fine too. Hopefully, with a group effort, we'll end up with something that's useful to everyone, and especially the WRS and/or GT5p registry staff/stewards.
 
I'd be interested in helping out when and where I can. I'd have to knock some rust off my PHP skills but I'm game. I'm a sys admin by day and I've been programming off & on for 15+ years. Give me some beer and Google and I can hack something together with best of them! :dopey::cheers:
 
I'm all up for new programming experience, so a 👍 from me. Just hope I can contribute something useful as I am a complete beginner in anything except basic Java.
 
I'd be interested in helping out when and where I can. I'd have to knock some rust off my PHP skills but I'm game. I'm a sys admin by day and I've been programming off & on for 15+ years. Give me some beer and Google and I can hack something together with best of them! :dopey::cheers:

I'm all up for new programming experience, so a 👍 from me. Just hope I can contribute something useful as I am a complete beginner in anything except basic Java.

More draftees for the pool! 👍

I'll be working on a schema for the php database. This should be pretty straightforward. A friend pointed me at CakePHP as an easy way to take a simple database and wrap a front end around it. Pentagram is working on a more sophisticated php interface as well.

Time I have to dedicate to this project will be on the lean side until the weekend, but I'll do what I can.
 
As a former business consultant and absolute techno noob I don't understand too much of what needs to be done here :) but maybe that's also because nobody already knows how the private rooms will work.

What I did so far is talk to Jerry and Luxy/Luke, the latter of which once set up the leaderboard for GT4 WRS that I try to maintain in cooperation with fellow WRS friends like Jump_Ace, Jake and EDK.
The result of that contact is that Luke thankfully :bowdown: copied the GT4 WRS environment to a new GT5P environment where we can keep the scores for the weekly events in Prologue. He reprogrammed it so that we can use 5 instead of 3 divisions. Thanks for that Luke 👍

What I'm worried about is that in the new setup there will probably be so much participants that it will be VERY time consuming to enter all the splits by hand, so I'm really interested where Vaxen's great initiative will end.

If work needs to be done I can find a lost hour here and there to help.
 
As a former business consultant and absolute techno noob I don't understand too much of what needs to be done here :) but maybe that's also because nobody already knows how the private rooms will work.

What I'm worried about is that in the new setup there will probably be so much participants that it will be VERY time consuming to enter all the splits by hand, so I'm really interested where Vaxen's great initiative will end.

If work needs to be done I can find a lost hour here and there to help.

Manual data entry sucks. :ouch:

Since racers have to enter their times anyway, the goal is to skip the data copy step. Computers are better at that sort of thing than people.

I'll add you to the list of resources! 👍
 
Personally I'm working on some php classes which is a sorta half step on from Dustdriver's use case diagram and covers most of the stuff in the spec and fleshes some parts of it out a bit.

Vaxen: Check the script I PM'd you for ideas on the schema - most of my classes directly translate to db tables so if we keep our heads together on this one it'll probably happen a lot faster wth the two sections going in unison.

Note: I'm still very much finding my way with this PHP dev (been working on a work related ordering and doc management system since about dec last year. I'm still not down with MVC methodology and templating so if someone else is then please step up to the plate.

I have been in databases, managing and querying for about 15years tho so I know what I'm doing on that side.

I've been involved in a community-based project before, namely Sourceball (a half life 2 mod) which died a death because of too many chiefs and not enough indians-syndrome. This project, whilst being much smaller in scope, could still face the same issues that killed Sourceball so may I respectfully ask that we keep this team down to a minimum. It's not a big job, so it won't take a lot of bodies to make it happen.

What (I personally think) is required most urgently is someone with experience writing/implementing vbulletin modules. Knowledge of the api specifically would help a lot.

Also someone who can give us a test server with php5/mysql and access (through yourself if necessary) to the configs.

The rest we would seem to have pretty much covered.

I can handle the coding of the LeageTable classes in conjuction with whoever else can write a handler for the vbulletin requests (user session read and module add) if no one else can do it I'll be able to work it out.

Same with the interface which, in leu of a vbulletin specialist, I'll just do the old fashioned htm/css way and hope that we may be able to integrate this into the forum at a later date.

Worst case scenario- the users will be required to maintain a login session on the LeageTable board as seperate from here. (not really major)

here's the nerd bit. I was bored today at work so I knocked this together. It's off the top of my head so might not be the best possible way to do it. Still needs a lot more properties for each of the classes so.. ideas on a postcard

*hasn't been run yet so it's prolly full of syntax nixes

PHP:
<?php

// ===============================================================

class award{
	// ===============================================================
	//                                                     Properties
	// ===============================================================
	private $AwardID="new";
	private $AwardName;
	private $Points;
	
	// ===============================================================
	//                                                   Methods
	// ===============================================================
	public function __construct($AwardID="new",$AwardName,$Points){
		$this->AwardID=$AwardID;
		$this->AwardName=$AwardName;
		$this->Points=$Points;
	}
	// ===============================================================
}

class driver{
	// ===============================================================
	//                                                     Properties
	// ===============================================================
	private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
	private $DriverID="new"; // TODO: Connect to Vbulletin for this field
	private $DriverName;
	private $Division;
	private $SubDivision;
	private $PSN;
	
	// ===============================================================
	//                                                    Methods
	// ===============================================================
	public function __construct($DriverID="new"){
		if($DriverID!="new"){
			$this->LoadItem($DriverID);
		}else{
			$this->
		}
	}
	// ===============================================================
	public function loaditem($DriverID){
		include_once "dbconnect.php";
		$mysqli=dbconnect();
		$sql="SELECT * FROM drivers WHERE DriverId='$DriverID';";
		if ($result=$mysqli->query($sql)){
			$row=$result->fetch_assoc();
			$this->DriverID=$DriverID;
			$this->DriverName=$row['DriverName'];
			$this->Division=$row['Division'];
			$this->SubDivision=$row['SubDivision'];
			$this->PSN=$row['PSN'];
			$this->modified=3;
			return true;
		}else{
			return false;
		}
	}
	// ===============================================================
	public function saveitem(){
		include_once "dbconnect.php";
		$mysqli=dbconnect();
		// Case for New/Modify/Delete or Unchanged
		if ($this->Modified==0){
			$sql="INSERT INTO drivers (DriverName,Division,SubDivision,PSN) VALUES ('{$this->DriverName}','{$this->Division}','{$this->SubDivision}','{$this->PSN}');";
			if($mysqli->query($sql)){
				$this->DriverID=$mysqli->insert_id;
				return true;
			}else{
				return false;
			}	
		}else if($this->Modified==1){
			$sql="UPDATE drivers SET DriverName='{$this->DriverName}', Division='{$this->Division}', SubDivision='{$this->SubDivision}' WHERE DriverID='{$this->DriverId}';";
			if($mysqli->query($sql)){
				return true;
			}else{
				return false;
			}
		}else if($this->Modified==2){
			$sql="DELETE FROM drivers WHERE DriverID='{$this->DriverID}';";
			if($mysqli->query($sql)){
				return true;
			}else{
				return false;
			}
		}else{
			// Record exists but is unchanged - no need for DB write
		}
	}
	// ===============================================================
	public function promote($DriverID){
		//TODO: Shift driver from one division/subdivision to another
		$this->Modified=1;
	}
	// ===============================================================
	public function demote($DriverID){
		//TODO: Shift driver the other way 
		$this->Modified=1;
	}
}

class result{
	// ===============================================================
	//                                                     Properties
	// ===============================================================
	private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
	private $EventID;
	private $Position;
	private $DriverID;
	private $Time;
	// ===============================================================
	//                                                    Methods
	// ===============================================================
	//TODO: Methods
}

class event{
	// ===============================================================
	//                                                     Properties
	// ===============================================================
	private $organisers=array(); // TODO: connect this to vbulletin for things like PM's and administrator $_SESSION
	private $modified=0; // flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
	private $EventID="new";
	private $EventDate;
	private $EventTime;
	private $CloseDate="none"; // After this new drivers cannot signup
	private $MaxEntries="none"; // Once reached new drivers cannot signup
	private $EventName;
	private $Results=Array(); // Array of result objects
	// ===============================================================
	//                                                    Methods
	// ===============================================================
	//TODO: Methods

}

class division{
	// ===============================================================
	//                                                     Properties
	// ===============================================================
	private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
	private $DivisionID="new";
	private $Drivers=array(); // Array of Driver Objects
	private $Events=array(); // Array of Event Objects
	// ===============================================================
	//                                                    Methods
	// ===============================================================
	//TODO: Methods

	
}

class leaderboard{
	// ===============================================================
	//                                                     Properties
	// ===============================================================
	private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
	private $Divisions=Array() // Array of division objects
	// ===============================================================
	//                                                    Methods
	// ===============================================================
	//TODO: Methods


}

?>
 
Personally I'm working on some php classes which is a sorta half step on from Dustdriver's use case diagram and covers most of the stuff in the spec and fleshes some parts of it out a bit.

Vaxen: Check the script I PM'd you for ideas on the schema - most of my classes directly translate to db tables so if we keep our heads together on this one it'll probably happen a lot faster wth the two sections going in unison.
Pent,

Your schema is a great starting point. Some things still need to be fleshed out, and I think we need a couple more tables (such as "car" and "track" tables for clarifying events and restricting cars).

For the Event table, we'll need the ability to identify whether results are private or public (conceal or display time and/or splits, allow/deny access to replay). Events may also consist of a series of races, rather than a single event (TT). Events should also have optional tuning restrictions as fields.

For the results table, we'll also need the ability to enter multiple splits as well as a final lap and/or overall race time. We should also allow players to attach a replay to this record, and the race and/or league administrator should have the authority to validate/invalidate any given result entry.

We'll also need to facilitate correlation of multiple entries for the same race event by different users (this happens commonly in GT5p race events we've run in the past), including cases where each user gets only partial results. I don't have any good ideas currently on how to do this, except perhaps by correlating results by time.

All that said, I know your schema was just a rough draft you banged out quickly. I suspect you have the most experience of anyone currently on the project, so you'll likely be doing most of the heavy lifting. :crazy:

As you say, this is a pretty small project. I think once we get something up an running, if it ends up being used and improved, the too many chiefs won't be a huge issue. If that one too many chiefs is me, then I'll gracefully bow out. :sly:

Anyway, thanks for your effort up to this point. I think we'll end up getting this up and running pretty quickly with your help.
 
Manual data entry sucks. :ouch: Since racers have to enter their times anyway, the goal is to skip the data copy step. Computers are better at that sort of thing than people.

Amen :D

The weekly race series leaderboard was a quick and dirty hack done in a couple of days that's managed to hang in there for more than 3 1/2 years. I'd love to see something better replace it 👍

The most complicated thing about the leaderboard (and the reason I never replaced it) was figuring out how to deal with all the different possible race structures - Hotlap, Race, Multiple Hotlaps (i.e a forward and a reverse hotlap), etc. You want to collect split times for hot laps, but probably not for races. You want to collect individual lap times for races, but it's probably too much data to enter/display for races longer than a few laps. I could never figure out a sane UI or schema for entering and storing the data.

FWIW, a few of the things on my wishlist:
* display the "perfect lap" based the best split times from all drivers (for hotlaps)
* let drivers enter their lap time/total time, but hide it until the race deadline (this would allow unofficial results to be displayed automatically after the deadline passes, without having to wait for the organizer to post the results).

Any idea on a timeline for this project?
 
FWIW, a few of the things on my wishlist:
* display the "perfect lap" based the best split times from all drivers (for hotlaps)
* let drivers enter their lap time/total time, but hide it until the race deadline (this would allow unofficial results to be displayed automatically after the deadline passes, without having to wait for the organizer to post the results).

Any idea on a timeline for this project?
Luxy, this wishlist stuff is gold. For the tool to be useful, it has to solve the hard problems that race organizers face. Knowing the problems you encountered lets us address them.

For timeline: Too early to tell, as we're still gathering information and resources. Best case, something would be up in 2-4 weeks, worst case; 2-4 months.
this stuff all sound great but also confusing right now, will it be simplified later?

Data entry for racers should be very simple and straightforward.
 
Just looking through the leaderboard source, and remembered a couple of other bits worth mentioning:

  • Each track has a different number of sectors, and some tracks have too many sectors to display them all (the Nurburgring has the most, 11), so race organizers should be able to choose a subset to be entered/displayed.
  • Divisions may be used to organize entries by skill level(like the WRS), or to organize entries by car classes (i.e. different spec/tune levels within the same race).
  • Organizers should be able to choose whether final times are displayed during the event or not.
 
Last edited:
The most complicated thing about the leaderboard (and the reason I never replaced it) was figuring out how to deal with all the different possible race structures - Hotlap, Race, Multiple Hotlaps (i.e a forward and a reverse hotlap), etc. You want to collect split times for hot laps, but probably not for races. You want to collect individual lap times for races, but it's probably too much data to enter/display for races longer than a few laps. I could never figure out a sane UI or schema for entering and storing the data.

Shouldn't be a problem, all we need is a template system and a whole bunch of property flags for the object to decide how to treat an event. If someone could send me a list of event types and notes about their particular idiosyncrasies I'll try and work out the code from there. Don't worry about missing types out - we'll be able to add to these as and when

display the "perfect lap" based the best split times from all drivers (for hotlaps)

easy :)

let drivers enter their lap time/total time, but hide it until the race deadline (this would allow unofficial results to be displayed automatically after the deadline passes, without having to wait for the organizer to post the results).

For the Event table, we'll need the ability to identify whether results are private or public (conceal or display time and/or splits, allow/deny access to replay). Events may also consist of a series of races, rather than a single event (TT). Events should also have optional tuning restrictions as fields.

Because I'm new to this community, the only event I've ever seen actually done, is the qualifier so secrecy will be an option. Even when the event is finished, there's no reason anyone has to see the results, the object will work out the winners behind the scenes. Of course I'll add an option in to display times during, after or never.

Any idea on a timeline for this project?

At a guess - anything from a couple of weeks to a couple of months. Should be this year at the outside

Just looking through the leaderboard source, and remembered a couple of other bits worth mentioning:


[*]Each track has a different number of sectors, and some tracks have too many sectors to display them all (the Nurburgring has the most, 11), so race organizers should be able to choose a subset to be entered/displayed.

The sectors wil be added into a 2-d array of driver times so the array can be any size. If there's a hundred sectors we'll be able to store them. Geting the contestants to enter them will be another matter :crazy:




[*]Divisions may be used to organize entries by skill level(like the WRS), or to organize entries by car classes (i.e. different spec/tune levels within the same race).

noted 👍

[*]Organizers should be able to choose whether final times are displayed during the event or not.

Covered above

Pent,
Your schema is a great starting point. Some things still need to be fleshed out, and I think we need a couple more tables (such as "car" and "track" tables for clarifying events and restricting cars).

I thought about that but I'm not sure if we need to go that far. I'll include a spot for text-entry race rules where the organiser can write what they usually write about the event and rules. Other than that I think it'd just be a lot of data entry for not a lot of return functionality wise. As always, tho, I'm open to convincing (perhaps I just don't realise the potential)




For the results table, we'll also need the ability to enter multiple splits as well as a final lap and/or overall race time. We should also allow players to attach a replay to this record, and the race and/or league administrator should have the authority to validate/invalidate any given result entry.

good ideas - noted


We'll also need to facilitate correlation of multiple entries for the same race event by different users (this happens commonly in GT5p race events we've run in the past), including cases where each user gets only partial results. I don't have any good ideas currently on how to do this, except perhaps by correlating results by time.

Not sure I'm following you - can you elabourate?

All that said, I know your schema was just a rough draft you banged out quickly.

Very much, there's still a lot to add (keep them coming)
 
I've been programming for the last 3 years (2 years full time as a software developer)

Done Open University courses in Javascript, C++, SQL, and use VB.Net / SQL Server 2005 mainly at work.

I probably can't offer much to the php side of things, but ideas / testing / some code I'm happy to offer.

A thought, with the uploading of replays possible, there'll be a way of getting the lap time / split time out of the replay file.

I'm happy to have a look into this if it's deemed worthwhile? Might save a lot of data entry for people, as it'll contain the GTP_Registry ID, times, car, track, event type etc already...

I'm at work at the moment, I'll try and grab hold of a GT5P replay from somewhere and have a quick look.
 
I've been programming for the last 3 years (2 years full time as a software developer)

Done Open University courses in Javascript, C++, SQL, and use VB.Net / SQL Server 2005 mainly at work.

I probably can't offer much to the php side of things, but ideas / testing / some code I'm happy to offer.

A thought, with the uploading of replays possible, there'll be a way of getting the lap time / split time out of the replay file.

I'm happy to have a look into this if it's deemed worthwhile? Might save a lot of data entry for people, as it'll contain the GTP_Registry ID, times, car, track, event type etc already...

I'm at work at the moment, I'll try and grab hold of a GT5P replay from somewhere and have a quick look.

That'd be a really neat function. If you can put a parser together in C++ I'm sure I can translate it into php pretty easily. I wouldn't be surprised if the replay files are encrypted somehow tho but good luck anyway.
 
Does anyone have GT5:P available at the moment?

I really need a known replay to look at, i.e one where we already know the lap time, event type etc. so I know what I'm looking for.

I've managed to find one of an Event online, but I don't know what the time is to see if I can see anything...

A PM is probably better than clogging the thread, although maybe post it here so that if other people want a look they can.
 
Last edited:
I think I'm just going to continue working on mine.
Doesn't matter if it isn't going to be used in the future, but spent to many time on that already to just disregard it.
 
I think I'm just going to continue working on mine.
Doesn't matter if it isn't going to be used in the future, but spent to many time on that already to just disregard it.

Noted, DustDriver.

Even if you don't contribute directly to this project, any ideas you have, or problems you've encountered that you expect we'll be facing, please feel free to post them here.
 
@letdown427 : Attached you will find a zip file that contains a lap F430@suzuka "Replay" and "Save best lap/Ghost". I've pm-ed you the T1/T2/Final times . Best of luck with the whole project. :dopey:

This is A LAP for the GTP qualifier, but it isn't THE LAP that i used. (because we aren't allowed to discuss lap times :sly:)
 

Attachments

  • gt5p_replay_and_ghost.zip
    273.5 KB · Views: 14
  • ghost_bestlap_small.jpg
    ghost_bestlap_small.jpg
    46.7 KB · Views: 20
  • replay_small.jpg
    replay_small.jpg
    40.8 KB · Views: 15
Last edited:
what exactly will this turn into when its done, i'm still not quite sure.

Basically, from your point of view it will be a webpage where you input stuff like laptimes and submit replays and stuff.

The event organisers (yourself included if you feel like it) will use it to set up events. They will choose the type of events, from menus, including number of drivers, date and time, heats, specific divisions allowed to compete .. etc. All the kind of crap that they have to decide on at the moment.

When they press the "Go" button a bunch of pm's will be sent out with a link to the event where you will be able to signup for it (if necessary) and then post laptimes (if it's a time trial), replays, reports and the like.

This system will keep track of the prize winners and I've included a simple points system which will accumulate as you win prizes. eg. 1st place might award 3 points, 2nd - 2 and 3rd - 1. Or whatever so you'll have a kinda overall score and a trophy room to check out all the prizes/cups and medals you've won. The really industrious mods can include pics of these or choose from defaults.

It'll do a whole bunch of other stuff that gets suggested and included and all that rigmarole but in a nutshell that's what I'm trying to accomplish. I'm pretty sure Vaxen is on more or less the same page as I am. Not sure about anyone else.

Tonight I managed to run a test where I created a new driver, a new prize and then awarded the prize to the driver. Might not sound like much but that's the story so far.

Since this is the coding forum and in case anyone is interested - here's the test session

Code:
========== New leaderboard object instantiated ================
modified: 0
Divisions

Array
(
)

Events

Array
(
)

Drivers

Array
(
)

Awards

Array
(
)

==== Adding Pigsy Mustang to $leaderboard->Drivers ==========
modified: 0
Divisions

Array
(
)

Events

Array
(
)

Drivers

Array
(
    [0] => driver Object
        (
            [modified:private] => 0
            [DriverID:private] => new
            [DriverName:private] => pigsy mustang
            [Division:private] => unseeded
            [SubDivision:private] => unseeded
            [PSN:private] => GTP_P3nT4gR4m
            [ForumID:private] => P3nT4gR4m
            [Awards:private] => Array
                (
                )

            [Points:private] => 0
            [Modified] => 0
        )

)

Awards

Array
(
)

============= Lets give this asshole a prize =================
============ First we need to invent an award ================
We'll make one directly for this test but these will be done through the events interface

modified: 0
Divisions

Array
(
)

Events

Array
(
)

Drivers

Array
(
    [0] => driver Object
        (
            [modified:private] => 0
            [DriverID:private] => new
            [DriverName:private] => pigsy mustang
            [Division:private] => unseeded
            [SubDivision:private] => unseeded
            [PSN:private] => GTP_P3nT4gR4m
            [ForumID:private] => P3nT4gR4m
            [Awards:private] => Array
                (
                )

            [Points:private] => 0
            [Modified] => 0
        )

)

Awards

Array
(
    [0] => award Object
        (
            [modified:private] => 0
            [AwardID:private] => 999
            [EventID:private] => 666
            [AwardName:private] => teh Fugly Cup for not so pretty people
            [Points:private] => 3
            [WinnerID:private] => none
            [Image:private] => 
        )

)

============ Award now has no winner ================
====== new Driver has no awards and no points =======

============ Now we present the award ================
========== Leaderboard now looks like this ===========
modified: 0
Divisions

Array
(
)

Events

Array
(
)

Drivers

Array
(
    [0] => driver Object
        (
            [modified:private] => 0
            [DriverID:private] => new
            [DriverName:private] => pigsy mustang
            [Division:private] => unseeded
            [SubDivision:private] => unseeded
            [PSN:private] => GTP_P3nT4gR4m
            [ForumID:private] => P3nT4gR4m
            [Awards:private] => Array
                (
                    [0] => 999
                )

            [Points:private] => 3
            [Modified] => 0
        )

)

Awards

Array
(
    [0] => award Object
        (
            [modified:private] => 0
            [AwardID:private] => 999
            [EventID:private] => 666
            [AwardName:private] => teh Fugly Cup for not so pretty people
            [Points:private] => 3
            [WinnerID:private] => new
            [Image:private] => 
        )

)

Award now has winnerID "New" this couldn't happen because it'll be impossible to give an award to a user who has not been created in the database and given an ID. For the purpose of the excercise this is a success

Using the class I've been working it took 25 lines of code to produce this. 20 of those were comments and debug info. I'm quite chuffed with the days work so I'm off to play GT5P now - see you at Suzuka :P
 
Vaxen
We'll also need to facilitate correlation of multiple entries for the same race event by different users (this happens commonly in GT5p race events we've run in the past), including cases where each user gets only partial results. I don't have any good ideas currently on how to do this, except perhaps by correlating results by time.

Not sure I'm following you - can you elabourate?

Earth ran a race series in NTSC, and it was up to the participants to post the results. A good example of this can be found in this thread. Players submitted their own results, and some only captured incomplete or inconsistent results for the same race.

Oh, that also brings up the question of race series, and point allocation. This could be done manually, of course, but being able to have the database automatically assign points would be a bonus.
 
Earth ran a race series in NTSC, and it was up to the participants to post the results. A good example of this can be found in this thread. Players submitted their own results, and some only captured incomplete or inconsistent results for the same race.

I think regarding online races that it's best if everyone submits their own finishing position only. It's less work for the competitor. There will always be inconsistencies in positions - 2 people will both think they finished 1st. In the event of such a clash the event Organiser will be alerted and have to override based on however these things are usually dealt with (barenuckle fight to the death anyone?) If, however, there are no clashes then the system will know who's won already and prizes can be awarded with no need for user intervention.

Oh, that also brings up the question of race series, and point allocation. This could be done manually, of course, but being able to have the database automatically assign points would be a bonus.

Good point - I think I should be able to group a bunch of events under a series object with scores, heats and all the usual malarkey but for now this is potentially going to add a layer of complexity I can personally do without so I'll leave that idea on the back burner for the moment. Series will still be doable just by the organiser opening multiple events and keeping track of the state of play himself but this is not ideal - depending how much work it turns out to be I can look at either including this feature or leaving it for ver 2. I'd rather get a working version out the door, reasonably quickly than have to delay for a couple of weeks while I sort out something like this.

Of course sometimes these things sound iffy but when I look at them it's a ten minute job so fingers crossed.

I'll have most of the weekend to work on this so I should have most of it done by monday, depending how much of the time gets sucked into playing GT5P :sly:
 
@letdown427 : Attached you will find a zip file that contains a lap F430@suzuka "Replay" and "Save best lap/Ghost". I've pm-ed you the T1/T2/Final times . Best of luck with the whole project. :dopey:

This is A LAP for the GTP qualifier, but it isn't THE LAP that i used. (because we aren't allowed to discuss lap times :sly:)

Just fast looking over the files in the zip-container i found the folowing:

Locatie: Suzuka Circuit
Auto: Ferrari F430 '06
Tijd: 2'14.844
Professional, S2/S2
Ver. 2.20.4055114

in PARAM.SFO

This is clearly just the data you can see when you manage the saved files, and was just extracted using a simple hex-editor. If you know what you are doing, it should be possible to find even more I would guess :D

/PalleRaa
 
Just fast looking over the files in the zip-container i found the folowing:

Locatie: Suzuka Circuit
Auto: Ferrari F430 '06
Tijd: 2'14.844
Professional, S2/S2
Ver. 2.20.4055114

in PARAM.SFO

This is clearly just the data you can see when you manage the saved files, and was just extracted using a simple hex-editor. If you know what you are doing, it should be possible to find even more I would guess :D

/PalleRaa

That's blindingly good news! Have you tried looking for the splits? They're probably buried in the min replay file if they're there at all. Just as likely they're calculated on the fly :nervous:
 
That's blindingly good news! Have you tried looking for the splits? They're probably buried in the min replay file if they're there at all. Just as likely they're calculated on the fly :nervous:

I haven't dug too deep into this yet but a quick glace with a hex editor and it doesn't look like much is in there. From what I understand of how the replays are handled in GT, I'm not surprised either. I'm fairly certain that they're calculated on the fly... :grumpy:
 
I haven't dug too deep into this yet but a quick glace with a hex editor and it doesn't look like much is in there. From what I understand of how the replays are handled in GT, I'm not surprised either. I'm fairly certain that they're calculated on the fly... :grumpy:

The only other way of doing it would be counting 'ticks' these may be marked in the stream somewhere - look for a regularly occurring character as a terminator then find out if the number of these correlates to the actual lap time. From there you could count in the number to a known sector time and then see if there's any kind of sector marker (just as likely ther wont be). You'd have to try this on a couple of replay files to see if you've got the characters right.

Also bear in mind that a bunch of the data is going to be car setup and whatnot so you'll have to isolate the contol inputs stream first.

Glad I never volunteered for this detail - is there an oldschool hex cracker in the house?
 
Last edited:
Back