Red Dead Redemption Vs Tales of Phantasia

Disclaimer : I usually post about technical web stuff, but this time I'll digress and share my thoughts about two games I'm currently playing. Feel free to skip reading this text if you're not interested in my inner gamer voice.

I started Red Dead Redemption on my PS3 a few weeks ago. I also play Tales of Phantasia on my Dingoo on my way to work and back home everyday.

Those two games are very different, almost completly different, but in a way, I can't stop comparing one to the other.

Overview

Red Dead Redemption is a "next generation" game, with great graphics, motion capture, voices, and so on. It is a free roaming game, a GTA like, made by Rockstar game. Instead of sandboxing in a big city with your car, you're sandboxing in the far west with your horse.

Tales of Phantasia is one the latest JRPG released on the SNES. It is in the direct vein of gems like FF6 or Secret of Mana. Big story involving saving the world, defeating bosses, gaining experience, learning new technics and magic, etc.

Storyline

Being a free roaming game, RDR does not have a fixed storyline. You can do quests in different order, depending of the people you run into. Of course, some parts of the main storyline only unlock themselves when a set of missions are finished. There is also a lot of sidequests, given by NPC randomly popping. It gives a general impression of freedom and self-living world. You can easily play for one hour, doing one or two missions.

The main character, John Marston, is not very talkative, so you don't know much about him. I haven't finished the game yet but I expect its story to be revealed the more and more I play. As a side effect, I don't really feel close to John, it only is my avatar in the game, and I help him. I feel more like watching a movie than playing a game.

Tales of Phantasia is way more classic. You are the son of one of the four warriors that saved the world decades ago. The evil magician Dhaos that your parents defeated is now back on course and its your duty to fight him and defeat him once again. You start as a simple boy, win experience and battles, meet people and learn more about what your parents did.

There is a certain amount of freedom in the way you can explore the world map and go to places where the scenario didn't yet ask you to go. Nothing to compare to RDR of course, but in a game of this time, you appreciate it. There are no invisible walls telling you "You can't go there", only signs suggesting that "This area is for the more experienced".

I only have played a couple hours so far, but I like the way the story is told. People that have known your parents told you what they did, who they were, where they've been, etc. The story is still following the rails of the scripted scenario but does so in an elegant way.

Note : The previous JRPG I played, Final Fantasy, was waaaaay more strict on its storyline order, so my appreciation of Tales of Phantasia might be biased due to the comparison.

Graphics

RDR takes advantage of the PS3 power. All characters are animated using motion capture and voiced dialogs, making the world seem real. Animation are still a bit sluggish at time, and always done directly in the game engine. It keeps consistency, but the engine seems a bit dated.

I usually am a PC player, I've played Bioshock and Crisis when they came out in maximum quality, so I'm not easily impressed by graphics rendering. The only game on the PS3 that impressed my was Uncharted 2 and RDR is absolutly not up to that standard. RDR is like most of the games I've played on PS3. It has "honest" graphics : not ugly, but nothing breathtaking either.

LOD handling is pretty bad in my opinion. When riding your horse in the desert, grass and bushes flashes in view from simple LOD to fully detailed in a split second. It defeat the whole purpose of LOD in my opinion, which should be done using a smooth transition between the two.

