03 Oct 2011Starting a few weeks back, we started having painfully slow ssh connections at work. Our servers are hosted on the SoftLayerinfrastructure, which are extended on all North American territory, but we are based in France.
We have fiber-optic connection here, almost every other connection is blazingly fast. Except connections to our own servers...
Call me paranoid, but the first idea we got was that we were being throttled by our provider. Orange is infamously known for degrading on purpose connection with some know hosts.
A colleague was browsing through his own secure tunnel, going through his personnal server for every outgoing communication.
And his connection was as fast as it should be.
That made us wonder. How a tunneled connection could be faster than a normal one ? The cost of crypting data should have slow the request down. It had the opposite effect, rendering the request in the expected time.
I created a garbage file using the following code and used scp
to send it from one server to another, to test bandwith.
dd if=/dev/zero of=garbage.bin bs=100000000 count=1
Nothing interesting came out of it. I had a impressivly fast connection between our fiber connection and OVH (up to 50Mb/s) and slow connection to SoftLayer.
So, for the time being, I'm connecting to SoftLayer through OVH and even if it made me use one more tunnel, it is still far more fast than a direct connection.
22 Sep 2011I own a Sansa Clip+ as my mp3 player. It's really small, has great audio quality and combined with a 32Go microSD card plus the internal 8Go, it's enough to hold almost all my music library.
As with any mp3 player realeased nowadays, you can browse your files using mp3 tags. I don't really like it and feel limited in my browsing. As I'm listening to a lot of movie soundtracks I have a pretty long list of artists with only one song attached.
Fortunatly, the Sansa also allows you to browse by folders, which is rare enough to be highlighted.
So far so good. Except that I've discovered a little bug a few days ago in the way folder navigation is done.
I had two folders named Soundtrack - Games
and Soundtrack - Movies
. Each were holding a dozen albums. In each of those folders I had subfolders sharing the same prefix, like Hitman Contracts
, Hitman Blood Money
or Kill Bill
and Kill Bill volume 2
.
When browsing my music folder on the Sansa I noticed that the Soundtrack - Games
folder had disappeared. I check the SD card in my computer, and it really was there.
I finally discovered that all the Sountracks - Games
content had been merged in Soundtracks - Movies
resulting in one big directory instead of two smaller ones.
My second discovery was that all my Hitman
sub folders were also merged into Hitman Contracts
, and my Kill Bill
music was in Kill Bill volume 2
.
It seems that when multiple directories shared the same prefix, all folders will be merged in one whose name is the last in alphabetical order.
I'm not the only one in this case, I saw a similar report on Sandisk forums, but the bug seems erratic. Folders does not always get merged if sharing a prefix.
As a temporary fix, waiting for a regular fix in a firmware update, I'll update my folder tree to use Soundtracks/Games/Hitman/Contracts
and Soundtracks/Movies/Kill Bill/Volume 1
but this is far from optimal.
17 Sep 2011Disclaimer : 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.
16 Sep 2011Imagine you have a Flash element in your HTML markup. If you apply any show
/hide
logic to it, the flash will be reset and played back to its first frame.
Actually, as soon as you change the display
property 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 position
property of your element, the Flash will be reset.
The trick here is to play with your element dimensions and visibility. You can change the visibility
without triggering a redraw. As this will only make the element invisible but still taking space, you just have to put its height
and width
to 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.