Toxic Dump - Blog updates http://toxicdump.org/ ToxicDump.org - A dumping ground for science, art and everything in between. en Sat, 04 Feb 2012 11:05:13 -0800 Sat, 04 Feb 2012 11:05:13 -0800 http://www.rssboard.org/rss-specification ToxicDump.org lucas@toxicdump.org (Lucas Vieira) lucas@toxicdump.org (Lucas Vieira) lucas@toxicdump.org (Lucas Vieira) Creating human-readable scales for data visualization in charts. (updated on 2011-09-05) http://toxicdump.org/blog/view/1/Creating-human-readable-scales-for-data-visualization-in-charts If you ever had the task to generate a graphic from scratch, then you probably encountered this problem: how do we pick a "round" number for the maximum range of the graphic which will fit all of our data nicely?

Here's an example. Your app has a statistics section which displays a line chart of the number of entries versus time. At the beginning, when the number of entries is small - say 6 entries - your graphic could display a range from 0 to 10. But after a while you'll have some hundreds, or even thousands of entries.

How do you find which is the next "best display range" for any given maximum value m? For a maximum value of 332, which would be better: a range from 0 to 340, 400, 500 or 1000?

In this post, I'll show you how to create a function \mbox{R}(m) that will give you that display range value, and we'll be using logarithms to achieve that.

A very brief introduction to logarithms

For those not too familiar with logarithms, they are the inverse function of exponentials. Say you have the equation 2^x = 5. In order to find the value of x, you need to use logarithms.

A logarithm is a number, the power to which a certain base (in this case, 2) must be raised to return another number (in this case, 5). This would be written as \log_2 5. In our example, the value of the logarithm is about \log_2 5 \approx 2.32192809... In short, you have this correlation between a logarithm and an exponential functions:

b^x = a \Leftrightarrow \log_b a = x

When the base isn't specified for the logarithm, it is usually assumed to be e \approx 2.71828..., also known as Euler's number. This seemingly random number has several useful properties, but not for our particular problem here. Note, also, that a logarithm with this base is also called a natural logarithm, usually written unambiguously as \ln x.

A very useful property of logarithms is that you can easily convert a logarithm in a base to any other base you wish. Say you have the logarithm of x in a base a, but you actually want it in base b. You can just do this:

\log_b x = \frac{\log_a x}{\log_a b}

So even if you have an unknown base for your logarithm function, you can convert it to any other base you wish by just diving the value given by that function using your value, to the value it gives for the base you want.

This is useful - and worth pointing out - because a lot of programming languages give you only a natural logarithm function, and we'll be working with a base 10 logarithm from now on.

Finding the order of magnitude using decadic logarithms

A decadic logarithm (also known as common logarithm) has a base 10. It is useful in our case because we happen to use a decimal system for our numbers.

In any positional numerical base, you can figure out how many digits a certain integer value will have by taking the logarithm of that value using the numerical base as the base for the logarithm, rounding down to the nearest integer and then adding one.

For example, the number 1452 has \lfloor \log_{10} 1452 \rfloor + 1 = \lfloor 3.16.. \rfloor + 1 = 3 + 1 = 4 digits. Here, \lfloor x \rfloor is the floor function, which gives the smallest integer closer to x. It is a very standard mathematical function in most programming languages.

Let's call the maximum value in our dataset m, and we'll create a function \mbox{D}(m) which will give us the number of digits in the integer part of m:

\mbox{D}(m) = \lfloor \log_{10} m \rfloor + 1

So for any m, we can find the next biggest power after m by simply calculating 10^{D(m)}. This will give us 1 for any 0 \leq m < 1, 10 for any 1 \leq  m < 10, 100 for any 10 \leq m < 100, etc. In effect, the function \mbox{D}(m) gives us the exponent for the next decimal power (or order of magnitude) after m.

Breaking our range into smaller steps

Now, when m = 100, our next order of magnitude is 3, that is, 10^3 = 1000. If we use that for the range of our chart, we'll have all the data drawn in just the bottom 10% of the graphic.

That doesn't look too good, does it? It's just too much empty space, and it makes the maximum value in our dataset look much smaller than it really is.

Each order of magnitude is a 10x increase, and we want to break it in n equal parts. We'll do that by using a sibling of the floor function, the ceiling function, \lceil x \rceil, which returns the largest integer closer to x. This function is also common in most programming languages, usually by the name "ceil".

