Musings on the future of web tech

I am a web developer. I make my living coding JavaScript stuff and interacting with the DOM to show said stuff in pretty colors with wacky animations. I design visual interfaces for people to interact with and perform some kind of task. Most of the time said task is just showing information in a useful way (this blog mostly shows what I write in a friendly format).

As a result of my career path, I’ve gained some insight into what the web is about and where web technologies are headed. I don’t pretend to be any kind of expert in the matter but I am invested into what this thing is all about and I’d like to talk about it.

Are we cool?

We cool.

Alright, so let me start by saying that the DOM and by extension, CSS, is the worst piece of technology that I’ve ever had the displeasure of working with.

It’s a mess and will continue to be a mess because we don’t like breaking stuff. I mean, I like the web as a user and I’d like it to not break into a pile of garbage all of a sudden. Whole economies would collapse, companies would go bankrupt, etc, etc.

So, we are stuck with the DOM for now and will continue to be stuck with it at least until we develop an alternative. What would that look like? It will probably be very similar but more consistent and designed specifically for the needs of a true interactive application instead of just a markup-based technology directed at showing documents.

In the mean time, JavaScript is going to evolve rapidly in the coming years. ES6 was a welcome change of pace that made javascript development tolerable even though it didn’t fix many of its glaring flaws. Again, can’t fix those without breaking pretty much every web page in existence.

But even though we are rapidly gaining features and new syntactic sugar to play with in JavaScript, that advancement is not going to be enough on its own. JavaScript is going to need to evolve in features more than syntax in order to allow other languages to compile into Javascript. In fact, we are currently creating new supersets and subsets of javascript for different needs at a spectacular rate. Asm, CoffeeScript, PureScript, Flowtype, JSX and Typescript, to name a few.

At the end of the day, JavaScript by itself will not be able to evolve fast enough. The browser is going to need to accept bytecode instead of only a scripting language. JavaScript will continue to evolve but this step is necessary for other languages to truly join the party and accelerate the rate of innovation.

Tons of new languages will appear and old ones will be retrofitted to work with this new bytecode platform.

I suspect that after half a decade of experimentation and rapid evolution we’ll reach a consensus as to the new default language for web development. A language that is probably more functional, with strong typing inference, with a more consice and consistent syntax and with a better number implementation.

At the same time, web browsers will become fully fledged sandboxes through WebAssembly. Meaning, web pages will truly become web applications. They will let the user “install” said applications to the machine (like progressive web apps) and they’ll be as performant as bytecode will allow. They will also be accessible offline and will be geared towards truly replacing the current ecosystem of computer applications and phone apps.

Just like with mp3s and mp4s, new hardware chips will be developed to exclusively handle web apps for dedicated small devices.

The web is dead, long live the web.

Becoming a javascript dev

Alright, so, it has been a year and a half since I last did anything around these parts. You might be wondering what I’ve been up to … or not. I don’t blame you for not caring at all about someone you don’t know and haven’t connected with at any personal level.

You monster.

Anyway, I’ve been programming a whole lot lately. It turns out that it is a lot of fun once you find the stuff that you actually like to do. In my case that’s frontend development in general (mostly web stuff).

The fruit of my labor has been my continued existence as a relatively not poor human being that continues to live inside this capitalist society and its filthy filthy way of life … but more importantly, I’ve been developing a gamepad library in javascript called JoyMap. That’s right! I haven’t forgotten my roots as a game designer and desire some day to develop a game from the ground up … again.

Forgive me for I have nothing to show of actual value to anyone that’s not a js programmer, but my resources are scarce, my will is dwindling and my voice as a writer is all over the place.

In other news, I decided to start writting here in this blog of mine again after so much time has passed since the last time I said or desired such a thing. I cannot promise any schedule or even what themes I’m gonna be writting about, but yeah, more writtey writtey on bloggy bloggy.

Interesting idea space

meta humor is meta


Here’s what I’d like to see more of:

  • Affordance is important and should be treated with the utmost respect. Or in other words: If something looks and feels like it can be done, it should be possible. This rules out invisible walls, mechanic cheats such as making enemies invincible due to narrative reasons, environmental mechanics that only affect the player but don’t affect anybody/anything else, etc.
  • Multiple intersecting mechanics. I think this is the source of almost all unexpected and wonderful interactions that can be possible while playing a game, Spelunky being one game that excels at this (shopkeeper interaction especially) as well as my favorite moment in a game. Unexpected interaction that follows a restricted possibility space and is completely rational in hindsight is the best type of interaction. It is one of the few sources of mechanical comedy that videogames have (though extremely difficult to pull off since timing  or rythm is also required for comedy).
  • The player’s time is precious. If a design choice makes it so that the player must spend time in an undesirable activity in order to reach a desireable one then something’s wrong with the game. Punishment in the form of lost time must be treated as the worst type of punishment possible.
  • All input must correlate to a semantic meaning. Never, ever have a button that does two or more completely different things depending on surrounding context or how the player presses the button or what part of the UI the player is on*.
  • A low skill requirement but a sea of possibilities when the player is skilled enough. Previously plain rooms are in fact loaded with stuff to do and explore and this content/interaction is not gated artificially by locks and keys but readily available to whoever has the knowhow or the curiosity. Avoid situations that result obtuse in hindsight once the player has discovered the secret/s.
  • Just … hidden stuff. If there is one thing that I think I’ll never get tired of is finding secret rooms/items/interactions. They spark curiosity and they trigger (at least for me) a sense of wonder if done correctly. Finding ammo behind a staircase is neat but finding a whole optional section with a corresponding reward is awesome.
  • Cheats. Yeah, just cheats. Cheats are awesome. What happenned to those?

