Beneath The Sea is the game I created to Ludum Dare 29, under the theme “Beneath The Surface“. In this post I will talk a little bit about how was the process to create it, including all the good and the bad things that happened on the way.

icon

The Game

As all Ludum Dare games (in the solo competition), this game was created in 48 hours. Well, actually, it was around 30 for me.

Initially, I was thinking in creating a platform game using physics and tiles. The player would have to run, jump, grab and climb to make his way out from a desolated and unknown cave. I would like to related this “run-away-from-a-dark-cave” game with clinical depression and how hard is to be free from it and how easy it is to fall into this dark cave.

That wasn’t going very well. I’ve implemented the tile system using CreateJS and Tiled and integrate the physics engine. But after 12 hours, I’ve realized that it is pretty hard to create a good platform game. I mean, you have to tweak a lot of variables to make a satisfactory gameplay. To make things worse, my plan also included pixel art, but I also realized that I have no idea how to create pixel art!

So, in half Saturday, I forgot my first idea and had to formulate a plan B. Now, I wanted to create something simple, using only the mouse or a single key button, and I wanted to create something using vector art, because I can do it on Inkscape pretty well.

Last week I was taking a look into the Orisinal games, and I remembered their Silent Water, which is an example of simplicity and which I could based my game.

With these conditions and references, Beneath The Sea came up. I thought in put the player in the charge of a battleship with the task of killing the evil summons of an ancient badass god, holding them as long as he/she can. I know that this isn’t an original idea, but it was what I could do with the 30 remaining hours.

Graphics

I’ve started with the background and the core sprites because I think it is easier to see want you will need in the game – despite the fact, that is so much better to program a game with pretty graphics.

I choose to use only silhouettes to represent the battleship, the bullets and the creeps because it was the easier and faster alternative I could find. Silhouettes also have the advantage to work well with a various graphical styles.

The background was based on classical vector art tutorials, other water games, and sponge bob. If I had more time, I would make the clouds, sun and water animated. I also wanted to put some bubbles and explosion effects, but the time was short.

Programming

Programming Beneath The Sea was pretty easy. I used the CreateJS bundle and some utilities functions (such as scene management, scene transitions, layout management and flexible images) I had here. Notice that, you can only use personal code if you make it public before the beginning of competition.

The code logic is pretty simple: create creeps and make them go toward the surface; create bullets and make them go toward the bottom; check collisions among bullets and creeps; check collisions among the ship and creeps.

Then, after a long night of work, and an exhausting Sunday morning, I had the games mechanics ready to go.

Sounds

Sounds were my biggest problem. I had no previous experience on audio edition or composition and I only know how to use Guitar Pro.

As a priority, I created the main music, which is the most important audio in the game. You can’t put several sound effects without a background music! I’ve based on the Terminator theme, with a lot of bass beats. After trying several instruments, melodies and combinations, my music was complete.

For shoots sounds I’ve used drum beats amplified and equalized on Audacity. To the explosion I’ve recorded the sound me lightening a match, and slowed and equalized it on Audacity. Finally, for the overheat signal I’ve just whistled.

I hate the sound effects I put on Beneath The Sea, I had just a few hours to finish the game and I still needed to adjust the gameplay and the kongregate api.

Gameplay

I’ve tweaked the gameplay as fast I could. I added the overheating system to control the bullet flow and created a mechanism to increase the spawn rate of creeps and weapons relative to the time.

Summary

Based on my experience on this Ludum Dare, I can summarize some important things:

  • Keep It Simple, Stupid! I didn’t followed the KISS principle when I was creating the conception of the game on Friday night. As a result, I’ve lost a lot of precious time.
  • Do what you know. My first plan involved too many technologies, mechanisms and techniques that I am not familiar with. You can’t learn everything in 48 hours.
  • Take a break, periodically. The lack of sleep and fatigue are your enemies. Without sleep, you can’t concentrate very well, so you need to take some breaks periodically to rest a bit.
  • Make TODO lists. Without concentration, you lose efficiency and time, so, make TODO lists to keep tracking what you are doing. Before starting the development of the game, create the TODO of the features. Before starting each feature, make a TODO of the tasks need to complete the feature. Before each task, make a TODO of simple changes and additions to the game.
  • Prioritize the features of your game. You probably won’t finish your game, so, prioritize the core features. If you finish the important parts and got some time, then you can do the fluffy things.

Results

Check it out the screenshots of the game:

You can play Beneath The Sea on kongregate

You can see the entry on Ludum Dare

Read more

