Click here to Skip to main content
15,867,568 members
Articles / Programming Languages / C++

Nimbus-Arcade Style Puzzle/Strategy Game for Touch Devices

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
5 Nov 2019CPOL10 min read 13.5K   6   3
Nimbus is a casual arcade/puzzle and strategy game, currently in development and in final beta stages for touch devices.

This article is an entry in our AppInnovation Contest. Articles in this sub-section are not required to be full articles so care should be taken when voting.

Introduction

Nimbus is a casual arcade/puzzle and strategy game, currently in development and in final beta stages for touch devices. It will consist of various game modes; the primary being a story driven "world" based mode consisting of various levels where the objective is to acquire a particular amount of raindrops in order to proceed to the next level of the world.

Story Mode

You are Nimbus, the titular hero, chosen by the mystical water-basin to be the legendary rain-catcher. A cycle of centuries passed has begun once more and the ancient tree of Elegin has started to wither and without the water of the Gods, it will perish. With the choosing of the water-bearer, the god Aqueous has been summoned and his Mighty Deluge has begun! It's up to you now, pursue him through Forests, Deserts and caverns; play his game, prevent a great flood, save the ancient tree of Elegin and live in legend as the greatest Rain-catcher of all time!

The game is multi-gesture enabled; a tap on the respective side of the screen at the bottom will result in Nimbus moving in that direction and snapping to that column, the player can only catch raindrops in this standing position. There are 8 columns in which raindrops and other objects fall, however, the amount of these which are active is dependent on difficulty and the variable set for that level. Many elements of gameplay can be interacted with via tapping them and moving Nimbus Simultaneously; the player can tap raindrops whilst moving between columns, by strategizing the player can anticipate where they need to be and when in order to maximise the profitability of all raindrops which are currently falling and avoiding the detrimental effects of missing a catch or catching raindrops of the wrong colour. 

(Above) We see the player move to the adjacent right column by tapping on the right hand side.

In a similar vein to other games of its’ generation, the extent to which a player passes a level is entirely within their choice, for example, a casual player might be perfectly content with achieving the minimum score required, a bronze award and simply proceeding through the world whilst the perfectionists amongst us might strive to achieve that elusive maximum possible score and gold award for each and every level of a world. How does the player achieve a higher score? This is where the strategy element comes into play; the raindrops that a player must catch must be of a particular colour in order to contribute to the deduction of the raindrop counter for that level, this colour is signified by various elements such as the water-god Aqueous who sits upon his cloud at the topmost point of the screen and the magical pot that Nimbus, the titular hero carries. By only collecting the required colour the player builds his/her chain meter and with each increment of 10 successful catches, their chain level increases and the points per raindrop doubles, up to a currently maximum level of 4 (starting at 0).

The base points for each drop are indicated in the image below:

Sample Image - maximum width is 600 pixels

Therefore, a player wishing to achieve higher scores must maintain this chain without catching a drop of the incorrect colour. There is a catch to all of this, however, this colour changes at intervals and thus the player must adapt in order to maintain the integrity of his/her chain. The properties of raindrops also vary, The basic small and large raindrop, tapping these successive times will “pop” them, allowing the player control over their impact on the game; Colourless raindrops run through a cycle of each colour when tapped, making them a versatile link to success but they cannot be popped, the same applies to the almighty invincible raindrop whose base point value is the highest at 40 but is also impossible to pop under most conditions. This gives the player a clear indication of which drops they should prioritise by both colour and type. By developing their hand-eye co-ordination, sense of timing and multi-tasking skills, the player should be able to achieve some high scores.

The punishment for letting the drops you want hit the ground? A steadily rising water level, once this gets too high, it is game over! ­­Further to this, there will be several power-ups available to the player, these power-ups in the form of mystical fruits are caught like a drop and placed in player inventory; each of them has a unique characteristic that allows the player control over some of the more random elements of the game in order to achieve their goals faster, easier or more efficiently. These power-ups can be used in conjunction with each other; for example, a power-up that focuses all raindrops into a single column and another that changes all the raindrops to a particular colour would allow the player to chain successive raindrops with very little risk, combine this furthermore with the power-up that morphs all raindrops into invincible ones and you are well on your way to gargantuan scores.

