How to add a CCLayer with transition effect in current running CCScene

by on Mar.05, 2014, under Cocos2d-x, Technical posts

Let’s imagine that in our current running scene we would like to show a new control. For example a new window (box) containing a menu option, or some new information we would like to display. We can just build and place it in the screen, but this could be a bit boring. I will try in this post to add a new layer containing the mentioned control using some transition effects. The same kind of effects that you can use when replacing the current scene with a new one. So let’s try to accomplish this “kind of” transition effect. (continue reading…)

Leave a Comment more...

Global Game Jam 2014 in Amsterdam !!!!

by on Feb.05, 2014, under News

Probably many of you know what is a Game Jam.  There are many out there as Ludum Dare, Global Game Jam, ….. I have been trying to attend a Ludum Dare for the last year or so together with my buddy @Stilghar_ . Finally we have decided to attend the 2014 Global Game Jam edition in the Amsterdam location. I can say before going in deep detail that has been an awesome experience, and I am really looking forward to my next Game Jam (Probably the next Ludum Dare in April). (continue reading…)

Leave a Comment more...

Kevin: a 2D platformer made in the 2014 Global Game Jam

by on Feb.02, 2014, under Projects, Unity 3D

The last week end (24th to 26th of January) took place the 2014 edition of Global Game Jam (you can find more info about this here). What is a game jam …. well basically you have to develop a game (usually a video game) in 48h.  As they describe it in their web page a Global Game Jam is:

The goal is to come together and make a video game, or non-digital game like a board game or card game. We share a common theme and constraints. We ask participants to create a game from beginning to end in  a prescribed time (maximum of 48 hours). The brief time span is meant to help encourage creative thinking to result in small but innovative and experimental games.

(continue reading…)

2 Comments more...

How to create & write a CCDictionry into a file in cocos2d-x and c++

by on Jan.03, 2014, under Cocos2d-x, Technical posts

Imagine the following scenario in your game development process: sooner or later you will need to store some information in order to load it again next time the player would like to play. In this project I will need to store some simple game player information as number of levels played, levels succeeded, time used to complete them, points win, …. and few more variables. As you can see, they are just a few variables, so using solutions as SQLlitte3 could be maybe too much. (continue reading…)

8 Comments more...

Customized Timer Control in cocos2d-x

by on Dec.16, 2013, under Cocos2d-x, Technical posts

Lately I came across in my cocos2d-x project (this) with the need of creating a Timer Control. I wanted to display the time using the following format: mm’:ss’ (inside this timer control). Also I wanted the text to become yellow or red after a period of time (even blinking when displaying red color).

I decided to create a control extending CCNode and containing 2 CCLabelTTF objects. Using 1 for displaying minutes (00′) and another one for displaying seconds (:00”). Summarizing this new extended control will have the following behavior: (continue reading…)

2 Comments more...

Extending CCProgressTimer to use different sprites depending on percentage value

by on Nov.14, 2013, under Cocos2d-x, Technical posts

I have developed a little extension for CCProgressTimer control in cocos2d-x. I needed to use different images (sprites) for my progress bar depending on the percentage, and I did not want to enter that code into my Scene’s code. Let’s Imagine the following case:

We have a progress bar and we would like to use a different CCSprite depending on the percentage. For example a green bar when the values are between 25%-100%. Then when below 25% an orange bar (or even more, a different one for each 25% block). Of course we can control this using a simple “if” statement in our “update” logic. But as our game’s code size would increase, it could be a bit messy. I decided to create an extension from CCProgressTimer. It works in a way that every time we assign a new “setPercentage”, it will check which sprite is supposed to use. Having stored previously all sprites in std::map, including the percentages in which that sprite shall be used. (continue reading…)

Leave a Comment more...

Projects coming up soon

by on Oct.11, 2013, under News

It has been a while since my last update after the Iron Man. I went on holidays first (well deserved), and then in September I had a lot of work / September has been a very busy month at work. Also with my two little projects going on, preparing a presentation for one of them and an alpha release for the other. In summary, coming back to routine. (continue reading…)

1 Comment more...

Zurich Iron Man 2013

by on Aug.05, 2013, under News

First of all I know this is not games programming or video games related subject, but this is a personal achievement I would like to share with all of you :). I would like to do it because it took so much of personal effort, time and ….. everything that

Last July 28th of 2013 I ran this year’s edition of Iron Man Zurich. Yes… 3,8 km swim + 180 km bike + 42 km run. All in one go in around 14h. As one of my friends said it was “against all odds”. I got sick 1 week before with a flu (even laying in bed for a few days). To make it even harder the weather decided not to be in our side. 37 degrees (Celsius) at race day what was extremely hot.  So let me explain how was “race day”: (continue reading…)

Leave a Comment more...

How to use a progress bar in cocos2d-x and C++

by on Jun.14, 2013, under Cocos2d-x, Technical posts

Sometimes in our games we need to add a progress bar. We can use it to show the remaining fuel of a starship, car, … . We can also use it to show the loading progress between two different scenes, loading a new level, … . There are few examples out there on how to do it, but they are mainly for the Iphone version of Cocos2d-x. I would like to share with you how I build mine to show the remaining fuel of our balloon. (continue reading…)

Leave a Comment more...

How to create a Menu in Cocos2d-x using Sprites Sheets

by on May.21, 2013, under Cocos2d-x, Technical posts

I would like to write a post about how to use a texture sheet and a CCMenu object together. In other words, use a single image as a container with all our menu single images. This technique is called “texture sheets”, and is one of the features available in cocos2d-x that will make our games easy to develop. Using a single image for all textures will make this process easy to manage, and better handled by our mobile device graphics card. (continue reading…)

13 Comments more...