Saturday, November 17, 2012

Exploits and Bugs Assignment


This was my assignment for the first week of my class and I felt like it made a good blog post so I hope you enjoy!


Pick a game you've played and discuss two bugs or exploits you encountered while playing. You will need to play close attention in order to find some of these bugs, but they are there. Write 250 words with your analysis. In order get full credit the analysis must include:
  • Title, genre, and platform of the game
  • How much time you played in order to discover 2 exploits
  • Full description of the bugs - what happened, when, where, what were you doing
  • Discuss if the bugs are software or design related
  • Suggest a possible solution for the bugs 



                As I began thinking about this assignment I was going over various exploits that I had found and used or decided against using more than particular bugs I had found.  Since the main two things I’m going to describe are exploits I will also include a third encounter with an easily explained bug I stumbled into.

                The first exploit I’ll get into is the simpler of the two and one I discovered completely on my own.  Skyrim is an enormous open world role-playing game which allows you to play in a ton of different ways.  It has more rich content than any other game I’ve played; it follows that it’s also one of the buggier games due to that though.  I play it on the PlayStation 3 and discovered this with my second character, so probably between twenty-five and thirty hours of gameplay.  The exploit is quite simple: when you pay a trainer to teach you, upgrading your skill, the money goes into their inventory and when those trainers are your followers you can access that inventory retrieving that money.  So one of the early followers, Faendal, can train you in archery up to I believe 50 skill level.  You can only be trained five times per level but near the start it doesn’t take much more than that to level up.  Faendal can be you follower and then after you train, ask to trade some things with him and take your money right back.   Not only does this allow you to level up very quickly, you also get a useful, if not main, combat skill upgraded.  Personally, I decided not to use this since it cheapened the game for me.  I tend to feel this way about exploits but for the most part I don’t mind them being in a game.  This one would be a pretty easy to fix one though as it’s a design feature.  You could simply remove the gold from the world entirely when you pay for a trainer though this would slightly lessen immersion since it would just vanish.  A better solution would be to put that money into the same type of inventory that keeps their clothes and extra weapons.  For example, Faendal will always have a set of clothes, a dagger, and a bow no matter how much you take from his inventory.  Then, you could have that gold drop should you choose to kill him.  The inventory you can access could be more of what he’s holding for you.  He wouldn’t likely just give you back all the money he earned from teaching you after all.  The gold could also be reset every so many in game days as well, just like most containers in the game.

I can never decide if he bothers me or not...
Ah well, better than Sven! Bloody Bards -.-
                This next exploit is quite a bit more complicated so I’ll try to keep it simple.  Fire Emblem on the Gameboy Advance is a tactical/strategic role-playing game.  I discovered the feature (as it is intended, just not exploiting it) on my own after about maybe 4 hours in or so the first time I lost a character.  When I restarted the game, it loaded right before the fight and I just lost the character again.  In essence I had discovered the slightly less than random Random Number Generator (RNG from now on).  I didn’t really understand though and only got a better inkling later when I leveled up after a fight and had almost nothing upgrade for my character. I wanted to make sure I hadn’t done something wrong so I looked it up.  I only properly understood with a fair amount of research about it on my part.  Fire Emblem uses a series of numbers previously generated that range from 0 to 99.  Every time there is a random event in the game such as hit chance, critical chance, chance of a special one-hit-KO activating, stats improving at level up, etc. it uses one to two numbers.


The method for exploitation comes from the numbers all having been set up before you start and using the movement paths to figure out if they are generally “high” or “low”.   Say one character can move five spaces.  You set the movement path as one right, one down, two left, and one up.  You have used the max amount of movement to go one space left.  If you move the path one more space up, what path will be drawn?  Will it be up then left or left then up?  The creators decided to use the RNG to determine this.  If the next number is “high” (50-99) it will be left or right first and if it is “low” (0-49) it will be a vertical path first.  So you save the game (it autoaves after every confirmed action) and check movements from which you can get a list of high or low values.  Then you reset the game and you have a general list of all the random rolls you’ll get.  It’s impossible to be perfectly precise but this is still a huge advantage.  In fire emblem, lower is better.  If the chance of getting a crit is 25 percent then a value below 25 will succeed.