We'll use the ceiling function to create a "step-factor" which will have steps of size \tfrac{1}{n}. You do this simply by evaluating \tfrac{1}{n} \lceil x n \rceil. By itself, this looks like this:

But note that for each new order of magnitude we reach, it should take 10 times longer to step up to the next. To do that, we plug in our next power of ten inside the ceiling function, but as a division, so we end up with:

\frac{1}{n} \left\lceil \frac{m n}{ 10^{D(m)} } \right\rceil}

Now, if you evaluate this as a function on x, you'll see it just steps between 0 and 1 n times before resetting back to zero, at which point it will take 10 times longer for each step up.

We just have to make it step across powers of ten now, and to do that we multiply \tfrac{1}{n} to 10^{D(m)}. The result is our function \mbox{R}(m), which looks like this:

\mbox{R}(m) = \frac{10^{D(m)}}{n} \left\lceil \frac{m n}{ 10^{D(m)} } \right\rceil}

Where n is the number of steps. Good values for n are 2, 4, 5 and 10.

Here's how this would look like in pseudocode, with the appropriate decadic logarithm conversion:

function getGraphRange(maxValue):
    numDigits = floor( log(maxValue) / log(10) ) + 1
    nextDecimalPower = pow(10,numDigits)
    step = ceil( maxValue * numSteps / nextDecimalPower )
    range = ( nextDecimalPower / a ) * step
    return range

But what about the subdivisions and their labels?

Now that we have a round-ish range for our chart that our users can understand, we still have the problem of dividing that range in an appropriate number of parts so the labels will be easily understood. You don't really want the labels to mark 0, 110, 220, etc.

This can be accomplished using our function \mbox{D}(m). First, we need to find the first power of ten below our range (and not the maximum m), and that's simply 10^{D(R(m))-1}. We divide our range to this value, and then multiply by the number of steps n we defined before. The result is the number of subdivisions you need.

d = n \frac{\mbox{R}(m)}{ 10^{D(R(m))-1} }

Tip: If you're using n = 10 for the range, it's probably a good idea to use 5 for this equation in order to avoid clutter in your graphic, as 10 usually gives you too many subdivisions.

Conclusion

Data visualization is not a trivial task as it may seem at first. Doing it improperly, without considering the quirks of human perception, will seriously corrupt the information you are trying to convey. So it is very important to consider both the mathematics and psychology involved.

As others have mentioned, mathematical ignorance and the limitations of our instinctive notions of numbers can be dangerous and have serious political and personal consequences, so be careful with your data!

]]>
Sun, 28 Feb 2010 06:08:30 -0800 1_1315245619
lucas@toxicdump.org (Lucas Vieira) The amazing work of Graham Annable, AKA "Grickle" http://toxicdump.org/blog/view/4/The-amazing-work-of-Graham-Annable_-AKA-Grickle About a month ago I came across this Reddit post, "Totally creeped out by a cartoon." The link pointed to The Hidden People, a short YouTube video by artist Graham "Grickle" Annable. Turn on your audio and watch it:

I thought that was brilliant, so I had to check more of this guy's work. He has a few more shorts on his YouTube channel. They're all good, even though the first ones repeat the same joke, it's still quite amusing.

Here are a few of my favorites:

Space Wolf

Day Off

The Last Duet on Earth

Botched

Zoo

In his animated shorts, Grickle often uses Krzysztof Penderecki's "Threnody to the Victims of Hiroshima" for kicking up the creep factor, but there's more than creepiness and humor in Grickle's work.

More than just amusing

After watching all of his videos, I decided to explore more of his work. He has a few drawings and comics up in his blog and his Flickr account, and a quick Google search reveals a few of his comics online as well.

By then I was convinced of his worth, and decided to buy one of his books: The Book of Grickle published by Dark Horse Comics. It arrived today, and I eagerly read all of it in a single sitting. Twice. It was damn good!

The thing is, Grickle has an unusual and refreshing style of storytelling. While his drawings and themes are minimalist and sparse, they are very subtly expressive and well drawn, but carrying a whole lot of depth. His work has been described as "comic book poetry," and I honestly can't sum it up better myself.

He manages to be extremely profound, moving and entertaining, page after page, using nothing but snapshots of anonymous, generic characters that tell us more about ourselves and human nature than you'd expect. The stories always seem to build upon those subtle nonevents of normal life, sometimes with a twist, sometimes with a deeper commentary, but sometimes not. And that feels more than enough.

