Game
Education
News
Media
Community
Development
Press Kit
Newsletter

Dev Blog #10 – Teaching a computer English

Tony Dorito - January 5, 2017

DevBlog10Wide

One of our favorite parts of CURE is the ability to engineer your own units. To do this, while playing CURE you can earn items that will allow you to customize your units in pretty unique ways. These items are called genes. Genes may add to stats, add new abilities, and may change how your unit looks and functions. Some genes may only add these additions if certain circumstances are met. For instance, a pretty typical gene might: “If the gene next to this one adds additional HP, then this gene adds an additional 10 HP”..That is a pretty simple example, but genes can be very complex and can make your units very powerful.

 

Genes are generated (using a rather long and complex system that I won’t describe for now) and are random to a pretty impressive extent, allowing for countless amounts of genes of varying usefulness, quality, and power. The problem though with randomly generated items while also having complex and complicated requirement and effects, is having a way to coherently explain to a player exactly what a gene does.

DNA-Layout-Example

Believe it or not, in some instances, it can be harder to describe something to someone else in English, than it is to actually implement it in a video game. It is not uncommon to have an hour long meeting about how something should work, to just turn around and add that change in a line or two of code, spending a whole 5 minutes on it. This type of thing is very true for genes and how they function. Applying a gene to a unit requires a rather complicated amount of logic and defining of concepts,… but it is much easier than having the computer explain in English ‘what’ it is doing and why.

The following code is an example (this is roughly what the current production code in CURE looks like, I have simplified it a bit to try and make it relatively easy to follow, hopefully):

 

if ( nextGene.has(HP) ) thisGene.HP.add(10);

 

With a single line of code, with less than 45 letters and numbers, I was able to properly describe to a computer what I want to do. I want to add 10 to hp on this gene only if the next gene has any HP stat on it. In contrast,… for me to explain it to someone in english (and how we want it to show up in game), it may read:

 

If the next gene has the hp stat, this gene will add an additional 10 to hp.

 

And that takes about 80 letters and numbers (nearly double), and it is riddled with all sorts of neat gotchas.

 

—————————————————————-

 

For instance, by simply changing how many genes you are ‘checking’, you significantly change how the sentence is worded, where this is not the case with programming.

 

if ( nextTwoGenes.has(HP) ) thisGene.HP.add(10);

 

The parts in bold are what have changed. As you can see, not much has changed. In reality, we are just checking two genes now, instead of just the one, so the change is just from ‘next gene’ to ‘next two genes’ which isn’t a huge change.

 

If the next two genes have the hp stat, this gene will add an additional 10 to hp.

 

The parts in bold are what have changed. As you can see, a few things have changed.

So, with English, if you are talking about one or multiple things, sometimes you will use “has” and “have”. Fluent English speakers make these changes without giving too much thought to it, you can easily know intrinsically what ‘sounds right’.

 

For instance, if you didn’t make those changes, and just added the ‘two’ genes part, it would read:

 

If the next two gene has the hp stat, this gene will add an additional 10 to hp.

 

And that doesn’t sound all that good.

 

————————————————————-

 

Or, what if you change how many genes are affected?

 

if ( nextTwoGenes.has(HP) ) nextTwoGenes.HP.add(10);

 

Again, the only real thing that is different is which gene is being changed, and in this case, it includes two genes.

 

If the next two genes have the hp stat, those two genes will gain an additional 10 to hp.

 

Whereas, in English, you can’t really reference multiple things like we did in the prior example by using the word ‘that’; but ‘those’ works really well to reference multiple things. Also, changing ‘adds’ to ‘gain’ just sounds a little better to me.
 
Without those changes, it would read:

 

If the next two gene has the hp stat, that two gene will add an additional 10 to hp.

 

And that doesn’t sound all that good, either.

 

—————————————————————–

 

So, comparing the first and the last examples:

 

if ( nextGene.has(HP) ) thisGene.HP.add(10);

if ( nextTwoGenes.has(HP) ) nextTwoGenes.HP.add(10);

 

Not much has changed. You simply say there are two genes that are being checked and affected. Easy peasy!

 

If the next gene has the hp stat, this gene will add an additional 10 to hp.

If the next two genes have the hp stat, those two genes will gain an additional 10 to hp.

 

In contrast, to say the same thing but in English, many of the words needed to be changed to make a coherent sentence.

 

——————————————————————-

 

And that is just one example of many little English gotchas that we have addressed in creating the gene description generation in CURE. So, at the end of the day if I have done my job correctly, hopefully you won’t ever notice the hours of tedious work that went into getting the descriptions of genes to sound ‘just right’.

 