Game Design: love to the maybe

Game design is not easy. But it’s not hard either. It’s a problem that is only solved by cyclic repetition between idea-forming, prototype-making and prototype-playing. It’s weird in that way: Nobody can escape that process.

And I love it.

Anyone can think of an idea for a game but not everyone can discern if their own idea is any good or not. Most of us just merge, combine and in the best of cases extrapolate different individual game components to find something new, something awesome and surely something that has never seen before.

Skyrim with guns! Mario with Guns! Racing with Guns! Football with Guns!

Ok, that last one sounds interesting in a tongue-firmly-planted-in-cheek kind of way, but I digress.

We (as in, people who play videogames and like to think of new game ideas) have a tendency to ground all of our ideas in the things that are tried and true, the things that have already been proven to be fun, engaging, and some other adjective that sounds good but is so non-specific as to be meaningless. We need to ground ourselves because thinking about something that has never been done is not only difficult, but it doesn’t click automagically in the brain by connecting previous experiences together. The possibility space for a new gameplay idea will never be well-defined in our brain unless one of two things happen: Either the owner of said brain gets to play around with at least a prototype of the idea in question or he/she/it needs to spend a tremendous amount of time parsing through every little detail to formulate and bring the possibility space into focus.

Let me give you an example.

Imagine you want to build an arkanoid game, but in 3D space. How would you move in such a situation? Where would the camera be? Should the movement be restricted to a line, a plane or the full 3D space? Should this space be straight or curved?

My first answer for something that has never been done would be …. second person view of the arkanoid ship, looking through the back of the semi-transparent ship (maybe a wire frame?). The movement would be confined to a sphere around a target object/enemy, with the additional option to move closer or farther away from the target. Changing targets would in turn change the sphere in which the arkanoid ship can move. Gameplay would consist of bouncing back enemy projectiles unto themselves, maybe with an ikaruga-inspired mechanic to distinguish bounceable bullets from harmful bullets.

Awesome! Except …. well … yeah, something’s off. That kind of movement would be useful for bullet-bouncing but really annoying for space traversal. Now that I think about it, this kind of movement would work like in the N64 zelda games. Those games would have been horrible with Z-targeting movement 100% of the time but would also suffer if it was missing entirely.

Now, if we implement free 360°movement in 3D for space traversal and then enter Z-targeting mode only for bouncing bullets this could work. Or not. Maybe. I don’t know. Depending on a few little details we could end up in puke city if we’re not careful.


That’s how my brain works when thinking about game ideas. Inevitably, I’ll make a connection to some other game or mechanic that I’ve fully explored and suddenly things become more clear as to what could go wrong and what would be the best course of action. But even then, I’m not able to fully grasp how such a game would play because of the multiple levels of movement that I haven’t experienced before (that is *I* haven’t, there’s probably a game that does this), and so my next step would be to investigate if there exists a game with similar characteristics to what I’m thinking.

After a few rounds of refining and fine-tuning of the idea it should be time to build a prototype of it as fast as possible, because you can do so much with imagination, memories and logic. Sometimes it’s literally impossible to envision which parts of the idea are going to be engaging and which parts are going to be in the way. Maybe the movement feels really great but the bullet-bouncing clashes with it (going fast: yay for movement, boo for precision and vice versa).

That’s where it hurts.

Building something up just to find that it doesn’t work is not the happiest feeling in the world, but with time you get used to it. Some ideas go all over the place and end up spawning several distinct ones. Some others just plain don’t work and must be therefore discarded unceremoniously in the pit of tears and sadness.

And you know what? I love this. I love this creative process. I love exploring possibility spaces and finding new and interesting combinations that I haven’t seen before. I love the mental gymnastics one must go through to find inspiration. I love the infinite possibilities I have as a game designer.

If I didn’t love doing this I guess I wouldn’t be here, almost 7 years after I began writing in this here blog of mine.

So here’s to another 7 years of idea-having game-making blog-posting fun.