It is not uncommon for an entire page to be devoted to a silent moment of a character's curiosity or discomfort, which not only brings characters to life, but adds a new hint to something more meaningful than a cheap laugh. It's amazing!

I can't help but be reminded of Scott McCloud's Big Triangle, in which he describes how abstract characters are more effective at connecting with the reader. But it's not just visuals, it's the details of situations, and not the situations themselves, that Grickle use to captivate. It is very effective, and I haven't seen anyone doing that as well as he has.

All in all, reading Grickle is a great experience in every sense of the word, and to me this was the beginning of a long appreciation for this guy's work.

But wait, there's more

Currently, Graham Annable is the creative director at Telltale Games. They have recently released the pilot "episode" for a game based on his work. Since it was so cheap, I decided to try it out too.

Nelson Tethers: Puzzle Agent is a fun little puzzle/adventure game based on the "Grickle mythos", including the Hidden People. The game successfully captured the gist of Grickle's art and humor. While some of the puzzles are rather easy, the game certainly has a lot of potential. Here's hoping for more of it.

]]>
Wed, 11 Aug 2010 13:55:39 -0700 4_1281560139
lucas@toxicdump.org (Lucas Vieira) Haunted Mansion DevBlog #01 - In the beginning... (updated on 2011-09-05) http://toxicdump.org/blog/view/6/Haunted-Mansion-DevBlog-_01---In-the-beginning Ludum Dare is an online competition that happens every four months. Developers join in from all over the world in order to create a game from scratch in 48 hours, all by themselves. The game must follow a theme, decided previously by 5 rounds of community voting.

You can use any libraries and any tools, as long as they are easily available to others. But any assets (graphics, audio and music) must be created just for the event. The definitions are a bit fuzzy on this, but nevermind about that.

The last Ludum Dare had an incredibly amount of activity, resulting in almost 600 games total. This is a huge success in comparison to previous years.

I did attempt to make a game, but there was no time to finish it. While I failed the deadline by a mile, it was an interesting experience and I had a lot to learn from it.

Here's a video of some of it:

I also have an older version you can play online.

Since I couldn't make it in time for Ludum Dare, I decided to keep working on the idea anyway. Here's the experience so far.

The concept

The general concept I'm going for this game is now this: a comedy-horror adventure platformer game where you have a large haunted mansion to explore, and mysteries to solve.

Engine and gameplay

Like in the Ludum Dare attempt, the game will be in oblique perspective, and divided into rooms. But this time, each room will be made out of blocks, as opposed to being hand-drawn individually.

Inside each room, I'll have entities. Entities are any moving and/or interactive object, one of which is the player character.

Entities will collide with blocks and other entities (all AABB vs. AABB based, which is easy and fast), which gives me the vertical freedom to design a large amount of different scenarios and related mechanics: staircases, multiple floors in a single room, moving platforms, lifts, slopes, water, etc.

Gameplay will focus on exploration and solving physical puzzles.

I decided to avoid any sort of combat, as I think the mechanic is distracting in this case. There won't be damage or health-bars, but the character can die in traps or by falling into pits or from a large height.

I'm also going to try to avoid using any sort of user interface, except for text pop-ups. I have a solid idea on how this will work, but I'm not sure how well it'll work in practice yet.

I'll develop on this topic once I get to that point in the development.

The level editor

For starters, I fired up PyGame and developed a simple level editor for creating the rooms. So far, it handles basic block placing, saving and loading rooms, etc. It still needs to handle placing entities and a few other features.

Here are a few videos on the development of the editor:

The game

At first, I was going to make this game in Flash. It's easy, I'm familiar with the language and it's web-friendly, which means a larger audience.

But after some thinking, I decided to change platforms. For a while now I've been trying to pick up a new platform and language to learn, and C#+XNA have been on my list for a while. I decided, then, to give it a shot.

It's been surprisingly easy to learn XNA, and the excellent GPU-accelerated performance lets me do all kinds of special effects that would just be annoying to implement reliably in Flash.

In under 24 hours, I was able to have this basic functionality up and running:

This is a very naive implementation that renders all blocks and entities every frame. Even so, I'm getting a solid 60 FPS. Flash wouldn't be able to handle this without some heavy optimization.