To use this knowledge you can either figure out the projected battle outcomes or use it to dramatically improve your stat gains.  The latter is more interesting and the only thing I considered using it for.  First, get a character close to level up and next to an enemy they can kill.  Then make a list of high and low values from the paths and find a string of mostly low values (7 is the best since that is how many stats might be improved).  Then you work backwards; you attack first, the hit chance is calculated with two numbers in every game released outside Japan, and if you hit, then there is a number for the critical chance.  If the enemy survives then they get the same thing (if they miss, there isn’t a number used for the critical roll) before a second attack that once again uses 3 numbers.  So if you are killing the enemy with one move it will only take the 3 numbers before.  If, however, you are killing them after their retaliation then it will be seven to nine numbers before (depending on if you miss the first attack and if they hit). Once you figure that out, you load up the save before you calculated the numbers and use the same trick of the path to use up the numbers before where the attacks should start.  After all your work, the character will level up and get a large number of their stats increased making them much more powerful than they would probably be.

This would make me smile.
Personally, I find this exploit to be not only a ton of work but not important.  I find it more interesting to have the random aspects of the leveling up prevalent.  It increases both excitement and replayability for me.  If the makers wanted to take this capability out of the game there are a few methods I thought up.  You could have the numbers recalculated every time you load up the game but then people could do something similar where they just keep reloading to get a good outcome.  A much better and simpler method would be to have the paths prioritize going either horizontal or vertical (I’m partial to vertical).  Then there would be no way to determine what the RNG numbers are even generally and it would be as if the game was generating a number every time.

Now, as I mentioned, I did want to do a third one quickly on the bug I found a while back.  My sister and I were playing Lego Harry Potter, an action adventure game, on PlayStation 3 when we encountered a game-breaking glitch.  We were playing very thoroughly and it was around 75 percent of the way through so we had probably played somewhere around 15 hours.  This was a software glitch, unlike the last two exploits.  We jumped into a trapdoor, down into a secret area.  It autosaved as we entered that place but after solving the puzzle, the thing that was supposed to bounce us up and out didn’t actually get us out, just up.  No matter what we did, we couldn’t leave that small room and since it had saved, there was no way to continue.  We had to quit and eventually play back up to that point.  They did fix this but at the time it was completely awful.  To fix it, I assume they fixed either the launcher or the room exit location so that it would actually get you out when it was supposed to.

Sirius only kind of dies. Cause... He's a Lego.


All RNG details were obtained from:
               
                “Random Number Generator FAQ” by Misael Villegas
                http://faqs.ign.com/articles/520/520430p1.html

Wednesday, November 7, 2012

