Easy Lighting Extension for Game Maker


One thing I’ve picked up on by reading developer’s forums and various articles on the Internet is that while Game Maker can do almost everything you could want it to, it doesn’t necessarily do it well.

I noticed this myself during my last Game Maker creation when it came to audio. Despite the fact that it gives you the option to use .mp3 format audio, it turns out that it doesn’t support most types of .mp3 (or some such nonsense.) I ended up using some hefty .wav files, which Game Maker compressed during the gameplay and completely changed. The majority of my sound effects seemed to sound like static! This is why people with the technological know-how have stepped in to save non-programmers by providing downloadable extension software for GM, including several which improve audio handling, which seems to be GM’s lowest point.

When it comes to in-game lighting, I’ve previously found ways to cheat by overlaying semi-opaque objects on top of light-emitting objects. In Somnium I used this to make some objects appear to glow, however this ultimately had no effect on the game’s lighting on the whole. The image above is an example of an extension called EasyLighting V7.0.2, which handles light generation in Game Maker. It is the same extension which Gabriel Verdon uses to create his moody, atmospheric lights in The Archer.

As you can see from the top example, there are two types of light generated. One is a dim, yellowish light and the other is a bright white light which casts shadows off the objects around it. Both of these lights use the same sprite image, which is a circle shape with a radial gradient. This is similar to my previous lighting “objects”.

However, the extension settings are used to draw these sprites to certain specifications, rather than simply overlay the same image in the same way repeatedly. This reduces the amount of sprites and used, and helps game performance.
You can read an in-depth description of all the extension’s functions in this tutorial here, which also runs through how the extension works and how to implement it!

The advantages of using a lighting system like this one is that it can help create the game’s desired atmosphere. The lights work by first applying a colour overlay, which immediately changes the tone of the game. Each light then has its own individual colour and brightness, which can give a really good sense of light and dark in the game.

To test the extension, I made some street-light style lights in the Grandma Engine. I recorded a quick little demo of the lights in action so you can see how effective they are in changing the ambience of a room. I’ve tried to capture the difference in the colour of the character (square) when under and away from a light source. These lights worked especially well at highlighting objects when several were placed close together.

Character Sprites: Hana & “Za-Chan”

This morning I set myself a goal to finish two sprites for the two game characters I have so far, which initially seemed like an easy task but has consumed most of my day so far. I’ve learned in the past that a good way to create a pixel-art sprite is to draw it by hand first, scan the image and reduce it in size. This blur of pixels normally roughly shapes out a sprite, which can be traced with something like the pencil tool in Photoshop and transformed into some semblance of order. If you try to use this method for a sprite measuring only 16 pixels in height, you kind of end up with a grey square. So that method was pretty much out of the question! Time to rethink.
As a cheeky starting point, I figured I could see what works well by creating a Hana character in the style of existing games. I chose four really different sprites, which have similar measurements but use really different styles.

Top left: Gomez from Fez
Top right: Quote from Cave Story
Bottom left: something from Rogueline (I don’t know much about this game but the art looks really great. Check it out!)
Bottom right: NPC from The Archer
Right: Sylva from Somnium! This was my own project, which acted as my introduction to the world of game design. Obviously, the sprite is double the size of the other examples, I just though I’d throw it in there for fun.

Hana in each of these games:

Surprisingly, I quite like the fat-girl Hana based on my previous character sprite from Somnium, and tried reducing this in size to see if it could work:

My second favourite had to be the Gomez clone, as it resembled the style I used in my original concept art cartoons. The style I chose to draw in was simply a quick way to get a good impression of a character, however the star-shaped figures seem to translate well into the pixel world. I tried to conceptualise what this style would look like in a small, simplified way which I could use to create an original character sprite!

The two characters I currently have are the main character Hana and the antagonist Zashiki-warashi, which I have abbreviated to Za-chan for now until I properly name her! The sprite designs are based on my original drawings, and things I like about my Fez and Somnium character clones. Here is my pixel interpretation of the two:

Both a prone to refinement over the next few days, as I try to animate them etc. Also, if they resemble sprites from other games too much I will have to re-think the design completely.

Yesterday, I added a little bio for Za-chan* to the GDD, which explains a lot about her past and her motives for causing mischief. It’s a little long-winded, but the story is starting to come together at least:

Za-chan chose residence in a large house in the late fifties, and decided to stay permanently due to the welcome of the family and the space and qualities of the old house. The family consisted of a married couple and twin girls, who she frequently played with when they returned from school. Za-chan felt like she was part of the family, and almost forgot her naturally mischievous nature. While Za-chan was around, the family received a hefty income, the ageing house remained in good condition and Sakura always bloomed for long periods in their garden. The parents made a Za-chan kokeshi doll as a gift for their daughters, and a thankyou to the spirit for the bringing of fortune. However, as the girls grew up they forgot their friend and often stayed away from the house for long periods of time while Za-chan started to feel increasingly lonely. One day, Za-chan decided to go outside of the house and climb a Sakura tree to see where the two girls were going. As soon as she left the house, it started to creak and warp very slightly. She continued to leave the house to watch the two girls, jumping from tree to tree and every day getting slightly further away from the house. Every day, the house would start to crumble a little more. Eventually, Za-chan became angry with the girls for leaving and never went back to the house. She stayed in a Sakura tree where she could watch people and feel less lonely, and eventually picked up her mischievous ways once more by throwing things at passers by. Her old house fell to disrepair, and the family moved away. They boarded up the house, leaving the kokeshi doll inside as they considered it a sign of bad luck.
Eventually, bored of annoying pedestrians, and ultimately more lonely than ever, Za-chan conjured up her most mischievous act yet. She burrowed into her Sakura tree and spread her consciousness out among the blossoms. As they began to fell around the crowds of people around the tree, she used the blossoms to kidnap the souls of her new “friends” and bring them to the spirit world where she could satisfy her loneliness.

*In Japan, the suffix chan is applied to the end of the name of a child, or among female friends. I’ve noticed in anime that older characters abbreviate younger characters’ names to the first syllable and add “chan”. Za-chan doesn’t have a particularly nice ring to it, but I’m working on a real name RIGHT NOW.

Tiles & Sprites

I may have been wrong in a previous post where I stated that character sprites were often double the height of a single tile in 2D games. I’ve been working out some background tile to character sprite ratios, and firstly have found that there are very few recurring ratios, and secondly that there are a lot of games which use character sprites that are exactly the same height as their background tiles.

Most interestingly is that I hadn’t noticed this yet in any of the game I’ve previously written about on this Blog. In my head, I think I assumed that character sprites needed the extra detail provided by double height.

In Fez, Gomez measures the exact same height as the background tiles (with the exception of The Fez which sits on top of this height).

Again, in The Archer the character sprite and tile height are very similar, except for hats which seem to cause the illusion of height in games!

In Jonathan Lavigne’s Ninja Senki, the character sprite is not only the same height as the background tiles but is a pretty similar width too!

And in Cave Story, the character sprite for main character Quote is the exact same height as the tiles, however the NPC character is slightly taller.

What confuses me about this selection of new(ish) games, is why they all decided to work to these proportions. From an aesthetic point of view, I think it makes everything look neat and tidy, as every aligns nicely to a consistent grid. I can imagine that from a gameplay perspective, these proportions work in the favour of the player who must calculate jump and fire distances etc. However when I looked back at old NES platformers like the original Castlevania, Contra, Ghosts ‘n’ Goblins and Metroid it seemed that traditionally, character sprites were double the size of the background tiles (actually, in the case of Contra I couldn’t decide what size the tiles actually were, so I could be wrong!)


Background tiles half the height of character sprites:

One slight exception I found amongst old NES platformers, was the original Super Mario Bros, and similarly Kirby’s Adventure. In Super Mario Bros, Mario starts the game as a half-sized sprite, which is roughly the same shape as the background tiles.

However, this reduced size is probably just a way to leave room for growth when a mushroom is eaten:

This might similarly explain Kirby’s small size in Kirby’s Adventure, as Kirby expands when swallowing an item or enemy.

In this case, it’s probably just more likely that Nintendo have tried to show how small Kirby is in comparison to the world!

Even as we move into the world of 16-bit, sprite sizes remain consistent with previous versions of games. In Super Mario Bros 3, the sprite proportions remain pretty much the same as the original. In Super Matroid for SNES, character Samus seems slightly taller than before. She does wear a helmet though, so this additional height is another one of those hat things…

So the question is “who is right??”
After reading various forums, the general consensus is that it all dimensions are entirely the choice of the designer. There is no right or wrong, or good or bad. Which leaves me at a point in development where I need to make a choice… So for now, I’m going to concentrate on creating a sprite equal to the height of my (hypothetical) tiles. This means creating a sprite which is 16 pixels in height, rather than the 32 I was expecting to be using. Personally, I think this makes the game look nicer and hopefully will make it play fluently. I will have to convert if I find it difficult to add a decent amount of detail to my sprites, or if the space limitations make it difficult to animate, although I’m feeling pretty confident and inspired by my Indie Heroes who have proven 16px sprites to be ideal!

Early Art Development


Phil Fish’s devlog for the upcoming game Fez begins with a Photoshop mock-up of his game idea, made in the exact style that the game would be made in. With my cute character in mind, I started to get some ideas of how I wanted the game to look, and the kinds of colours I wanted to use, that sort of thing. So I thought I’d do the same thing. This would also act as my introduction to making tilesets for games, which is something I’ll be doing for the first time during the development of Hanami. I drew up the sketch above to get me thinking about what sort of objects would appear in the game a lot, and tried to assemble them into a small demonstration of the look of the game. It also led me to think about scale for the first time, as games are often way out of proportion. In a screenshot of Fez, a fan pointed this out for example:

However, the strange proportions are necessary based on the size of the tiles used. I worked out that Fez uses tiles which are 8×8 pixels in size, but these are expanded by about 5x when the game is played. This gives the game its very square feel, as there is little room for small details within each tile.

Games like The Archer and Cave Story use 16×16 tiles. While these don’t have to be more detailed, the opportunity is there, so for now I’m planning to create tiles which measure 16×16 pixels. By applying tiles to the sketch, I came up with this solution, which is by no means refined or finished:

I started by applying the 16×16 grid to the image, and draw a rough outline of the shapes as they would fit into that grid. Obviously, only background imagery really has to fit the grid perfectly. Objects and game items don’t have to consist of tiles, although in this case the tree seems to stand out a lot from the rest.

I mainly tried to concentrate on the tiles for the ground, as this was a single strip of tiles which were very easy to place and repeat. The difficulty was making enough that they weren’t too repetitive! I also tried to make sure they weren’t too overcomplicated at this point. Most of the tiles could be repeated and placed anywhere, but I made special end tiles with rounded corners which would only ever be placed on the ends!

As well as seamless tiles, I tried out creating single tiles. This closed type of tile is used in all three of the example games I’ve given in this post already, and make it even easier to repeat tiles into any form. In this case, each tile has an edge and stands out on its own, rather than fitting in to a bigger pattern.

I later added in a little more detail to the grass line, and made basic block-colour tiles for the background of this image. The tree is pretty much freehand at this point, and doesn’t adhere to grid or guide. I’m not sure if this is something I want to use much for background imagery, however it seemed to work well for the clouds in the very background. This image ended up looking very bright, and in my opinion a little too bright. The colours at this point are very inspired by Fez, but only for experimental purposes!

The placeholder character silhouette fits into a 32×32 square, which is a pretty standard character measurement in classic games. In terms of proportions, this means that tiles can sit at half the character’s height, representing accessibility. Tiles which create a vertical surface equal to or above the height of the character represent inaccessible areas, without having to take up too much room on screen.

Hanami Idea Explosion!

I guess this is a little like brainstorming, only it’s more of an explosion of words. I can’t think of a better name for it, especially one that sounds as exciting!
I got this idea from Gabriel Verdon at the beginning of his Devlog for The Archer. He begins development with a quick introduction to the concepts behind the game, and his objectives for the finished result. As a quick introduction to the characters and settings for the game, he takes a simple statement and pulls apart separate words to explain further details. With the ideas I’ve got at the moment, I guess my opening statement would be:

A lone girl travels empty streets collecting cherry blossoms.

To make the statement a little more specific, I thought I would expand it to:

A long girl travels through the empty streets of Japan collecting Cherry Blossom after Hanami.


It’s still quite a vague overview, but I’ve left room for improvement ^_^.

Notes:

-Hanami- Gameplay is based around environmental obstacles. The player must find blossoms in hard-to-find or hard-to-reach locations, although I’m not sure yet whether this will be with the aid of special abilities or if the challenges will be fairly similar the whole way through. This will ultimately depend on what I manage to program.

-Feel of the game- There will be a conflicting sense of both loneliness and serenity throughout, achieved through lack of player communication and a peaceful setting.

-Symbols- Japanese written characters (Kanji) will appear throughout, as well as traditional Japanese symbolism such as the Sakura blossoms themselves, which are an ephemeral symbol of mortality.

-Music- I would like the music to sound like a typical “game soundtrack” (repetitive, electronic, catchy yet annoying.) But I also want to base it one traditional Japanese tunes, to help the game feel authentic. Throughout the project I will be listening to a lot of Gackt and Nobuo Uematsu for inspiration, but no changes there really!

-Movie Influences- Studio Ghibli’s so-called “Blue Sky, Green Grass” films- Laputa, Porco Rosso, Kiki’s Delivery Service… but also My Neighbours the Yamadas for a little insight into Japanese life, and anime like Angel’s Egg and Cat Soup for the sense of journeying through strange, lonely worlds (these second films also add a sense of darkness, which is something I’m currently toying with.)

-Game Influences- The Archer for its incredible use of Game Maker and beautiful concept and asset artwork, Ninja Senki for its Japanese themes and simple graphical style which create a great example of everything a platformer should be, and Nevermore 3 for its representations of isolation and loneliness in a beautiful world.

-One thing I really want to get across is problems with communication in a foreign place, and a lack of understanding of signs and symbols. I want there to be minimal dialogue throughout the game AT BEST, the player will have to rely on their own interpretation of symbols, imagery and gestures in order to get through the game. Some will be more complex than others!