As you can see, everything is being depth-sorted properly. This was a bit of a headache to figure out, and the literature on the Internet is *ridiculously* limited on the subject, so in my next post I'll detail the solution for this problem, which also works for isometric perspective. I'm sure it'll help a lot of people out there.

I also made a quick experiment with shading blocks by their distance to the player, creating a sort of light radius. It works surprisingly well. I'm definitely going to try a proper light engine in there somewhere.

And that's what I've got so far. It's been an interesting experience, and the challenges ahead are exciting.

I'll be keeping this blog updated from now on. Wish me luck!

]]>
Mon, 05 Sep 2011 07:59:28 -0700 6_1315234780
lucas@toxicdump.org (Lucas Vieira) Haunted Mansion DevBlog #02 - Oblique vs. Isometric perspective and perfect depth sorting (updated on 2011-09-05) http://toxicdump.org/blog/view/7/Haunted-Mansion-DevBlog-_02---Oblique-vs-Isometric-perspective-and-perfect-depth-sorting For my game, I decided to go with a relatively unusual projection called oblique projection.

There are several reasons why I picked this particular projection as opposed to the most popular isometric projection.

For one, it is sprite friendly. This projection works better along with side-view flat sprites, such as those in platform games.

The image above illustrates this well. Look at the character, especially his feet. You can see how the sprite looks aligned with the plane, and this feels right. You don't need to add any real depth to the character by placing one feet further to the back. Flat sprites like this just work.

On the other hand, the isometric projection forces you to perceive a 3D direction for the player. Using a flat sprite, it looks like it is aligned to the diagonal line across the plane. The isometric projection is also perceptually from a more vertical angle, as if the camera was higher up from the ground.

If you think about it, the oblique projection is nothing but your standard sideways 2D projection with some depth axis slapped onto it. This new axis could point anywhere, even directly up, but having it go diagonally at a 45° angle allows you to actually show the depth axis on its own, enhancing the sense of depth.

Another important thing to notice is that the horizontal axis is truly horizontal in the oblique projection, and that the depth axis is visually unambiguous: it is immediately obvious where the character will move to once you press the up key.

On the isometric projection, this is not the case. Up could be both to the upper left or to the upper right. You'll have to pick one, arbitrarily, and the player will have to deal with it.

Or you could make it go truly up across the screen, diagonally in the world's axes, but this would be a recipe for disaster, since our entire world is made of boxes aligned with the world grid, and the character movement will clash with this alignment.

Isometric also fails regarding animations. In order for them to look correct, you need several angles for the character walk/run cycles, which means more time spent drawing and animating. On oblique projection, the effect of recycling animations doesn't look that bad.

Of course, none of this would be a big issue if your isometric game is just a turn based RPG or something like Sim City, but for a 2.5D platformer, these issues are important.

Having settled on the type of projection, it is time to construct our world. This is where problems began.

The big problem with tile-based 2.5D: depth sorting

Most of the following section is also valid for isometric projection

On tile-based 2.5D, it is very common to use the Painter's algorithm to draw the scene. In order to do this properly, you need to accurately compute the actual depth of each tile before drawing, otherwise you'll run into problems.

Assuming tiles of the exact same size, this is not a problem. By simply drawing rows in the right order, you can get a perfect result every time. This also works every time if you don't stack tiles into columns. As long as you draw things in the right order, you should be fine.

But this is not always the case. Consider the following, well-known example:

In this scenario, all three boxes must be both behind and in front of the others. So how do we resolve this?

Remember when I said it would work perfectly if you assumed tiles were the same size?

That is the golden idea here. If you break apart these objects into equal elements, you can safely reach your desired result.

Of course, this is not feasible if you are working with completely arbitrary sized boxes. For that, you need more complicated algorithms, which you can find elsewhere on the Internet. In my game, this sort of thing will not be necessary.

But the technique of breaking apart objects is important because it also applies to a common issue in 2.5D games like this: drawing sprites using the Painter's algorithm.

As the image illustrates, you'll run into problems no matter how you decide to draw the sprite.

The solution here is to break the sprite into parts. If the sprite is 4 tiles high, you slice it in 4 and draw each piece as if it were a tile. If it is 4 tiles wide, you can do the same thing horizontally.

But since the sprite is infinitely thin, you don't need to worry about slicing its depth axis. Just make sure you draw in the proper position and you'll be done.

The result of this can be seen in the following video.

