Tuesday 29 March 2011

IDAT204: Garry's Mod Race Event

For our project we decided to follow the second pathway and host an event in a Virtual Social Environment. The environment we chose was Garry's Mod where we invited players to design and build their own vehicles to take part in a race. The reason we chose Garry's Mod to host such an event is because the player can build his or her vehicle using a variety of objects and it is so popular these days that there would be no end to the list of potential people willing to take part. These objects too are of course also available to us to build the race track so we can customise the course in any way we feel to make it interesting for the people taking part.

Friday 18 March 2011

IDAT209 - The Six Wedges Website

The website was the part of the project that I was assigned to do. It uses php and mysql to store and display players' profiles and statistics.

First things first I had to code the html and forms that would be used for users to log in and register etc. I knew that when I took on the responsibility that this would probably be the easiest part of the coding this website. Next I created the database, I decided that I would go with four tables. One would be a player's table that would hold all of the user's details such as the emails and passwords and they would be assigned a user ID as this will be useful for later. The next table I made was the category table so I can assign them ID numbers aswell to make things easier for the questions table. This table has rows for category id, the question, the correct answer and the four possible answers. Finally I created a progess table that tracks how the players are doing. Each question has 4 states, not seen, seen and not answered, answered wrongly and answered correctly. Now we have the tables set up we can start coding the php.

First I did the login system which checks the players table for what the user types into the text boxes and if its the same as what is in the table. Next was to set up the registration page, this pulls in what the user has typed into the text boxes and adds a new entry into the players table. Now that was out of the way it was time to start coding the most important page the question page. This is where the user would be taken once the QR code has been scanned, to get this to work I needed to display data from the questions table to show them and once they've been answered I needed to check the login details and then update the progess table to say whether they have it right or wrong. The hardest thing about this page was what to do if it wasn't a returning user but a new one looking to register. To bypass this I used the same form as the login but added a tickbox and asked the user to tick it if they were a new user looking to register, if this was ticket I needed to add a new user to the players table and update their progess table aswell, this took my a fair amount of time to complete but eventually worked fine.

I'm quite pleased with the outcome of the webpage and its probably the hardest thing i've had to code so far. I managed to get my heard around it but there were parts where I had to get help with to finish. All it needs are the usual finishing touches such as css and a few things to be ironed out but its essentially finished.

Friday 11 March 2011

IDAT209 - The Six Wedges Concept

So what is the six wedges? Its the name of our game which is based on trivial persuit. What our game is, is using QR codes and the university campus as our game board, and hosting all of the questions and everything else will be a website that uses php and mysql. The players will scan a QR code using their mobile phones and that will take them to a question where they can answer and then enter login details or if they haven't registered they can do that aswell.

Scattered all over the university campus there will be 6 QR codes for the players to find and therefore 6 questions to answer. Once they have answered one question from all 6 categories correct they have won the game.