Tuesday, December 22, 2009

Login System

So after much trial and tribulation, I have finally got myself a working login system with extensive form validation and what seems to me to be some pretty hardcore password encryption, as well as the user database set up and running. Pretty impressive, I think, considering that prior to a few days ago I had no idea what a 'salt' was as far as encryption goes. Next up is an email authentication system and a lost/reset password page.

Never in my life have I been so excited about successfully logging on to a page that says nothing but "Member-Only Content Here".

What motivated me to tackle this is I want to get some kind of bare-bones alpha program thrown together and add functionality from there. From my experience working on student games at the Gamepipe Lab at USC, I have learned that this is definitely the way to go when building your game. It's so easy to get lost in perfecting cool details that you never end up with a demo-able game or integration of features (or you run way over if you have a deadline), which in addition to making it hard to show off your work, can create problems when you try to merge things later. Better to see what problems might arise from that process early on before you spend hours and hours perfecting a feature.

As I continue to work on this game, I have the sinking feeling that down the road when I've learned a lot more, I'm going to be doing a LOT of rewriting and/or restructuring code. Oh well, I guess that's what the learning process is all about, and it's better to get in there and get your hands dirty than trying to perfect your plan first. Like Joel Salatin says, "Anything worth doing is worth doing poorly first."

Saturday, August 15, 2009

Breeding Demo

Alright here it is! This is just a little demo that generates 2 random genomes (currently at over 100 base pairs), reads it, shows you what kind of horse those genes make, and then it breeds those two horses and shows you what kind of baby those horses would have! It randomly selects one allele from each parent, just like in real life, so remember the foal you see is just one of thousands that those parents could generate. To randomly generate more parents and see more horses, just refresh the page.

DEMO

Given that the genes are generated completely randomly in this demo, you see a much higher percentage of greys, unusual colors, and high sabino factors (white) here than you will in the game. Also, the only pictures that are done are for those at racing age/racing condition right now. There will be another set of foal pictures and a set of breeding-age pictures in the game.

PNG's suck

Being an artist, a good variety of art in this game is important to me - I want there to be hundreds of unique horse pictures. Rather spending 20 years to individually make all of these, I have opted to use PNG's and their support for transparency so that I can layer white markings on top of base images in combination. Pretty cool. Problem: I have noticed that in the browser, my brown and chestnut look almost identical. In Photoshop they look great, very clearly brown and red, but in the browser everything is desaturated! This turns out to be a problem inherent in the PNG format; without getting too technical, they have issues displaying the correct gamma in a browser. I found a program to adjust the gamma such that my images don't look quite so desaturated, but it's still a problem. I may have to convert my base images to JPEG and just have the markings be PNG. Not a huge loss, but it does mean forgoing the ability to customize the background on the fly...

Tuesday, August 4, 2009

Sorry for the Delay

I was in a motorcycle accident so I've been dealing with that. But the demo really is on the way before too long!

Friday, June 19, 2009

Back from the dead!

Alright we've been distracted for, oh, a year. But now I'm restructuring some code and updating the art, as well as working on a design document that consists of more than my frantic notes scribbled in the same beat-up yellow legal pad we've been carrying around this whole time.

The exciting thing: within a week or so I should have up a spiffy little demo of the genetics/breeding feature where you can pick 2 parents and see what kind of animal they create when bred together (different every time, just like real life). You'll only be able to see the effects of the 20-some-odd genes that affect the pictures, but it should be nifty!

Sunday, June 29, 2008

ITA and "Real Money"

Obviously, there are expenses involved in running any webgame, notably server space (the need for which expands with the number of players and with the number of things that take up space in the database - e.g. horses, jockey silks, etc.).

The goal of the ITA Racing developers is to create a horse racing game that is, among other things, free. We want the game to be playable and enjoyable even if you never spend a penny on it but we also want to be able to support the game with its own earnings. To that end, we've come up with the following system:

The game is free. No areas of the game are restricted to paying players, nor are paying players privileged in the game beyond whatever advantage they obtain from the actual purchased game items. Players have the option to purchase "tokens" (as of right now, they cost $.25, less if purchased in bulk) which enable them to do two things:

-Purchase Reports: The ITA racing database includes information (name, pedigree, race record, color, etc.) on every horse that has ever been in the game, including dead and retired horses. While some of this information is free - clicking on a horse will allow a user to see its pedigree and race record, for example - some of the information has to be purchased with tokens. What we envision is something similar to what is available on real life thoroughbred race/pedigree databases Equineline or BRISnet - users could look up mare's produce records, more extensive pedigrees, sales histories on horses, race records on dead or retired horses, pedigree "nicks" and stallion progeny reports, each for the cost of one token. Once a report is purchased, it can be saved or printed.

-Purchase Game Money: Players who go bankrupt and don't want to sit around waiting for money to re-accumulate, or players who just want more money in the game, have the option of turning tokens into game money.

So readers and potential players, what do you think of this system? Do you think this is fair? Do you see yourself being interested in either use of real money?

Tuesday, June 24, 2008

Breeding and Genetics

I've just finished coding the basic structure of the breeding engine! We're still working on the genome, adding genes as we think up more features, but the machinery that will take two horses and generate a new one is complete and functioning!

The genetics system is very important to ITA Racing. We both studied genetics and want the game to be realistic and fun in this regard. We've got oodles of genes for conformation, color, markings, temperament, muscle fibers, bone density, and metabolism, just to name a few. We've tried to make this as realistic as possible, given that we haven't mapped the horse genome and there's no way we could know exactly how many genes affect every trait and in what way.

One area of horse genetics that we do understand fairly well is coat genetics. For example, we know there is one gene with two alleles that affects whether a horse is black or chestnut. We then have another gene, the agouti gene, that tells us whether a black horse is bay or not, but that doesn't affect a chestnut horse. There are other genes that only come into play on either a chestnut or a bay. We've tried to make this as accurate and interesting as we can, such that if you have a good understanding of real-world horse genetics, you should be able to breed for color (although you'll want to breed for winning races, too!) Here are some of the factors we're including for coats:

Chestnut (bright, regular, or liver)
Flaxen manes
Black
Bay
Dark Bay
Brown
Grey (which will get whiter with age!)
Dilute (which makes Buckskins, Palaminos, Cremellos, etc)
Sabino (which makes body spots, Pintos, and if you are very lucky, the rare White horse)

There are more factors we could include, like rabicano, but it's just too much art for me to make alone! For this reason, we also can't include conformation information in the horse photos, but it will be listed in your horse's information! And every horse picture will show its coat color and markings, like socks and stars, plus reflect its age, meaning there will be hundreds of unique pictures!