Are Videogames About Their Mechanics?

Interesting video is interesting, and I had a comment that I thought deserves to be added to the blog
First of all, excuse my rambling through various attack points to the issue at hand, it’s the way my head works and I’ll be damned if I’m going to translate my thoughts in a more coherent manner (I kid because I love).

I like to think of mechanics as the layer of affordance. The level of interaction we can get out of a game depends entirely on the player input and how that is fed to the mechanics (either directly or through UI (there’s a big difference between these two but let’s not get distracted (oohh a butterfly!))). All first person shooters are about killing, because that’s what you’ll be doing the majority of the time: shooting dudes in the face. That the main protagonist has a kidnapped daughter who likes the smell of pizza in the morning doesn’t matter … because that’s how we build these games.

If someone were to describe a game to me explaining only it’s context and how meaningful it’s themes are, I’ll immediately ask about what type of game it is. Is it a shooter? a puzzle game? an IF? We are so used to having games with stories divorced from game mechanics that we don’t find it odd when a game about objectivism in a post apocalyptic future turns out to be a game about shooting zombies in the face with superpowers and guns.

Story in itself is most of the time used to provide a context to the mechanics and may very well make a big difference in how a player feels about performing or not performing a certain action. But it has to go both ways for it to be effective: The story has to inform the mechanics and the mechanics have to revolve around the story. You can’t have a game about shooting people in the face for 20 hours and expect to touch meaningful themes that don’t have anything to do with the shooting itself. Yes, you shot that guy’s wife and now he’s a little bit upset, but that doesn’t mean that the game is suddenly about loss and grief.

“Show, don’t tell” applies to movies just as much as “Do, don’t show” applies to games. For a game to be about something it has to happen to the player and the player has to be the one acting upon said something. Revenge stories work in games when and only when the player has had a chance to interact with the soon to be excuse for violence. Play a few hours around the house with your family before they are inevitably kidnapped or shot at point-blank range (… in the face).

Flap Flap Flappitty Flap Flap: Why is this thing so popular?

Flappy Bird is a spectacularly easy game to make, it’s monotonous as hell and it doesn’t provide any mechanics worth looking into as a game designer … and yet, it became EXTREMELY popular. To illustrate this point, let me just mention the fact that the ad-revenue (its only source of income and generally one of the worst ways to earn money) was generating $50.000 dollars each day.

This is the type of popularity that one can only dream of.

One could say that these types of events are dictated by luck … and, frankly, that is the truth. There are many many games that are absolutely brilliant but never achieve any kind of significant spike in popularity due to many reasons outside of the game itself. Then again, the games that do become popular do so for many reasons other than luck. One of those reasons may be a good marketing campaign, but most of the time the single most important reason is game design that caters to the masses in some way shape or form.

So, with that in mind, let’s look at this example and analyze what made this game so popular.

A half-chewed piece of lettuce could tell you that some reasons are:

  • It’s Free! (Let’s go viral! Yay!)
  • It’s Cute! (Mass market appeal! Yay!)
  • It’s polished! (Everything it does, it does well! Even if it is not much)
  • It has leaderboards connected to Social Media! (Let’s tap into that sweet sweet feeling of being one-upped by someone in something that doesn’t matter … Yay?)

Oooohhh, such insight!

such meme, much sarcasm, very overuse, wow
such meme, much obvious, very overuse, wow

*clears throat*

Alright, as you can tell by my sarcasm I’m not particularly interested in those attributes and I find it hard to believe that anyone would be. After all, those traits are common to 99.9999% (that’s a scientific percentage! you can tell by all the 9s) of all the games released for mobile platforms.

Cutting to the chase, what makes Flappy Bird interesting is that it became popular for two normally conflicting reasons.

  • The control scheme is so easy that a 2-year-old could learn it in seconds.
  • It’s friggin’ hard.

Yes, this is the novel concept of “Easy to learn, hard to master”. It is quite hard to believe that a game this simple, based on such an old design mantra became so popular. That is until you start thinking about the competition … please try to think of the amount of games you’ve played with absolutely f*cking horrible controls in a mobile device. Then think of the number of games that felt natural in said devices. Arcade games that felt natural, might I add.

Let me state this clearly: In mobile devices, there are almost no games that let the player control the action in a precise and elegant manner. Infinite runners are the only ones that had achieved this level of control and every single one is the same as the next. This is the first infinite runner variation we’ve ever seen (that I’m aware of at least).

Man, we as an industry suck at designing arcade games for mobiles. The only games that ever feel natural take the whole screen as one single giant button. Is this a limitation of the medium or is it the limited imagination of designers (myself not included since I’ve never truly designed mobile games … should I?). It feels like we are wrestling with a new concept, like a 90s website that tries and fails spectacularly at being intuitive.