On Magic

    I was having trouble thinking up something to talk about for this blog but I still felt like writing.  I wanted to type and I wanted to create.  There really wasn't anything coming to my head though so I decided to go back to some old topics I've considered writing on.  Now, I'm no expert by any stretch of the word on writing.  Despite that, I'd like to talk about magic systems in writing.  Most specifically "soft" and "hard" magic systems.  A lot of this information and these opinions are from a small work Brandon Sanderson did called "Sanderson's First Law" and I may touch on some topics he wrote in his second law as well.  Here's a link if you'd rather read about the laws: http://brandonsanderson.com/article/40/Sandersons-First-Law.

    So magic is incredibly interesting.  In many novels it is the driving force behind all the politics, adventure, mysteries, etc.  Magic often helps if not outright carries the plot.  This isn't a bad thing necessarily!  In the Harry Potter Books, magic is so central to everything in the wizarding world and all the story can be linked to magical events or magic itself.  Harry Potter is also fantastic so this clearly isn't bad.  Magic is a wondrous force of some kind that helps define the fantasy genre though isn't required for it.


    Let's look at what I mentioned briefly: soft and hard magic.  Nothing about magic is defined in reality and fantasy can throw out the rules it wants to anyway so long as there's a good enough explanation.  However, some magic has very little explanation and this is called soft magic.  A lot of Sanderson's first law deals with how much characters can rely on the magic for your plot to be successful.  The less well explained the magic is the less it can be relied on or it will feel too much like deus ex machina.  That doesn't mean soft magic systems have no place in books mind you!  Just that the heroes can't solve all their problems with it.  For example, in Lord of the Rings there isn't much explanation of what Wizards are or how they do their magic nor the elvish magic.  Despite this there is well used magic throughout that doesn't hurt the story.

    An example of hard magic that comes to mind is in one of Sanderson's books, Mistborn.  Other than that I'm having trouble thinking of any good examples...  In Mistborn, the magic system is called Allomancy and the rules are defined very sharply.  They are also pretty simple for the most part and it's in tandem with everything else that makes it exciting.  There are also a few unexplained (to start) exceptions to the rules that keep a good amount of mystery.


    Most magic systems are much more in between than these examples and lean one way or another.  Harry Potter has a pretty soft magic system.  Some things are explained but for the most part you can do whatever you'd like with magic. However, the characters cannot due to skill or experience so they still have to rely on using other things to solve their problems quite often.  An example of a mostly hard magic system is the alchemy in Fullmetal Alchemist.  You could actually make an argument that this system of magic is entirely a hard system but it's tough to draw any lines with these.  In Fullmetal Alchemist you are able to transmute a set of materials to their equivalent in a different form.  If you want to make wood you need the proper elements to do so: to my knowledge that's entirely hydrogen, carbon, and oxygen.  So if you take something with carbon such as coal (which also has hydrogen and oxygen by the way) with the right amount of water you could create a tree.  Which means you could also create paper or a clock's body (you'd probably need metal for the gears).  However, it takes a lot of study as well to not only know how things are composed and work but how to concentrate just right with the magic symbol thing (transmutation circle).  They don't ever really explain why those are necessary (I don't think) nor why the main character doesn't need one.  So there are soft elements to the system, it isn't utterly explained.  Also, as a side note, what energy does it use to fuel the change?  Is it something inside the alchemist?  And what makes the glow?!


    I have to say, I enjoy hard magic more than soft magic as the constraints make for the most interesting methods and situations.  For example, should you not have as much mass as the person you are "pushing' in Mistborn you will go flying backward, not them, but if there is something with more mass like a building or the ground on the opposite side then the other person will go flying.  This allows for not only interesting battles but also clever tricks like using coins on the ground to "jump" around the city.  The possibilities for situations are incredible as well as difficulties for the characters in other ways.  In essence, I like what the constraints add to the story and the feel of the magic over the wonder and potential power given by most softer systems.  Hard magic makes me think and it makes my mind fly through possibilities then the author surprises me with their use anyway.  It's clever and exciting!

    One last thing I want to mention is the main aspect of Sanderson's Second Law: "Limitations > Powers".  In essence, it is the limitations of magic that often make them interesting.  Using Mistborn as an example again, the allomancer needs to have the metal (we'll go with steel for this one) ingested.  Steel allows you to use your weight to push on metal with your own mass (as well as mass that affects you like a wall).  However, you cannot push on metal inside someone else.  You only have your own mass to work with and you have to face the consequences of pushing something greater than you.  You only have a certain amount and the harder you "burn" it the faster it runs out.  In addition, extended use can have serious consequences on the body (shown with other metals more often).  You cannot surpass the limitations here and that adds so much that you can barely even think of to the action and the story.  This also means, the stronger something is the more its limitations have to be.  For example, Atium is the strongest metal to burn but burns out the fastest making it more of a trump card than a way to win every fight.


    I'd say read the laws for yourself as they are interesting and think about the magic of books you like.  Do you tend to prefer soft magic systems or hard magic systems?

Sunday, November 4, 2012

Vaelina Watched

    Vaelina sat at in her chair by the window watching.  Crying.  Her voice caught in her throat, now hoarse from yelling in vain.

--------------------------------------------------------

     She had been looking out her window for a while now.  It was a hobby of hers to look out after dinner and watch the sunset.  Before then she would watch whatever caught her fancy and if she felt like it maybe she would draw some smaller things.  She had always been fairly privileged.  Some might even call her spoiled though no one had dared say so to her face.  She watched as an insect skittered across the sheet of glass that helped keep her from getting chilled.  Vaelina's father was the owner of a large portion of land and could afford rare luxuries such as glass for the main house.  The insect stopped moving as it reached the edge blocked by a small ledge.  It was nothing to someone the of her height.  She doubted she could trip on it if she tried.  Of course, she's also have to be able to walk on the window.  As she watched, the insect tried to climb up the comparably imposing ledge but as it struggled to gain traction it lost what it had on the glass and fell.

    Eyes following the small bug, Vaelina caught sight of one of their slaves, Shem, standing up in front of Torim, the manor's current slave keeper.  Shem was a kind man who was often the first to laugh and had told her many stories and fables over the years.  She often recalled his tales of life before working for them and how his eyes sparkled with something she could never place.  Now his eyes were filled with something else.  It was something darker. Something Vaelina had never seen before.  

    Shem spit directly into Torim's face with malice.  Torim reeled back in disgust wiping the saliva from his cheek with the sleeve of his jacket before launching himself forward.  As his fist crashed into Shem's jaw, dropping the large man, Vaelina stepped back from the window.  However, as terrified as she was, she couldn't tear her eyes away from the scene below.

--------------------------------------------------------

    Shem tried to stand but as his lifted himself Torim's boot crashed into his chin from the side, causing his teeth to slam through some of his cheek.  He coughed, spitting up blood and tried to stand once more.  Torim knelt down next to him and grabbed the back of his hair, lifting his head by it.  He whispered something into his ear and scowled before slamming him back into the ground face first.  Cartilage cracked as his nose broke and his vision swam.  He collapsed to the floor for a moment but pride wouldn't let him stay down any longer.  He put his hand down to push himself up but halfway a boot smashed into the same spot.  Shem let out a howl and his back arched in pain as Torim's heel ground the bones if his fingers into the ground.  His lost all strength and collapsed back down but the horror wasn't over.  The heel lifted but quickly returned, just as hard as the last time, crushing his fingers against the hard ground beneath.  

    Stunned, Shem lay there as Torim circled to his feet.  Nothing happened for a moment but the reprieve was short, broken by a flash of pain even more intense than the feeling in his hand.  Torim pulled back sharply and the claws of his whip, embedded into the top of Shem's back, tore free pulling strips of skin and muscle with it.  Blood arced through the air, following as if reluctant to sever the connection with the now missing flesh.  The skin on his back screamed along and his voice channeled the feeling.  His back felt... looser.  The skin no longer tight across his muscles.  The ends of the whip snapped back into Shem's back hitting his side this time, digging into the area under his ribs.  He had hoped the pain would be less this time but was disappointed.  He would continually be disappointed as the taskmaster's whip continued to tear his back to shreds eliciting screams of pain that reached far into the twilight.  

    After what seemed like hours of pain to Shem, Torim walked around to his front and gestured to two other nearby slaves who cringed instinctually but dutifully, fearfully, came over and picked him up but his arms.  Shem's hung there limply, groaning as blood flowed down his legs.  His shirt was falling off and any skin that remained on his back hung off of him limply.  Torim came up in front of Shem and punched him in the gut causing more blood to leave his mouth.  He didn't even notice as some of it landed on the boot of his assailant.  Whether that would have satisfied anything in him or just filled him with terror no one could say.  Casually, Torim reached up with his hands to the sides of Shem's head, and swiftly twisted.  Shem's pain faded from his eyes and his body somehow slumped even more in the other slaves' arms becoming literal dead weight.  

    In a quick gesture, Torim tilted his head back and to the right toward's the lake.  The slaves carrying Shem quickly complied almost running to go dump yet another mutilated body in the waters.  Torim walked back toward the house where Vaelina's father was sitting in the porch's shade with his wife.  He sighed and lightly shook his head at Torim's actions.  Now he needed to buy a replacement.

--------------------------------------------------------

    Vaelina sat at in her chair by the window watching.  Crying.  Her voice caught in her throat, now hoarse from yelling in vain.

    Eyes red from her tears shed for the slave, Shem, she managed to shuffle over to her bed before collapsing onto it.  She tried to remember the twinkle of Shem's eyes and the sound of his laughter but it was lost.  All that could come to her mind was his flattened hand, the thunder of the whip's crack, his body's limpness after his neck was broken, and the piercing screams of pain.  She still heard them in her head and they wouldn't stop.  Delirious, uncontrolled screams that drowned out all other thoughts.  Choking on her sobs she cried herself into a fitful sleep.