Resolving this issue means I can finally work on collisions! But that'll be the subject of another post.

]]>
Mon, 05 Sep 2011 13:16:20 -0700 7_1315253851
lucas@toxicdump.org (Lucas Vieira) Pixel-perfect depth sorting using a depth buffer in 2.5D (updated on 2011-09-22) http://toxicdump.org/blog/view/8/Pixel-perfect-depth-sorting-using-a-depth-buffer-in-25D The video below shows how far 2.5D can go if you have a depth buffer and normal map for your objects. It is a very, very neat technique:

XNA RPG 2.5D Game Engine - Updated WIP

You can read about the related techniques in this Wikipedia article.

]]>
Wed, 07 Sep 2011 00:13:13 -0700 8_1316757365
lucas@toxicdump.org (Lucas Vieira) Haunted Mansion DevBlog #03 - Back to Flash, now with depth buffers (updated on 2011-09-27) http://toxicdump.org/blog/view/9/Haunted-Mansion-DevBlog-_03---Back-to-Flash_-now-with-depth-buffers Inspired by the last video I posted on this blog, the idea of using z-buffers was knocking me on the back of my head. If I could use a depth buffer, I realized, I wouldn't have any issues with depth sorting ever again, and it would solve all of my problems, and some more.

It also occurred to me that I could, with some clever and heavy caching, have a very reliable and fast depth buffer in Flash, and it would also be infinitely easier to do it in Flash than it would in XNA. (This will certainly be the topic of a future post.)

This resulted in me moving away from XNA and back to Flash. There were other reasons, though, as I'll explain shortly.

So here's a short video showing the pixel-perfect depth buffer running in Flash. It's running at rock solid frame rates, even though it's grossly naive and unoptimized. This is an excellent sign!

Flash vs. XNA

So, why move away from XNA?

First, I figured the cumbersome deployment of XNA games would make my project vastly less attractive to players. Not only would I be limiting the platforms where my game could be played, I would also be making it much more inconvenient to play it. There's reason why Flash games and casual games are so closely related. Flash games are immediately accessible, and running them is effortless.

This is a huge deal if you're just trying to get a game out there, and there's no reason not to embrace it if you can. Which is what I did.

Another thing I'd like to announce is that I'm working on the game engine as a separate entity, and I hope to make it public sometime after I finish the game. Why the hell not, huh?

The Askew Engine, as I call it, will be a block-based oblique projection engine with some built-in physics, the ability to handle animated sprites, multiple entities and, hopefully, some other fancy stuff like animated textures, lighting and even surface reflections. I'm already working on the details, but that's obviously a very low priority at this point.

Well, that's pretty much all I can say for now. I won't be able to work much on the engine for a few weeks as I need to focus on other matters, but I believe I'm making good progress nonetheless.

]]>
Thu, 22 Sep 2011 04:04:44 -0700 9_1317109495
lucas@toxicdump.org (Lucas Vieira) Weekend side project: sap2mid (updated on 2011-11-23) http://toxicdump.org/blog/view/10/Weekend-side-project_-sap2mid A couple of days ago I realized there was no such thing as a program to convert SAP files into MIDI files. This sucks, as I wanted to experiment with "orchestrating" some of my favorite tunes found in the Atari SAP Music Archive.

Now, I'm not by any means great at this, but I've done some experiments before using manual transcriptions, and in the end I found that these chiptunes do have a lot of potential:

ABBUC 20 for strings

And that was transcribed by hand, which was more time consuming than necessary and it gets very hard for more complex chiptunes.

So when I started hunting for a way to automate it, I found out there's a convoluted way to convert SAP files into CSound files, but this seemed like an unnecessary chore, and the patches aren't compatible with the modern ASAP code which actually supports playing a lot of the tracks in the Atari SAP Music Archive, which previous versions weren't able to.

Something had to be done about this. I'm not an Atari wizard, but I decided to give it a shot anyway.

So I studied everything I could find about the Atari POKEY sound chip, I've downloaded emulators to play around with it, I tried to understand how the POKEY chip is controlled and how it is used for music.

Then, after a more in-depth look at the ASAP source files, I found out there's a little application in there called asapscan, which can give some information about SAP files. One of available parameters simply dumps the raw POKEY registers relevant for sound generation: AUDF1-4, AUDC1-4 and AUDCTL This is what the dump looks like:

2.04: 00 83  BF C6  00 00  00 00  40 | 00 83  BF C6  00 00  00 00  40

