Chapter 6. Predation – Creating Powerful Visuals from Simple Effects

Corona is a two-dimensional engine that currently focuses on mobile development, which means that the devices it targets are limited in their graphical processing power compared to desktop and laptop computers. Nonetheless, most of these devices have enough graphics power to make them comparable to, say, 32-bit game consoles, and they are easily capable of compositing images, layering elements, and clipping images or groups to a mask. While the engine doesn't currently support the dynamic creation of masks or sprite sheets, some creative application of the effects that it does support allows for a wide range of effects to be created with very little code.

What do we build?

For this short project, we will take a functionally complete game and apply some visual polish to it. This game, Predation , is a relative of the classic arcade game Missile Command, where zombies that explode into pools of diseased, corrosive blood when shot, are substituted for the explosive missiles of the original. However, currently the graphics are a bit crude; the zombies simply vanish when the blood pools eats them away, and the blood pools are perfectly round, flat pools of red color.

What does it do?

In this particular project, we have a game that is already feature-complete. You can play all the way through it, tapping the screen to dissolve marauding zombies in to fast-evaporating pools of caustic goo and turning the zombies into new pools of goo in the process. Instead of adding new functionality, we're going to focus on plussing , or juicing , the game before release. These are terms used by some game developers to refer to the process of looking at a game or other work in progress and looking for the parts of it that can most easily be made plus one or plus ten percent to improve value and appeal for the effort, or pumping juiciness into the game's presentation.

Zombie games tend to be aimed at a market that's interested in gore and explosions. While going over the top in this regard would be both expensive and potentially draw us some complaints, we can add some eye-catching appeal with only a little work. Ideally, the zombies should appear to dissolve or break up as the goo washes over them; we can simulate this by using a sort of tone effect to erase them a bit at a time. We'll also liven up the blood pools with some texture, liquid shine, and some variation in the outline.

Why is it great?

This project will showcase the extreme ease of coding most visual effects and transitions in Corona. While to some extent this is offset by the need to create mask images and effect templates, the effects images used for this project were created using the free image software GIMP (the GNU Image Manipulation Program, available at http://www.gimp.org/) in under half an hour apiece.

How are we going to do it?

This project is quite short, and for a change, some of the steps we're going to review have nothing directly to do with writing code. This is because writing the code for Corona's transitions and visual effects is absurdly easy. The challenge in producing good visual effects in Corona is not coding them, but planning which effects will produce the desired results. We will be covering the following topics in this project:

  • Planning the dissolve
  • Applying the dissolve
  • Planning the blood splatter
  • Assembling the splatter layers

What do I need to get started?

You should create a new empty project directory called Predation, and copy the contents of the version 0 folder in the project pack directory. This game is functional, and you can try running it before we start modifying it.

Tip

Familiarizing yourself with something before you start changing it is always recommended.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.93.222