Also, the creator of Flappy Bird took the game down because he … didn’t want the fame apparently? People were calling bullsh*t, that it was a publicity stunt but he really took the game down. Weird.

Also also, Kotaku said that this game ripped-off mario because it has green pipes </facepalm> Shouldn’t they mention too that it ripped off angry birds because it features a bird? </sarcasm>  I’m not linking to that article because f*ck them and their tabloid-like posts </indignation></novelty closing tags>


UPDATE: Ok, everybody was screaming bloody murder because it’s a ripoff of this:

Go ahead, play that thing, I’ll be waiting here.

I’ve wasted 15 seconds of my life playing that and all I can say is that it’s no wonder it never became popular: The art is ugly and overcomplicated, the sound effects are horrible, the feeling of gravity and impulse is almost non-existent, it insults you when you lose and when you fly out of the screen the game kills you.

And people argue that flappy bird was a ripoff? What the hell?? Flappy bird took the same concept and mechanics and made them shine. It’s not novel in any way shape or form and there was an apparent CONTROVERSY over this sh*t????

</fed up with this world>

Elegantly Candy Crushing your soul

Candy Crush is a manipulative repugnant pustule of a game and it is magnificent at hiding that fact.

The sense of progression, the continuous addition of “new” mechanics, the psychological manipulations, the perceived rewards, the way it can orchestrate what the player can do or not … all of these systems are masterfully designed so that they stay on the right side of the line between barely perceptible exploitation and being openly exploitative.


I’ve already talked about how these types of games openly frustrate players to scam them out of their money. Candy Crush is exactly like that, but is so much better at it. See, if you have an energy mechanic, then players know they are being constrained, that they won’t be able to do much in one sitting unless they pay. Candy Crush doesn’t have that, but it creates the same feeling of frustration in a much less visible way. How? Well, let me first take you through the actual mechanics of the game and I’ll get to that.

Candy Crush is a clone of Bejeweled in the sense that it copies every single important mechanic from it. This makes me very angry but not in the moral sense since Bejeweled was in itself a ripoff of other similar games that came before it. The reason for my anger is because I openly hate Bejeweled as well as every other Popcap game that I got my hands on. What’s interesting is that it’s always for the same reason: They maximize the ratio between interaction and spectacle, or in other words, they limit player interaction to absurd limits and then force the player to stop interacting so that they can watch and marvel at the consequences of their single input.

So, that was a very round-about way of saying that Candy Crush severely limits the player possibility space but every single action is seemingly important and can cascade into wildly different new possibility spaces. At any one time you’ll likely have 5 or less possible actions, but those actions can then cascade into very spectacular chain reactions.

That would fine if and only if the colored candies were placed at random … but of course, this is a free to play game and so it never leaves anything to randomness. Every step of the way, this game decides what to let you do, and consequently if you can win or not. In fact, it doesn’t matter how good you are at the game, you’ll always be able to progress because the game can literally make you win even if you’re trying your best to lose. And you’ll never notice unless you actively experiment on it. Just think about that for a second.

Having that in mind, let me remind/tell you that this game has a classical lives mechanic (lose one life every time you lose, can’t play if out of lives) where you’ll get a new life every half-hour. Doesn’t this ring a bell?* It’s basically controlling how much interaction and progression the player can have in a single play-through, but it’s doing it in a much more complex way than most other games. Nothing in its presentation screams frustration and at face value no single mechanic can be accused of limiting player action.

That is impressive to me, because they designed their core mechanics to frustrate the player in a unperceptible way. It may not look like it, but it takes a good game designer to achieve that and not be tempted to apply the same generic all-purpose patch that every free-to-play designer was so fond of*.

The psychological manipulations don’t stop there though. As I’ve already stated, Candy Crush manipulates candy placement at will, but it’s very intelligent with what to do and when, for instance, there are two distinct and very consistent behaviors that I’ve witnessed in the first 65 levels:

  • When the player is stuck on a level and is also low on lives, guide him/her towards almost completing the level and then in the last 3 movements make it impossible to win unless he/she spends one or more items.
  • Once the player has been struggling with a level, the next few ones should be conquered easily.

The façade of being a “fair” game si always maintained though. There’s enough uncertainty in each match as to make it impossible to truly get a sense of when the game is manipulating the player to win or to lose. Sometimes one wins by a landslide and does a ridiculous amount of points, sometimes one barely passes the winning conditions, sometimes one almost wins and sometimes it is literally impossible to win. There’s enough apparent randomness and noise as to make it all difficult to decipher, and that is what makes Candy Crush into such an interesting and yet magnificently repugnant game.


* Give me an “Ener”! Give me a “Gy”! Give me a “Mecha”! Here you go. Give me a “Nics”! What does that spell? Internet Porn! When do we want it? Now! How do we want it? In the form of a recreation of a scene of a movie from the 1930’s! … Wow, how did we get here? I don’t know!

Image taken from here.