The first word being the current time stamp, and the next 8 values being AUDF followed by AUDC, for each of the four channels. The vertical pipe means there are two POKEY chips, so this is a stereo SAP.

So it turns out I already have a program out there designed for dumping the POKEY data. I wouldn't have to deal with the CPU emulation or anything of the sort, and the RAW dump contains all the information I'd ever need to create a MIDI file.

My C skills are rusty, so for now, instead of making a proper executable, I simply modified asapscan to dump a modified version of this data with more precision for the timestamp, which then is parsed by a Python script in order to generate the MIDI file.

Here are some preliminary results:

The original SAP file:

And here's the first generated MIDI file. Success!

There are a lot of stuff that still needs tweaking, and I'm still trying to figure how to interpret certain types of POKEY data (e.g. high pass filters) as something useful.

For now, I'm only handling a few of the poly types, and each as separate instruments, as each generates a particular type of timbre that's very predictable. I have already experimented successfully with the higher polys being treated as drum notes, but I'm not sure how well that'll work with other files.

There are other issues that need to be addressed, but I'll work on that later.

More output examples

Now here's a few output MIDIs straight from the script, without any modification whatsoever, along with YouTube links showing what each music is supposed to sound like.

Some more output examples available here, if you're interested.

As you can see, there's a lot of stuff that doesn't sound quite right (poly 000 is wrong, for one, I'm not sure why yet), and some important modulations aren't being accounted for, but even so, it is working surprisingly well already, and the tracks themselves are very easy to cleanup and fix.

Also, I have no idea why some channels end up being almost silent, while others are just fine. Is there a multiplier for the overall volume that I'm not aware of? If you know about it, please comment!

Well, it's been an interesting little project so far. Sadly I need to move on to something else for now, but I'll definitely come back to this and fix all the issues I can when time allows.

Update

Well, I've fixed the code a bit. It seems to be more accurate now, and it's not hanging notes on Draconus or Bells as it did before. Still, there's a lot of dissonance going on for some reason.

I'm guessing it's the 16 bit mode. It sounds better if I ignore it in Draconus, but the actual notes seem correct if I don't.

This could also be related to the filters. As there is no way to handle them during the conversion (at least none I can think of), the results don't sound the same.

]]>
Sat, 01 Oct 2011 23:35:46 -0700 10_1322096471
lucas@toxicdump.org (Lucas Vieira) Como salvar a Internet e reduzir a pirataria, ou o que muitos estão esquecendo em relação ao SOPA, PIPA e projetos de lei similares. (updated on 2012-01-19) http://toxicdump.org/blog/view/11/Como-salvar-a-Internet-e-reduzir-a-pirataria_-ou-o-que-muitos-estA_o-esquecendo-em-relaA_A_o-ao-SOPA_-PIPA-e-projetos-de-lei-similares Agora que todos estão por dentro do SOPA, PIPA e, espero, o ACTA (que é internacional), devemos parar por um segundo e ver o problema maior por trás disso tudo.

Todos estes projetos foram iniciados, e são apoiados, por políticos tecnologicamente ignorantes que não entendem nada sobre a cultura social e comercial da internet, e muito menos sobre a infra-estrutura que permite sua existência. Você teria sorte em achar um que seja competente com um computador.

A criação destes projetos se deve à pressão de grupos corporativos gigantes como a RIAA, MPAA entre outros, de forma a combater a "pirataria" de músicas e filmes. Dessa forma, todos estes projetos são vendidos com o intuito de "proteger" propriedade intelectual e copyrights contra "pirataria", e todos eles vão falhar imensamente nesses objetivos.

Por que não vai funcionar

Os motivos disso são muito simples e evidentes pra qualquer um que entenda o mínimo de como informação digital e a Internet funcionam. A informação digital é, por princípio, feita pra ser facilmente copiada e compartilhada. Da mesma forma, a Internet também foi criada para compartilhamento eficiente de informação digital.

Embora exista atualmente a centralização de servidores DNS, nada impede a formação de sub-redes independentes dentro da Internet atual por meio de servidores DNS independentes, criados pelos próprios usuários. Bloquear acesso a tais servidores também não é totalmente possível, já que existem inúmeras formas de manter o serviço decentralizado.