-Verdon goes into a lot of details on his post about the inventory system, and how it acts as a means of providing higher-resolution details of items and characters which don’t appear very detailed in the actual game. This is definitely something I will consider! There will be items and pick-ups to help the character along, however I’m not sure what these will be yet.

EMP Countdown Day 4: 4 Days…

I’ve been thinking about what I’ve been writing about these games and wondering if the info I’ve provided will actually be beneficial to my EMP. Obviously, each one of these provides me with an accumulative drive which I need to kick-start this project, and I can learn from each one even if I haven’t made it obvious whilst showcasing them. Over the past four days I’ve been ploughing through Gabriel Verdon’s Devlog on TIGcourse (currently on page 44) and taking pages of notes on the direction of development and the stages he went through, stealing many of his production images to help me with my own. I’m hoping that somewhere between concentrating on these other great games I will end up with a resulting brilliant and solid idea of my own, which is something I’m unfortunately lacking. And the project start is looming…

I think how these games will really help me will be evident when it comes to applying the useful stuff to my own creation. It’s easy to look at how other developers are using sprite sizes and resolutions for example, as well as art direction and the implementation of Game Maker functions in the case of GM made games. So I will probably be constantly referring back to this list during my own development, or that’s the plan.

Today, something slightly different. So far, I’ve looked at a lot of home-made side-scrollers from some really inspirational guys, however Fez by Polytron inspires me in its hugeness and uniqueness.

I’m pretty sure I referred back to this all the time during the specialist project, as this is another game currently in development and its nice to be able to watch it grow. The main reason I like Fez is its art style, a unique application of pixel art into a world of squares and straight lines (even the clouds are made of blocks).

Like Sword & Sworcery EP, Fez adds to the pixel style with anti-aliased shapes and lighting, evident mainly in the gradient across the sky. In his TIGsource devlog, Gabriel Verdon admits to using similar shading techniques in The Archer, especially to add a sense of depth to platforms. What’s mostly interesting about this game is that it is actually 3D, with only 2 dimensions ever appearing on screen at once unless the view is being rotated. It’s the first time something like this has ever really been attempted, which has resulted in an unexpectedly long development time. It would appear through the complex nature of the game that it probably uses large textures rather than tilesets, although tiles appear to have been used on some of the textures as homage to the old games which have inspired its pixel artiness. The main character Gomez also never rotates and always appears in 2D, so it’s probably that he has been animated using frame-based animation, as well as many other animations throughout the game.

The style of imagery works so well in Fez because it is consistent. All object have been made to look very square, and small colour-ranges have been applied to any one scene. Here, the colour scheme uses many bright blues and greens, but in more hostile areas darker colours have been applied. It would seem that commitment to the style entirely is key to gaining recognition.

Links for Fez:
Fez on the Polytron website
Fez on Vimeo
Fez on Indie DB
Creator Phil Fish talks about Fez on Gamasutra

EDIT: I’ve also just discovered that a TIGsource devlog exists for Fez, and I am now more than excited to go through those 145 pages…

EMP Countdown Day 2

The Archer Gabriel Verdon

This is another persistent source of inspiration for me for several reasons. For a start, the game is currently in development and it just keeps getting better. The reason I can make comments like this is because the creator of the game, Gabriel Verdon, has been keeping a constant online development log since the very beginning. Even if the game turned out to be awful, this 77 page backlog of development is a pretty good tool for someone like me who is still working on finding the perfect game design structure. As a bonus, the game is being made in Yoyo Game Maker 8.0, so most of the development is really relevant to me. As well as a constant update on how things are going, Verdon has found the time to produce several devlog videos which really show how the game is coming along…

From these videos, you can see the full scale of this project. The game must really push the limits of the software in terms of graphics, although I believe the physics are fairly basic for the most part. The development log for The Archer introduced me to a Game Maker document called the Grandma Engine, which works as a 2D platformer engine within Game Maker. The document comes with a simple range of assets and physics, ready for the developer to add graphics and music etc. This is great for non-coders, but has been made in a way that the settings can easily be tampered with to make slight changes.

These images show really early development of The Archer, using the provided assets from the Grandma Engine and a custom playable character. Later, custom graphics are added to the level design and the solid black blocks are set to invisible. So although I really like where this game is heading in terms of inventive gameplay and a lovely pixel-art visual style, what makes this really inspirational to me is its devlog and again, for providing a showcase of software capabilities and possibilities. It looks likely that I will implement something like the Grandma Engine into my next project, especially if it takes the form of a side-scrolling platformer.

Links for The Archer:
The Archer Official Website
The Archer on Indie DB
Online Development Blog on Tigsource
Gabriel Verdon’s Blog