(Above) The player uses a powerup that focuses all raindrops into a single column in conjunction with another powerup that changes all raindrops to the green colour required.

In the current version, these power-ups are set to fall, as raindrops with pseudo-random chance which can be altered, as with all elements on a per-level basis. But we have plans in the future to update this with a “shop” where the player can exchange currency either in the form of points or collected “coins” for power-ups; allowing them an initial advantage right from a levels start. The aim is to present the player with variety and a wide range of things to “do” whilst keeping the gameplay and objective simple; we are currently incorporating elements such as lightning bolts (latter worlds) tangling vines, falling rocks, foliage and other visually impairing elements and deviant boss creatures whose aim is to scupper the players attempt at becoming the greatest rain-catcher of all time.  Increasing difficulty presents itself with higher scores required to achieve awards, faster decent of drops, more frequent colour changes and various other factors such as the above.

All of these elements can of course be either avoided or interacted with to progress. This story driven mode will act as both a learning curve and supply the player with various unlockables such as hidden characters, achievements, etc. that will serve them in later game modes to be released. It is also hoped that the plot will be compelling enough to engage the audience so that they have the inclination to progress not only to face higher challenges but also discover the reasons behind the events that have unfurled. Above all else, the aim is to present a quality experience that utilises random elements in a structured and varied way.

Planned Future Game Modes

Endless Mode

This is a mode where the player will aim to achieve the highest score possible without losing, there are neither time-limits nor limits upon score or the amount of raindrops a player has to collect. The difficulty will increase with success, utilising the raindrop counter variable from the story-driven mode, the level of difficulty will increase with each 10 collected and eventually, this will cap (it might take a while though!) This might be otherwise known as a survival mode where high-scores are the primary objective; we hope to have worldwide leader boards for this mode. The difficulty levels in this mode will be determined by those seen in successive worlds in the story driven mode, starting with the easiest (Forest) and ending with the hardest (Volcanos).

Challenge Mode

This mode will utilise objectives such as “catch 3 green raindrops then 2 pink raindrops”, “catch all raindrops BESIDES the colour shown” or “catch 20 raindrops without popping a single one”. The aim of this mode is to shake up the knowledge and habitual gameplay the player has come to know by providing them with contradictory challenges.

Versus Mode

Taking advantage of the larger screen size afforded to desktop devices, a desktop version could have some brilliant potential for a split-screen versus mode against players either locally or worldwide. Here, players could tap each others raindrops to prevent each other from increasing scores, or even use power ups AGAINST the other player in order to break a chain and ultimately, cause their opponent to fail first.

Using the Code

Nimbus is written in C++ and uses exclusively core Windows libraries.

One of the biggest challenges of this style of game has always been the implementation of a fitting collision system. Many opt for pixel perfect collision, but after weeks of trying out different methodologies, it was decided to embrace and incorporate the very natural Nimbus control system with a mask hot spot indicator. The mask is the Pot held by Nimbus. All drops and power ups were formatted as tiles of the same size, and this enabled the use of a simple grid locator system for both tile movement and very straightforward collision detection.

Whilst Nimbus is moving from column to column, the mask hotspot acts as a depth mover - any collision with drops or powerups, will move these tiles to a foreground depth, as these tiles were missed to be caught. Further tile collision on this particular depth is ignored.

Once Nimbus is in stationery position, ready to catch an incoming drop or powerup, the mask hotspot temporarily blocks any player movement, allowing the tile to disappear inside the pot. The main Nimbus character consists of two superimposed tiles on two different depths, to enhance the illusion of a drop or powerup going right inside the pot, on an in between depth level.

The following is the collision code that handles a caught raindrop:

C++
if (nimbus::collision(raindrop[this].id, nimbus_mask.id)
{
    if (raindrop[this].y<(nimbus_mask.y-62))  // player has a leanway of 62 
           //pixels to 'run away' from a falling drop
    {
        nimbus_donotmove=true;
    }
    else if (raindrop[this].y>=(nimbus_mask.y-62) && raindrop[this].dead==1 
              && !nimbus_donotmove)
    {
        raindrop[this].dead=2;
        nimbus::ChangeDepth(raindrop[this].id, depth_raindrops_bottom);
    }
    else if (raindrop[this].y>(nimbus_mask.y-27) && raindrop[this].dead==1 
              && nimbus_donotmove)  // raindrop tile is now 27 pixels inside pot
    {
        nimbus_donotmove=false;
 
        if (raindrop[this].color==current_color)
        {
            CaughtRightDrop(this);
        }
        else
        {
            // a raindrop of the wrong colour was caught        
            PlaySound(wrong_dropcatch_sfx, sfx_channel);
 
            if (mood!=2)
            {
                mood=3;
                nimbus::SetWaterGodMood(mood);
            }
 
            switch (raindrop[this].drop_type)
            {
                case 2:
                    rise_waterlevel=waterlevel-3;
                    // small raindrop, water level rises less
                    break;
                case 4:
                    rise_waterlevel=waterlevel-6;
                    // big raindrop, water level rises more
                    break;
            }
 
            points_chain=0;
            points_chainmultiplier=1;
            Smoke_Frequency=2;
        }
 
        nimbus::GenerateNewRaindrop (raindrop[this].id);
    }
}

The drops generation class generates drops and powerups at random, using defined parameters specific to the current level. Every level has a predefined preference as to how many drops of one particular colour over another colour can be generated, and what % of the generated tiles are powerups or standard drops.

The following is the Raindrop data structure. It is used to hold all position, size, colour and status information on all tiles both for raindrops and powerups:

C++
struct RainDrop
{
   int   id;
   float x;
   float y;
   float size;
   int   alpha;
   int   colour;
   float speed;
   int   dead;
   int   times_clicked;
   int   drop_type;
   int   points;
   int   status;
   bool    aligned;
}

Nimbus utilises a rudimentary particle system. The following is the main particle structure, with all relevant properties defined:

C++
enum ParticleType {Create, Update};
 
struct Vector2d
{
  double x;
  double y;
};
 
struct Particle
{
  Vector2d position;
  Vector2d velocity;
  int age;
  int lifeSpan;
  int colour;
  int starting_size;
  int grow_factor;
  int angle_span;
};

The Create constant defines the status of an existing particle. If the particle is dead, it is replaced by creating a new particle at a new screen position. Forces are applied to individual clusters of particles to have different effects, but the most used are the 360 degrees bubble burst, the 'drop hits water' 180 degrees splash, and the cloud of smoke from Nimbus' pot.

Points of Interest

The Ultrabook version of Nimbus will make use of all possible Ultrabook sensors. Touch and specific gesture moves will be implemented in the core gameplay.

The Light sensor will generate an additional layer of visual effects, depending on the particular level, with darkness & daylight being the most prominent examples. In one particular example; an end of world foe who blends into the environment is revealed with greater detail dependent upon the level of light.

The Gyrometer and Inclinometer sensors will be used to aid Nimbus fend off end of World foes in a more physically articulated way than those permitted by standard gestures.

In future versions, the Geo Location sensor will be used to customise the look of the environments nimbus travels through to that of actual locations of the players.

History

  • 22nd October, 2012: Initial version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
23 year-old with a passion for all things Design, primarily game design. Hobbyist with a day job that regrettably, simply pays the bills; having a project to come home to is what keeps me alive; I would love nothing more than to work within the game design industry as there are not many things that bring as much of a smile to my face as devising new ways to entertain and excite the end-user. I want to surpass my own expectations as far as what I am capable of, improving upon skill sets and adding new ones to the roster. Ultimately I love the cycle of Conceptualization, inspiration, application, development and finally, realization turning what were once dreams and ideas into living, breathing, exciting products.

Comments and Discussions

 
GeneralMy vote of 5 Pin
Cliff Mellangard7-Dec-12 22:48
Cliff Mellangard7-Dec-12 22:48 
I completely love the art style.
Wath tool do you use to draw?
Iam my self doing more pixel retro art and use paintshop pro 5 to x.
I hope you manage to grabb a 10 000$ prize to invest in an future of app making.
GeneralRe: My vote of 5 Pin
Aaron McGrath10-Dec-12 3:10
Aaron McGrath10-Dec-12 3:10 
GeneralMy 5 Pin
BigWCat22-Oct-12 9:17
professionalBigWCat22-Oct-12 9:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.