Por meio de criptografia, podemos impedir qualquer tipo de filtragem pelo conteúdo das informações transmitidas. Bits são bits, e eles podem significar o que você quiser. Você pode facilmente pegar dois arquivos inocentes e utilizá-los para transmitir um arquivo secretamente através de técnicas criptográficas simples. Não é a toa que vários regimes ditatoriais criminalizam a criptografia.

A Internet como um patrimônio da humanidade

A criação da Internet foi a melhor coisa que aconteceu com a humanidade nos últimos anos. Ela permitiu o acesso à informação, a arma mais poderosa de todas na luta contra injustiça, opressão, discriminação e ignorância. E ela oferece isso à todos conectados.

A Internet é o maior instrumento de união entre as nações na história da civilização. A união cultural é a maior ferramenta para obtenção de paz e entendimento que existe, e isso deve ser protegido à qualquer custo. Embora a ONU tenha declarado o acesso à internet um direito humano, ela não declarou a Internet um patrimônio da humanidade.

E esse, eu acredito, é o problema fundamental por trás disso tudo. As pessoas se esquecem de uma ideia extremamente importante:

A INTERNET É INTERNACIONAL E SEM FRONTEIRAS
ELA PERTENCE A TODOS NÓS

Quando permitimos que um país, qualquer que seja, passe legislações controlando a Internet, de qualquer forma que seja, estamos permitindo a destruição do maior patrimônio que a humanidade, como um todo, jamais possuiu.

Um projeto de lei preso à uma jurisdição específica não deveria ter a habilidade de afetar, de forma alguma, algo relevante para o mundo inteiro. Deveriam existir acordos internacionais para rígida proteção da integridade da Internet como ela é, e que garantem o direito de livre troca de informação, independente de qual ela seja e em que estado ela está (e.g. criptografado).

E sim, isso inclui informações consideradas ilegais. Como é impossível controlar o tipo de informação transmitida (como já expliquei), não faz sentido tentar impedir a sua transmissão. É impossível vencer essa luta. Ainda mais, já que o que é considerado "ilegal" é específico de cada jurisdição, e pode mudar a qualquer instante, a perseguição de tais crimes deve ser feita FORA da internet, investigando-se e punindo PESSOAS e não endereços de IP, e dentro dos acordos tradicionais de jurisdição internacional.

Então como parar a pirataria?

O que me leva ao próximo ponto, o problema da "pirataria", que é o que iniciou tais projetos.

Eu escrevo pirataria entre aspas pois o termo é incorreto. Um pirata não é um ladrão. Um ladrão retira algo de uma outra pessoa. O "pirata" digital faz uma cópia exata de algo, deixando o original intacto. Você pode argumentar que alguém deixa de ganhar dinheiro por causa disso, e você estaria parcialmente correto.

O conflito que existe aqui é que modernamente temos filmes, músicas e outros tipos de propriedade intelectual protegidas por copyright em forma digital. Como a informação digital é feita para ser facilmente copiada e distribuída, a distribuição de cópias ilegais deste conteúdo pela internet é extremamente fácil de ocorrer.

Os grupos que tentam combater esta situação querem impedir, em vão, a cópia e a transmissão destes dados, o que é impossível. Essa análise do problema, e a tentativa de solução, são completamente equívocas e idiotas.

A verdade é bem mais simples: o problema da pirataria não é tecnológico, ele é comercial. Sua origem é no relacionamento entre o consumidor e o vendedor, não no relacionamento entre consumidor e máquina.

Se alguém está pirateando algo, isso quer dizer que este consumidor em potencial já possui interesse naquele produto. Ele potencialmente investiria dinheiro nele, mas não o faz. Os motivos mais comuns são:


  • O valor comercializado é considerado excessivo. Exemplos comuns são jogos, filmes e álbuns distribuídos digitalmente com preços semelhantes ou maiores do que os distribuídos fisicamente. Fora o preço alto por outros motivos mesmo.

  • A pessoa não sente confiança em investir dinheiro no produto. Muitas vezes, a pessoa pirateia algo para "testar", e após o teste acaba achando que o produto não vale o que foi pedido. Muitas pessoas acabam comprando uma cópia legítima após piratear um produto.

  • O produto comprado honestamente é, ironicamente, cheio de avisos e proteções contra pirataria que acabam causando mais transtorno do que o produto pirata. Isso é frequente em DVDs/Blu-Rays, com trailers e avisos que você é obrigado a assistir toda vez que quer assistir ao filme, em músicas, onde você não tem a liberdade de facilmente copiar para outros dispositivos que você possui, e em programas e jogos, repletos de sistemas de segurança que muitas vezes são piores que programas maliciosos como vírus, trojans e outros malwares.

  • O produto não é disponibilizado de forma legítima na região onde reside o consumidor. Isso é cada vez mais frequente, e quem não mora nos EUA com certeza já sofreu muito disso.