To our friends from other countries that speak other languages than English, we fully intend on translating CURE into your language when the demand presents itself. We are already considering translating the game into Russian do to our great Russian fans. ???????!


Privacy Policy

If you have any questions about our privacy policy, please feel free to contact us anytime.


We take your privacy really seriously, and we think more websites should too!


We will not share any of your personally-identifiable information (namely street addresses, first or last names, social security number or credit card numbers or even your pets first name) with anybody, not only because we have an aversion with such practices but also because we don't store it so there is nothing to share.


We will not sell any of your information (see cookies, IP addresses, and usage statistics below).


We do not currently advertise on this website, so no advertiser or company will have access to your usage statistics, information or personally identifying information.


When you use this website some information is logged automatically.


Webserver Logs

In order for you to connect to this website (or any website), that website needs to be running webhosting software; This software automatically logs information such as IP Address (see below), the time you accessed this website, what page you accessed and possibly other metrics. The reason for this type of logging is to both check for errors people might encounter when visiting this website and to monitor for hacker activity or potential exploits of our website. This information is used to review the health of our website and for maintenance, information stored in log files are not shared with any third party.


Usage Statistics

We reserve the right to log how a user may use our website (by making note of which things are clicked while you are on the website and when you clicked on them, what browser and operating system you used to access this website, and other non personally-identifiable information). This can be used to help us make the website better by analysing how the website is used and to see which pages on this website require maintenance. This information is not shared with any third party and is used solely my us to review how the website is most commonly used. No personally-identifiable information is collected as usage statistics.


Cookies

Cookies are bits of information that are stored on your computer, which are used when you navigate through a website. Our pledge is to only create cookies (only stored for a relatively short time) which will help your experience on this website and that your cookies are not stored, collected, or sold by this website. Most modern browsers have a way to disable cookies, and you are welcomed and encouraged to do so if you do not wish to store cookies on your computer. Some of the functionality on this website might not work without cookies enabled.


IP Address

When accessing the internet, your computer uses an IP addresses in order to view websites. IP Addresses act like a mailbox- and web pages are like letters. The IP address is a set of numbers and/or letters, and symbols and does not contain any personally-identifiable information in them (for instance, it does not show where you live, your name or other such information). We reserve the right to create logs which contain visitor IP Addresses (see the above: Webserver Logs and Usage Statistics) or use your IP Address to deliver to you custom content. IP Addresses are not shared or sold to any 3rd party and is only used for maintaining this website (see above: Webserver Logs and Usage Statistics).


Children's Information

We believe it is important to provide added protection for children online. We encourage parents and guardians to spend time online with their children to observe, participate in and/or monitor and guide their online activity. This website does not knowingly collect any personally identifiable information from children under the age of 13. If a parent or guardian believes that this website has in its database the personally-identifiable information of a child under the age of 13, please contact us immediately and we will use our best efforts to promptly remove such information from our records.


Website Privacy Policy Only

This privacy policy applies only to our online activities and is valid for visitors to our website and regarding information shared and/or collected there. This policy does not apply to any information collected offline or via channels other than this website. For the CURE game privacy policy please click here.


Consent

By using our website, you hereby consent to our privacy policy and agree to its terms. Privacy Policy Online Approved Site.


Update

This Privacy Policy was last updated on: Wednesday, October 22nd, 2014. Should we update, amend or make any changes to our privacy policy, those changes will be posted here.


Terms Of Use And Forum Rules


Whereas you are welcome to join us in the CURE community forums, the following rules are in place in order to keep the CURE website a fun place to visit.


#1: Do not post hateful (ie: abusive, obscene, vulgar, slanderous, threatening, etc. ) messages.
#2: Do not post any material that may violate the law.
#3: Do not post content which is offensive (namely pornography or gore).
#4: Do not advertise or google bomb.
#5: Do not annoy the moderators. If requested to stop doing something by a moderator, it is most likely because you are being annoying.
#6: Use common sense.
#7: Have fun! This is the internet after all!



Moderators can enforce the rules as they wish. They can give warnings at their discretion, but are not obligated to. Your ability to use the forums or access the website can be revoked, for reasons stated or unstated. We hope for the forums to be a place of free speech and fun, and these rules are in place to keep the place from burning down. Our motto is: minimum enforcement for maximum fun!


CURE Newsletter Sign Up



Name

Email address

How did you find out about us?

Submit


Thank you for signing up for the CURE Newsletter!