The final round for choosing the theme of Ludum Dare 29 has finished and the result is: “Beneath the Surface“. Interestingly, it was the only theme with accumulated positive votes (take a look: http://www.ludumdare.com/compo/ld29-theme-voting-round-5-of-5/).

I don’t yet what I will do, but I want to keep the game simple with just few commands (probably using only the mouse). I also think that, mostly people will go for the obvious representation of the title, which is doing something below the ground, with miners, plants or something in this line. Thus, I will think about other types of possible surfaces (e.g., the surface of an orange or the geometrical surface).

I will use this night to think in something.

Read more

jscramble logo

I was looking for what HTML5 game developers do to protect their source codes. Coincidentally, Emanuale Feronato made post last week about JScrambler, which seems to be the state-of-the-art of free tools in protection forĀ  Javascript codes.

Protecting your code is important for several reasons. Javascript is an interpreted client-side language, which means that the browser of the final user will read the code and execute it to run the game, and this same code can be accessed by the user simply looking in the page source code.

Now, suppose that your code is neither minified or obfuscated. In this case, the final user will see the exactly the lines you wrote. With this, he can: copy and modify all components of your game with the minimum effort and re-distributed as a completely new one; hack your code to submit scores without even playing your game; among other undesirable things.

Notice that, as Javascript runs in client-side, there is no real way to avoid the user to see your code and to stop him to try to decode it. But, you can make your code as harder as possible to decode. This is what JScrambler do, makes your code hard to read, to copy, to modify, and to redistribute without your permission.

Look at the following example. The code below is a function that merges two different objects, just like jQuery do:

(function() {
    
    "use strict";

    var merge = function() {
        var obj, name, copy,
            target = arguments[0] || {},
            i = 1,
            length = arguments.length;

        for (; i < length; i++) {
            if ((obj = arguments[i]) != null) {
                for (name in obj) {
                    copy = obj[name];

                    if (target === copy) {
                        continue;
                    }
                    else if (copy !== undefined) {
                        target[name] = copy;
                    }
                }
            }
        }

        return target;
    };

window.merge = merge;
}());

Using JScrambler you get:

var I2Y={'n':function(Y,R){return Y!=R;},'g':function(Y,R){return Y===R;},'H':function(Y,R){return Y!==R;},'d':(function(J){return (function(N,G){return (function(k){return {I:k};})(function(W){var V,j=0;for(var M=N;j<W["length"];j++){var e=G(W,j);V=j===0?e:V^e;}return V?M:!M;});})((function(S,Z,v,U){var O=26;return S(J,O)-U(Z,v)>O;})(parseInt,Date,(function(Z){return (''+Z)["substring"](1,(Z+'')["length"]-1);})('_getTime2'),function(Z,v){return new Z()[v]();}),function(W,j){var B=parseInt(W["charAt"](j),16)["toString"](2);return B["charAt"](B["length"]-1);});})('6i2bf2j20'),'t':function(Y,R){return Y<R;}};(function(){var h=I2Y.d.I("fe3d")?"use strict":"merge",z=I2Y.d.I("a6")?null:function(){var R=I2Y.d.I("b2")?"H":"target";var A=I2Y.d.I("f1")?"length":"g";var c=I2Y.d.I("8858")?null:"length";var p=I2Y.d.I("b331")?"target":"n";var E=I2Y.d.I("2c3")?"t":"obj";var P=I2Y.d.I("abf8")?"target":"length";var L=I2Y.d.I("dcf")?null:1;var s=I2Y.d.I("74")?0:null;var X,o,l,b=arguments[s]||{},q=I2Y.d.I("36")?L:"length",T=I2Y.d.I("cbb4")?"obj":arguments[P];for(;I2Y[E](q,T);q++){if(I2Y[p]((X=arguments[q]),c)){for(o in X){var w=function(Y){l=Y[o];};w(X);if(I2Y[A](b,l)){continue;}else if(I2Y[R](l,undefined)){var D=function(Y){b[o]=Y;};D(l);}}}}return b;},u=function(Y){var R="merge";window[R]=Y;};h;u(z);}());
Read more

Ludum Dare is an online “competition” that happens every 4 months and you can participate by yourself or with a team. The solo competition is the most traditional event where you:

  • Have 48 hours to create your game;
  • Must work alone;
  • Create your game based on the theme;
  • Make available the source code;
  • Can use any content and development tools (such as Photoshop and Flash);
  • Can use personal code (if declared and shared prior to the competition);

There is a list of possible themes that are voted by community, at this moment, we have in the final round themes such as: “Control More Than One”, “It’s NOT suppose to do THAT!”, “You Are Your Own Enemy”, among others.

Ludum Dare 29 will happen this weekend. Next week, after the 48 hours, community will judge the games. All participants that SUBMITTED a game can do that, giving star ratings (1-5) in 9 categories: Innovation, Fun, Theme, Graphics, Audio, Humor, Mood, Overall and Community.

My first and last Ludum Dare was the #24, where I create Hungry Flies, based on the “Evolution” theme.

I hope to make a good game this weekend.

Read more