Todos os 4 motivos são facilmente corrigidos, e todos já foram feitos com resultados surpreendentes para diminuição de pirataria, e grande aumento no lucro.


  • Valor excessivo: Várias empresas de venda de música, vídeo e software independentes conseguiram conquistar grande mercado através de um modelo acessível de distribuição digital. Serviços como BandCamp, Netflix e Steam tem obtido enorme sucesso em vendas e clientela por oferecerem produtos à preços acessíveis.

  • Falta de confiança no investimento: demos de software e jogos tem servido esse papel relativamente bem, com variados graus de sucesso. Tudo depende do jeito em que o produto teste é oferecido e apresentado. O mesmo poderia ser feito com filmes: imagine se pudéssemos assistir de graça 30 minutos de um filme antes de decidir se queremos assistir o resto?

  • Produto legítimo inconveniente em relação ao pirata: a compra de um produto legítimo deveria ser um bônus, não uma tortura. O consumidor legítimo deveria ser recompensado com conveniência e qualidade pela compra de produtos legítimos. Isso pode ser feito através de benefícios adicionais, remoção de propagandas, descontos futuros, entre outros.

  • Produto não disponível para todos os países: a solução seria admitir que existe um mercado no mundo inteiro, apenas aguardando a oportunidade de consumir. Facilitar e agilizar acordos internacionais de distribuição e comercialização poderiam facilmente resolver este problema. Quando consumidores de um país têm que esperar meses para conseguir legitimamente um produto já distribuído online, algo está errado. Isto apenas evidencia que o sistema precisa se adequar ao ritmo da Internet.

O mais legal é que TODA VEZ que uma empresa ou artista resolve se desprender destes modelos de negócio obsoletos tradicionais, os resultados são surpreendentes. Alguns casos de sucesso: BandCamp, Netflix, Steam, as bandas Radiohead e Nine Inch Nails com seus albuns "In Rainbows" e "Ghosts", o último especial do comediante Louis CK, "Live at the Beacon Theater", entre outros. Pessoas do mundo inteiro caem em cima de tais ofertas, e não têm medo algum de investir dinheiro em tais iniciativas, rendendo milhões de dólares aos seus autores em questão de dias.

Ou seja, o problema aqui não é a Internet, não são os computadores e muito menos os usuários.

O problema são corporações antiquadas, ultrapassadas e com modelos de negócio obsoletos que não souberam se adequar ao mundo moderno, e perdem dinheiro devido à pirataria justamente por não saberem aproveitar a enorme oportunidade de negócio que está à sua frente. Estas corporações sabem que se tornaram obsoletas por causa disso, e estão fazendo de tudo para se manterem relevantes.

Pra resumir:

PROTEJA A INTERNET COMO ELA É, E LUTE PELA EVOLUÇÃO DE UM MERCADO DIGITAL ONLINE JUSTO

É tudo que precisamos para salvar a Internet a longo prazo deste e dos diversos outros ataques à sua integridade.

OK, mas o que fazer na prática?

É bem simples: basta fazer sua voz ser ouvida. Eleja políticos que estejam em sintonia com o mundo moderno e o ecossistema comercial que engloba a Internet. Promova os ideais de liberdade de expressão e de utilização da Internet de forma livre.

Ajude à divulgar a importância da privacidade e liberdade online. Faça doações a fundações como a Electronic Frontier Foundation que luta pela integridade tecnológica em um mundo que ainda não se adaptou à era da informação digital.

Sempre envie sua reclamação à uma empresa que deliberadamente excluiu sua região como possível consumidora. Isso vale para vídeos e vendas bloqueadas, e versões locais de produtos com recursos diferentes da versão internacional principal.

E o mais importante, mobilize-se politicamente em luta contra as iniciativas que vão contra estes ideais de liberdade e inovação tecnológica. Fazemos parte de uma civilização em grande parte democrática. Utilize este poder como cidadão.

]]>
Wed, 18 Jan 2012 19:18:34 -0800 11_1326986603