Also, during cutscenes, when the camera change angle (moving from a close shot to John, to a shot to the person he's talking to for example), the LOD kept flashing. Everytime the camera change, you see the building in the background displayed as big blocks of colors then fully detailed, and on the next camera change you got them again from big block to details, even if they are the same building in the two shots. All that goes very fast, but I kept noticing it. Worse, sometimes buildings are exactly on the limit between rough and detailed so they kept flashing from one to another.

Overall, I'm not satisfied with RDR graphics. They definitly are not ugly but are just above average and this is not RDR strong point.

One can wonder how I can even compare a full 3D game with an old 16bit RPG. I am not comparing the two, I'm comparing each one to what the standard are for the machine they are running.

Tales of Phantasia is the more detailed RPG I've ever played on a 16bit console. The attention to detail is amazing. Each house, each city is fully detailed. There are fires burning in the chimneys, flowers on the tables, painting and cracks on the walls, carpets on the floor, etc. No two houses are the same, and the furnitures placed in each are done so in a logical way : the exact number of beds for the people living in a house, no house without kitchen, etc.

For a 16bit game, I must say I'm impressed. There are details everywhere, from hanging ropes in boats to patch of flowers and rocks on roads, it is really refreshing. When visiting a boat, the screen moves to emulate the rolling of the waves. This is no big deal but this is kind of details I appreciate.

Shopping UI

One thing that strike me as odd is how hard it is to sell goods in RDR. When speaking to a merchant, you can select goods you wish to sell and press X to sell them. If you have multiple goods of the same kind, you can select a few or all at once. The strange thing is that you can't select different goods at once, you have to do it one by one (and you usually have a lot of different goods coming from skinning various animals).

Worst, goods you sell do not disappear from the list, they are just marked as "Sold", you have to manually select the next in the list to proceed. And as the list is more like a grid, you can't simply press down to sell the next item, you have to select it in the list. To make it even a little more frustrating to use, everytime you sell an item, a little animation is played, freezing your UI for a second.

Such an UI would never have passed quality insurance tests if the game had been developped for a PC audience. I do not understand why crappy UI is considered normal for console players.

The shopping UI of Tales of Phantasia has nothing awesome but is just well thought. Presented with a list of goods to buy you can select the desired quantity of each, see the total amount and make adjustement regarding your current cash level. You also see the current number of each item you already own. As I said, nothing extraordinary, just really well thought and very practical.

Screen resolution and hardware power has absolutly no influence on the greatness of UI here.

Music

RDR music is honest, there isn't any theme that get stuck in your mind after playing, but the various ambiances are pleasant and strike our common imaginary background of the far west.

Tales of Phantasia music is also classical JRPG music, with some great songs, but the important point here is that they managed to make wonder with the small audio capabilities of the original console. Some music at some important points in the story have digitalized voices. Yeah, really. This is not crystal clear voices as a CD would allow today, but it is clear enough so you can recognize the melody and words (well, if you understand Japanese...).

Also, even if each city has its own theme, you sometimes encounter NPC in those cities with their own themes, and the two musics blends into one other when you approach the NPC. It is something common in today games, but the first time I see it in a 16bit game.

Frustration

I have been very frustrated playing RDR. A lot of little things that add up and degrade my playing experience. Here are some random rambling :

I've failed a large number of missions because I strampled over pedestrian while galloping with my horse. In one mission, I was asked to save three horses from a barn on fire. I saved the first two by slapping them on the back so they can go out of the barn. For the last one, I had ride it and jump over the fire to get out. I did just that and jumped out of the barn and got a "Mission failed" screen. Wait, what ?

It appeared that I assaulted one of the farmers that was trying to help. This dumbass was standing right in the spot where the mission asked me to jump, so when jumping over the fire I ran into him and the game considered it an assault, failed the mission and made me try it again.

This isn't the only grudge I have with horse. There are a couple of weird stuff occuring with the way horses are handled in the game. During a mission, one of the NPC rode my horse instead of his own, so when I whistle my horse back, another one came instead. As fast as my horse, but with a totally different color.

I once whistle for my horse that came galopping to me, running right past me and went splashing in the river, dying instantly...

Speaking of rivers, this is something really frustrating. Your character can't swim, actually as soon as he got water above the waist, he drowns. Even on horseback : water rise to your horse collar and your waist, and you drown. That is both stupid and frustrating, dying for something that you absolutly can't imagine the first time it occurs to you.

Funny story

On an other occasion, I saw two guys shooting a third one trying to escape. I thought they were bandits trying to kill an innocent traveller, so I shot them. Bad choice, they were deputies trying to kill a bandit... I lost some honor in the process and the bandit turn back on me, trying to kill me after I saved him.

A few hours later, same scenario. Two guys trying to kill a lone one. Based on my previous experience I decided to kill the escaping bandit. I lost honor too. It appeared it really were two bandits trying to kill a traveller this time... Of course the two bandits didn't thank me and started shooting me. So I had to kill them too.

Third time, same scenario, two guys shooting a third fleeing one. This time I decided to wait a little and hear what they had to say, to better understand who they were and take side with the good guys this time. I didn't have time to think too much, because a few seconds later the third guy was dead, killed by the other two. And I lost honor too. Grrrr. They were bandits and I let them kill him an innocent man.

Last but not least I encountered those three guys one last time. This time I saw that it was two deputies, asking me to help them capture the escaping bandit. Ok, this time it was clear. I decided to catch the bandit with my lasso (getting bounties alive gets you paid double). I catched him, but while I was tying him up, the deputies started shooting me. Actually, they were shooting the bandit but I was standing between him and them so I took a couple bullets. Once tied up and lying on the ground, the deputies continued shooting him until he died... Goodbye reward...

And this is only one in the multiple stories I could tell about those random encounters plaggued with less-than-average AI. It resulted in a lot of frustration and some wtf moments.

Conclusion

First of all, thank you to have read this pamphlet from start to end, as it mostly was random rambling that I needed to get out. As a last word I might say that I'm impressed by the way Tales of Phantasia managed to push the boundaries of the hardware, and managed to immerse you in its atmosphere through multiple little details both in controls, music, graphics and story

On the other hand, Red Dead Redemption is a game just above average. My general gaming feeling was spoiled by a all those little overlooked details and glitches that in the end kept frustrating me.

In the end, both games are interesting in term of Game Design because you can learn a lot from them. From Red Dead Redemption I've learned a lot of small details that must not be overlooked in term of UI and gaming experience to not frustrate the player. From Tales of Phantasia I've learned that all those little details that you take care of add up and your players will thank you for it.

Show and hide Flash elements without redraw

Imagine you have a Flash element in your HTML markup. If you apply any show/hidelogic to it, the flash will be reset and played back to its first frame.

Actually, as soon as you change the displayproperty of an element, if forces all inner Flash element to be restarted.

There are a few ways you can work around that, and here are the two main I'm using

Your Flash file is in a tab

Fairly common scenario, you have tabs on your page (maybe using jQuery UI or a custom code). When you display your Flash tab, all others are hidden, and when you display another tab, the Flash one is hidden.

Instead of using display:none / display:block, we'll be a little more sneaky and not really "hide" the element, but simply put it out of the user view.

Just apply the following CSS rule to the element you want to hide. It will just display it offscreen.

.tabHidden {
  position:absolute;
  top:0px;
  left:-9999em;
}

Don't forget to add a position:relative to the HTML parent of your tab for the absolute positionning to work.

You have multiple Flash files in a list

This one is trickier. Imagine you have a list of elements, and each row contains a Flash file. You want to filter the list based on various criterias and only show the rows matching.

You can't use the previous technique here because some elements of your list will be in relative positionning while others will be in absolute positionning. And everytime you change the positionproperty of your element, the Flash will be reset.

The trick here is to play with your element dimensions and visibility. You can change the visibilitywithout triggering a redraw. As this will only make the element invisible but still taking space, you just have to put its heightand widthto 0 to make it effectively disappear.

.listElementHidden {
  visibility:hidden;
  width:0px;
  height:0px:
  margin:0px;
}

The margin:0px is here to clear any margin you might have defined around your element.

Selecting checked radio button with jQuery and IE8

Ever tried to select the checked radiobutton of a form using jQuery ? Well I did, and hundreds of time before, and never ran into any issues.

Today's the first time, and it involves my dear friend IE8. Seems like either jQuery or IE8 had trouble with my radio button selection.

I finally managed to get what I wanted but with a sightly different syntax for IE8.

First, the markup

<form id="myForm">
  <input name="data[Payment][value]" id="payment_1500" type="radio" value="1500" />
  <label for="payment_1500">1500</label><br />

  <input name="data[Payment][value]" id="payment_2000" type="radio" value="2000" />
  <label for="payment_2000">2000</label><br />

  <input name="data[Payment][value]" id="payment_5000" type="radio" value="5000" />
  <label for="payment_5000">5000</label><br />

  <button id="test">Select</button>
</form>

Pretty simple, isn't it ? I only have three radiobuttons, and I would like to get the selected value when pressing the Select button.

What should work everywhere

The following code is pretty straightforward and I expected it to just work.

var selected1 = $('#myForm input[name="data\\[Payment\\]\\[value\\]"]:checked');
var value1 = selected1.val();
console.log(value1);

Note that we have to double escape the [ and ] characters and wrap in quotes the namevalue. Nothing fancy, just classic string protection. This code works perfectly on Firefox and Chrome, and I deployed it in production for a few weeks.

Then, I got report of users that would have love to use the form, but got an error because no value was selected. I tested and tested it again without finding the cause. Then it occurs to me that all those reports came from user using IE8.

So I rebooted my VM, launched IE8 and was able to reproduce the bug on my first try.

What the heck is IE8 doing ?

Well, that's a deep question, and I've ask this myself countless times before. Once more, IE is doing things in its own weird way.

After some fiddling, I managed to make it work, by just slightly altering the syntax.

var selected2 = $('#myForm input[name="data\\[Payment\\]\\[value\\]"]').filter(':checked');
var value2 = selected2.val();
console.log(value2); 

Yep, that's right, I simply moved the :checked selector in its own filtercall and it worked. Took me a while to figure, but this finally turned out to be an easy fix.

You can test it yourself with this jsFiddle example. Don't forget to enable the log panel in IE8 by pressing F12 before running the code.

Enabling Flash calls to distant server when working locally

Default Flash security config prevents you from loading content from an external website when running a Flash file locally.

To prevent this, you have to go to this link and add the directory where your file is located.

Fortunatly, you can specify a top level directory and all subdirectories will inherit the authorization.

If you don't do this step, your Flash file will refuse to download external content.

First steps with puppet

I've never used puppet before this project. It in installed on our main server, monitoring the whole pool of servers used to host our game. It includes php hosts, sql data nodes and sql front servers as well as a couple of load balancer.

Puppet keeps a snapshot of the config that must be deployed on each server and keep them in sync. We just have to edit the puppet files, and the same config is replicated on each server.

I did not install puppet, our sysadmin did it, and I have no idea how he did it actually, I'm just fiddling with specific configurations here. But as it took me quite a bit to grasp, here is how it works, and some quirks to be aware of.

The puppet files

Puppet is installed in /etc/puppet. Our different modules are stored in/etc/puppet/modules. A module is a set of programs and config files that work together.

For example, we have one for the loadbalancers, one for the httppart, one for mysql, and even one for vim. I'm going to focus on the httpone, because it contains config files for memcache, lighttpd and php.

Modules are split in two parts : the manifest and the files. You can find each in /etc/puppet/modules/{modulename}/manifests and in /etc/puppet/modules/{modulename}/files.

As you can imagine, the manifest contains a list of directive telling puppet what programs need to be installed, what directories need to be present (with specific user and group) as well as what files need to be copied.

The files/ directory contains all the files that puppet might need for this module. It will copy them from this directory to the final servers, according to the manifest config.

Manifest syntax

The manifest uses a very simple syntax, using blocks of key => value to define config. I've mostly use the simple filedirectives, to copy files and create directories.

One can also use packagedirectories, to install things and handle dependencies, but I haven't messed with that (yet) so I won't talk about them here.

Here are a couple of simple file orders :

file { "/etc/lighttpd/scripts":
  ensure  => directory,
  owner   => root,
  group   => root,
  mode    => 550
}
file { "/etc/lighttpd/lighttpd.conf":
  owner   => root,
  group   => root,
  mode    => 644,
  source  => "puppet:///http/$target/lighttpd/lighttpd.conf",
  require => Package["lighttpd"],
  notify  => Service["lighttpd"],
}

The first part will create a/etc/lighttpd/scripts directory on the final server, with a user and group rootand 550 permissions mode.

The second part will copy the file stored in /etc/puppet/modules/http/{target}/lighttpd/lighttpd.conf on the puppet server to /etc/lighttpd/lighttpd.conf on the final server. I'm not quite sure what the requireand notifylines are for.

$target is a special variable. In my case it can take either the value valid or prod, allowing me to define custom config based on the environment. Valid and prod environment are supposed to have the exact same config, but separating them allow for testing a config change in one environment without potentially breaking the working prod environment. I'm not exactly sure how this $target var is set, this is one more thing our sysadmin did. Thanks to him.

Pulling changes

Puppet is configured to check its servers every 30mn. If some config files changed, or a directory isn't there anymore, it will recreate them, according to the manifest. But you can force the pulling of changes from the final servers themselves. Just log to one of the servers puppet is monitoring and type

$ sudo puppetd --test

The --test argument is a bit misleading. It actually does not seem to do any test at all, it simply pulls the puppet files from the puppet server and updates its files accordingly. It will notify you of any errors it might find, and even print a diffof the files changed.

One last thing

I've lost 30mn checking and re-checking my puppet file because my php.ini changes weren't updated. In fact, I just forgot to reload lighttpd...