blenderart magazine - 26 - blender & gaming

46
Issue 26 | Feb 2009 Blender learning made easy COVERART Zero Ballistics -by Bernhard Bauer Going Retro With the BGE Blender in 2.5D Games Shootin' Annie Mii School

Upload: georgpiorczynski

Post on 18-Nov-2014

124 views

Category:

Documents


5 download

DESCRIPTION

Articles/Tutorials on Making of Circolino, Going Retro with the Blender Game Engine, Blender in 2.5D Games, Making of Big Pixel, Making of Infinite Skies, Making of Pahelika Artwork, Making of Shootin' Annie, Making of Mii School & more…

TRANSCRIPT

Page 1: BlenderArt Magazine - 26 - Blender & Gaming

Issue 26 | Feb 2009

Blender learning made easy

COVERART Zero Ballistics -by Bernhard Bauer

Going Retro With the BGE

Blender in 2.5D Games

Shootin' Annie

Mii School

Page 2: BlenderArt Magazine - 26 - Blender & Gaming

EDITORGaurav Nawani [email protected]

MANAGING EDITORSandra Gilbert [email protected]

WEBSITENam Pham [email protected]

DESIGNERGaurav, Sandra, Alex

PROOFERSBrian C. TreacyBruce WestfallDaniel HandDaniel MateHenriël VeldtmannJoshua LeungJoshua ScottonKevin BraunMark WarrenNoah SummersPatrick ODonnellPhillipRonan PosnicScott HillWade BickValérie Hambert

WRITERSRosario AzzarelloRaul Gonzalez LuyAlex AylesburyPaul VirapenHubert Gizeskowiak (PM)Gaurav NawaniTony MullenMoisés Espínola

COVER ARTZero Ballistics - by Bernard Bauer

CONTENTS

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

2

Making of - Circolino

Making of - Going Retro With the BGE

Making of - Blender in 2.5D Games

Making of - Big Pixel

Making of - Infinite Skies

Making of - Pahelika Artwork

Making of - Shootin' Annie

7

9

12

16

20

22

24

Making of - Mii School 30

Page 3: BlenderArt Magazine - 26 - Blender & Gaming

Look anywhere on the net, and you will no-tice that creating games is becoming aspopular as playing them. Whole sub-cul-tures are springing up around online gamesand the developers that create them. I evenhave to admit that I seem to have gottenhooked on a few myself.

Now obviously, not everyone is using thesame software or tools in their game pro-duction pipelines. And honestly, trying tocompile a comprehensive list would be adaunting task indeed.

But once the coding is ironed out, one com-mon issue all developers run into, is howand what to use to create their game as-sets. Not surprisingly, many developers areturning to Blender for asset production aswell as rapid prototyping.

In this issue we get to hear how several de-velopers and game companies are usingBlender to create really fun and interestinggames.

So get ready for some serious gaming [email protected]

Sandra GilbertManaging Editor

EDITORIAL 3

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 4: BlenderArt Magazine - 26 - Blender & Gaming

IntroductionLately, creating games has become as popular asplaying them. Considering the number of availablegame engines to be found these days, the possibili-ties for efficient work flows are endless. But no mat-ter what style or type of game you choose to createor engine you use, there are some common elementsthat you are going to need.

Creating games requires a lot of time and effort. De-pending on the game engine you use, there willprobably be a fair amount of coding involved. If youwrite your own game engine, there will be evenmore coding to deal with.

This, of course, leaves less time for creation of gameassets. Even with the best coding and game play,lack of actual game assets is going to sink yourgame.

So, short of being the ultimate game creation wiz-ard, what are you going to do?

You are going to check out the following links andget yourself some assets, or at the very least a start-ing point that you can work from and embellish asyou go.

http://www.katsbits.com/

Low poly modeling tutorials, tips and tricks.

http://opengameart.org/

Free game content.

Game texture database.

Free for download most come with normal maps.

CGTUTS

Creating a rocky video game terrain in Blender.

SemiPro Tutorials

Model & Texture a Low Poly Race Track.

http://blender-games.com/

Website dedicated to blender games, great place toget ideas and play a game or two.

IZZY SPEAKS : Gamin Content Resources 4

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

So, short of being the ulti-mate game creation wizard,

what are you going to do?

Page 5: BlenderArt Magazine - 26 - Blender & Gaming

Blender 2.50 Alpha 2Another al-pha testbuild hasbeen re-leased tohelp ensurethat bug re-porters havea good refer-ence for on-going testingand reporting. There have been numerous (read thatto be hundreds and then some) bug fixes and lots ofimprovements and updates to missing and incom-plete features. While there are still a few featuresnot fully implemented, there is more than enoughfor some serious fun and testing.

Check out the 2.50 Alpha 1 release log for more de-tails of features and what to expect in this release.

DVD training 5: Chaos & Evolutions

Digital painting course using free/open source software.

Pre-order discount of 10%. DVD expected to shipmid March.

This DVD covers all aspects of creating advanced dig-ital paintings, concept art, character design, creaturedesign, environments, illustrations and modelsheets. Seven main tutorial videos are devoted toteach the best tips and tricks about digital sketching,drawing, Alchemy, coloring, painting, finishing andcreating model sheets. And eight additional videoswill present you with more than 20 hours of fulltime lapse in HD (1440x896) minimally commented

so that you are free to explore and learn the part youare interested in.

The DVD assumes you already have a tablet andknow the basics of drawing from imagination, 2Dpainting software and image manipulation. It is es-pecially targeted at people who look for a strongwork flow to create a 2D project from A to Z in a col-laborative or professional environment.

Chaos & Evolutions includes Alchemy and GIMP 2.6.6patched with GIMP-painter for Windows, Mac OSXand Linux, as well as a customized brush kit, and allWIP files. It also includes MyPaint for Windows andLinux. All the examples have been done with onlyfree and open source software, mainly GIMP. You canfollow the tutorials with your own 2D applicationtoo; like Photoshop / Painter / TVPaint / Krita / etc... (Note: one bonus video uses Mypaint!).

The DVD tutorials use a music soundtrack withoutvoice over. Unobtrusive, simple English labels willguide you, which makes it especially targeted at aninternational public.

The videos are in 1440x896 and play well in the freeVLC player.

Announcing the BlenderNewbies Blender2.5 Training DVD Pre - Order

Kernon hasannouncedthe pre-orderof his newupcoming training DVD. He will be covering Blender2.5 exclusively and it will contain many hours of newand unpublished tutorials.

BLENDER NEWS 5

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 6: BlenderArt Magazine - 26 - Blender & Gaming

There won't be any 2.5 versions of any of his existingtutorials so this will be fresh new content!

The training will be mostly small, project-based tuto-rials so that what you learn is in the context of a realproject scenario. This helps you understand not onlyHow to do something, but also helps you have a bet-ter understanding of Why and When. Also, theproject-based tutorials will allow you to repeatedlyexperience the full work flow so you develop a betterunderstanding of how things work together.

For further details and ordering info, stop byblendernewbies.blogspot.com

BLENDER NEWS 6

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 7: BlenderArt Magazine - 26 - Blender & Gaming

Circolino

IntroductionCircolino is a bundle of five SeriousGames and self-built input devices toplay games while making a range ofdifferent physiotherapy exercises.Every time the children play Circol-ino, the system logs very importantinformation for the therapy and thensaves it in a well formatted CSV fileto be used for analyzing the progressof every single patient.

This Serious Game was made for theChildren's Rehabilitation Center of Affoltern(Switzerland) and is adapted to children under 12years old with motor function problems.

Playing is something that the human races has al-ways done. For this reason playing games is a veryimportant part in the life of every of us. Games arepart of our culture as well, regardless of which gameis being played.

Sadly, not all people are able to play video games.There are people that have problems with motorfunctions and most of these are children. Normally,physiotherapy involves helping children achievetheir gross motorfunctions andenabling them todevelop theirphysical inde-pendence. ThePhysiotherapistsassess, designand carry outstimulation exer-cises for children

to improve their phys-ical skills, and to pre-vent furtherdeformities and mini-mize the effects ofdisability.

Helping children withphysiotherapy is quitedifferent than helpingadults, from an anatomical, physiological and psy-chological point ofview. To treat chil-dren effectively allthese issues need tobe considered.

My first step to createthis game was to ana-lyze, together with aPhysiotherapist, thedifferent exercisesthat these childrenexecuted every day.After that I collectedall the important in-formation and wrotethe GDD (Game De-sign Document).While writing it, Ipaid attention to allaspects of the game with the ‘eyes’ of these chil-dren.

It wasn’t as easy as we can imagine. Most of thesechildren have motor problems not only because themuscles are not working well, but also because thebrain has some problems, too.

MAKING OF: Circolino

By R

osar

io A

zzar

ello

7

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 8: BlenderArt Magazine - 26 - Blender & Gaming

For this reason, I wanted to create mini-games thathelp to train the different parts of the brain and notonly the muscles: they must work together.

The mini-games ofCircolino trainthese parts of thebrain that are usedto memorize, tocalculate, to recog-nize, to see and tohear: parietal lobe,frontal lobe, tempo-ral lobe and occipi-tal lobe.

The self built inputdevices train themotor functionswhile playing thesemini-games. I’vecreated somethingthat has this ‘Wiistyle’ thing goingon and giving awhole differentgaming experiencethan just ordinarykeyboard or mouse.Most of these chil-dren can’t hold anycontroller in theirhands, just becausethey have problemsto move it, too. Myobjective was tocreate something towear, not so heavy,easy to install and

to use. To use these input devices we need to just plug-in the USB cable and we are ready to play: no extradrivers to install and compatible with most operatingsystems.

Last but not least: the children love Circolino!

I was very happy to use my knowledge to create agame that is focusing on a target audience that is notalways considered in the game industry.

To create Circolino I used Blender to create the gameand the 3D assets (environment, characters and items),Python for scripting it, Gimp for the textures, Inkscapefor the 2D game elements, Audacity for the Sounds andthe Music, and Scribus for the documentation.

Rosario Azzarello

Porfolio: http://www.gamedesign.ch

Video: http://www.youtube.com/watch?v=zRqbJbBIcfQ

MAKING OF: Circolino

By R

osar

io A

zzar

ello

8

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 9: BlenderArt Magazine - 26 - Blender & Gaming

IntroductionWith the newest consoles generationand all those speed ups and newgraphical features (2D screen effects,GLSL, softbodies, etc.) that came withthe BGE, some older ways of gamingexperience seem to fade away fromthe memory of both gamers andgame-creators. Naturally, none of uswould like to return to the ages ofAtari, but there are some stuff fromgame history that are still nice, if usedcorrectly. This article focuses on 2D

sprites.

To make it shorter and not dangle too much in his-tory of video games, I'll say that the use of 2D char-acters on a 3D background has been around sincethe very beginning, from Wolfenstein 3D and Doomand the several clone games they had. In the early90s, the famous "Mode7" in the SuperNintendo al-lowed 3D deformation of a plane, which was used alot for making racing games (Mario Kart for exam-ple), naturally those cars were 2D.

This technique was most notably used in the era ofPlaystation 1 and Nintendo 64, due to the lack ofgraphical power those consoles had. In one handthey could have several polygons on screen texturedand shaded, but in the other, not enough to havenicely detailed personages; almost, box lookingcharacters with heavily pixelated textures check im-age of Vagrant Story for PSX, a good looking PSXgame of 1998.

While not because of that, this style of graphics hasnot disappeared yet, we can still find it on Nintendo

DS, Playstation Portable, Wii and even Playstation 2and 3. Communication.

Examples:

Famous gamesusing this tech-nique are: Doom(PC),Wolfenstein3D,Super Mario Kart(SuperNes), F-Zero (SuperNes),Xenogears (PSX),Breath ofFire(PSX), Grandia(PSX), RagnarokOnline (PC), Dis-gaea (PS2, andPS3), Mario Kart64 (N64), PaperMario(N64,GameCube,and WII), etc.

Following thesame idea, let'sstart with mydemo:For this, it'srequired to havesome advancedknowledge on theGame Engine andpython.

MAKING OF: Going Retro With the BGE – 2D characters on 3D scene

By R

aul G

onza

lez

Luy

9

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Retro With the BGE

Ragnarok OnRagnarok Online (PC):

Xenogears (PSX):

Breath Of Fire (PSX)

Page 10: BlenderArt Magazine - 26 - Blender & Gaming

For now the easiestthing to do is take thedemo and replace theSprite sheets and thescenery.

In the future I'm plan-ning on making an in-depth tutorial, whenthe script becomesmore friendly to users.

The theory, atleast, is simple:

All that is needed isalready inside thedemo file and working.The link to downloadthe file is at the end ofthe article.

You need a 3D back-ground, an invisiblecollision box that has aplane that tracks thecamera parented to it,which will be the char-acter. But how doesthe character's draw-ing change when thecamera rotates aroundhim? Well, there is where my script comes in.

The scripts at a glance:

It ain't easy to setup (I'm pretty sure the BGE wasn'tmade thinking on this, hehe), since you need 3 scriptsfor this:

“holiday”: The first script wasn't made by me (and Ihardly understand it, updating it to work onblender2.49 was incredibly hard). It was made by DocHolyday (don't know true name) and I use it here toload a Character sprite sheet and have it ready foranimation, and ani-mate it.

“CGLHoliday”: Thesecond, by me, is usedto activate the anima-tions using the arrowskeys.

“angle3”: The thirdone, also by me, com-putes the angles ofthe camera using theworld as reference,the character in refer-ence with the worldand the character inreference with thecamera. In otherwords, a tough job.

The other 3 scripts (“holiday, “CGLHolidayNPC”, and“angleNPC” for other characters) are made for non-playable-characters (as town people for example).They were made to automatically animate andchange the orientation of the character based on itsmovement, for example following an IPO, as the file,or controlled by an AI script.

Finally you need a character sprite sheet. Remember,the BGE works with textures that are power of 2 (forexample 2x2, 4x4, 8x8, 16x16, 32x32,....1024x1024 is themaximum I think). Be careful on the UVMapping, it'svital, follow the demo file as reference:

MAKING OF: Going Retro With the BGE – 2D characters on 3D scene

By R

aul G

onza

lez

Luy

10

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Disgaea 3 (PS3)

Paper Mario Wii:

Page 11: BlenderArt Magazine - 26 - Blender & Gaming

Issues:

The fact that you need3 scripts per characteris still a problem tosolve (it makes it hardto use). Also, I wouldlike to add the possibil-ity of diagonals on thecharacter orientation(or at least have itready as an option be-tween 4 or 8 direc-tions). But having itworking and playablewas so much fun whenI made the first version!!

Still, this results inpretty good per-formance. On anold Athlon XP +2600with a GeforceFX5200 and 1.3 Gi-gabytes of RAMmemory, you cancontrol up to 33characters simulta-neously, all of themanimated, with col-lisions and control-led by the player. As the picture shows, like a little army(hahaha).

Links:

Here are links to my gallery on YouTube where a videoof this working is shown (and some others also of theBGE or renders), a link were the files are located for

download, a link to the old thread at BlenderArtistwhere I updated with a recent post, and a link to mydeviantArt page were there is also some information inthe Gallery.

http://www.youtube.com/user/RolazoGL

http://sites.google.com/site/bgeatelier/

http://blenderartists.org/forum/showthread.php?t=144683

http://rologl.deviantart.com/

MAKING OF: Going Retro With the BGE – 2D characters on 3D scene

By R

aul G

onza

lez

Luy

11

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 12: BlenderArt Magazine - 26 - Blender & Gaming

IntroductionAt Matica.com we develop a varied mixof games and animations. From 2Dgames using cartoon style vector graph-ics to real time 3D games and the fullgamut in between.

The production pipeline for our 3Dgames is probably no different to most3D game development. Character design,high poly modeling, texturing, rigging,animation, effects, low poly texture bak-ing and normal maps, etc.

What seems to be covered less is how you can in-clude 3D tools such as Blender in your 2D or 2.5Dgames and animation production pipeline.

You can produce just as impressive graphical assetsusing Blender with your 2D or 2.5D games as youcan with traditional pixel based and vector basedimaging tools. With the added benefit of being ableto make significant changes to your scenes andrender a new result almost instantly.

To illustrate this I'll outline how we have usedBlender in our production pipeline for some of ourFlash games. We have used Blender extensivelythroughout our catalog so will limit the scope to 3projects; namely 'Matica Air Race', '6 Nations Rugby'and 'Winter Pinball'.

Winter Pinball

The simplest use was for the playfield backgroundof our Winter Pinball Game. All that was neededwas a 2D image of a 3D Wintry scene, trees, snow,and some stars. We could have used Photoshop,

Gimp, Inkscape, Flash or Illustrator but it only tookabout 1 hour to create using Blender.

A subdivided plane for the landscape, a simple parti-cle system for the snow, and 2 very simple sub-surfed meshes for the trees and stars took minutesto create. Then all that was left to do was to playaround with the colour ramps and material nodesto get the look we were after.

During the game development process we changedthe layout of the pinball table and were relieved theplayfield scene was created using Blender. The treesin the scene overlapped table components whichhad an undesired effect on the overall look. The fixwas just a case of rearranging the scene a little tofit the new layout and then rendering it out again.

The rest of the pinball table was modeled in detailusing Blender. We needed a 3D model of a pinballtable for another couple of projects so had to gothrough the process anyway. It would have beenjust as quick to hand draw the table, but having itin 3D allows us to make changes to the table andhave our new image at the push of a button.

The specularhighlights andshadows helpa lot with the3D look butwere notenough ontheir own. Forthe finalrender wetilted the tableand used anorthographiccamera.

MAKING OF: Blender in 2.5D Games

By A

lex

Ayl

esbu

ry

12

Cricket and Friends See a Comet!

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

2.5D Games

Page 13: BlenderArt Magazine - 26 - Blender & Gaming

The tilt was needed to help the 3D look (showing thefront edge of the table components), and we neededeverything to be orthographic for the graphics to matchup to the underlying game physics keeping the sides ofthe table parallel. Render layers allowed us to rendereverything below the ball and everything above the ballas separate images. This way in the final game we couldhave the ball passing over and under the correct tableitems adding to the realism.

We tried using a separate shadow layer to add to therealism. It made just a subtle difference as it only ef-fected shadows on the ball which was moving soquickly you could hardly notice them. It would add tothe final file size of the game so we went with just 3layers and merged the shadows to the base layer ratherthan using 4 layers.

Without straying from the main topic and going intogreat detail about how we modeled and textured eachcomponent, that pretty much covers the use of Blenderthe pinball game.

Matica Air Race

Matica Air Race was the first game we developed usingBlender in our production pipeline. Therefore, it tookmuch longer to produce the graphical assets than Pin-ball due to the learning curve.

What we wanted was essentially the same as for thepinball game, 3D sprites. The difference being that weneeded an animated 3D sprite for the Aeroplane. Sothere was no real difference apart from rendering out ananimation rather than a static scene.

We rendered the aeroplane doing a 360 degree roll, andrendered the propeller animation separately as we couldget away with a lot fewer frames of animation for thepropeller and put everything together in the game.

I'd modeled the aeroplane using very roughly sketchedblueprints I'd drawn by hand. I did this while watchingvideo footage from the Red Bull Air Race, so the finalaeroplane had pretty realistic proportions. This wouldhave looked perfect in an animation but didn't sit wellwhen it was put into the game as it was too long andthin.

It's something that is difficult to get across in an articlebut when we played our first prototypes of the game itwas very clear something wasn't right.

Having the model, animation, and textures waiting forus in Blender, we could scale the model on one axis andrender again to have a fully animated shorter and fasterversion in minutes. We quickly had a more cartoon likeaeroplane which suited the movement and look of thegame.

We had planned for the aeroplane animation to be usedas a guide to produce a vector drawing but it was sogood we stuck with the rendered images. At the smallsize we needed for the game the raw render looked sig-nificantly better than our vector tests and there wasvery little overhead in terms of filesize.

MAKING OF: Blender in 2.5D Games

By A

lex

Ayl

esbu

ry

13

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 14: BlenderArt Magazine - 26 - Blender & Gaming

We went on to model other items for the game; rings,air gates, blimps, hot air balloons, even the 02 Arena allof which were very quick to create. We got a little car-ried away and modeled Tower Bridge which took an ageto model and texture especially as it was our firstBlender project. We could have certainly drawn thatquicker using traditional 2D imaging software.

Many of our games and animations are not on our web-site as we are often hired to develop a bespoke projectfor a particular client. The games that make it up on ourwebsite are games we developed internally for fun andwe often re-brand them for Clients which helps us torecoup our costs.

It's clear to see the benefits to using tools such asBlender in these cases. We can add a client's logo to theAir Race Plane, Balloon, or Blimp very quickly by chang-ing the textures or even giving the textures to the clientand letting them make the changes. We can totally re-brand our games in hours rather than days.

Rugby

Our Rugby game has existed in some form or anotherfor a decade and all graphics were initially hand drawnusing traditional 2D imaging soft-ware. This game gets a refreshevery couple of years and duringour current refresh we have re-placed our hand drawn 3D assets(goal posts and a few other assets)using the same process that wehave already outlined.

More interestingly, one of our cli-ents wanted the game re-branded,and requested the addition of anintro to the game. They wanted a

ball to fly onto the screen then go into a mode of spin-ning around, stopping, showing a message, spinningagain, showing another message, etc.

We estimated 125 frames of animation would be needed(around 5 seconds) adding 2 or 3Mb to the game whichuntil now was under 120k. We had to somehow add theintro without introducing this additional overhead.

The game would be promoted at events on plasmascreens so had to scale up to 1920x1080 pixels. Not aproblem for most of our games, as they use vectorgraphics, but quality would be lost if we used bitmapimages at a lower resolution.

We used Blender in the same way we had used it in the'Matica Air Race' game to model, texture, and animatethe ball. Blender allowed us to export the animation asa series of .png files with transparency, and at the cor-rect resolution to match the game.

To achieve a result that would add just 80k instead of2-3Mb, and that would scale to any size without degrad-ing we Rotoscoped the animation which has workedwell for us on past projects.

We had actually planned to Rotoscope the 'Matica AirRace' Aeroplane but the originalrender results looked much bet-ter than our Rotoscope testsand as I mentioned earlier thefile size was pretty good any-way.

The images I've included in thisarticle are thumbnails of thefinal Rotoscoped vector imagesnot the original rendered imag-es.

MAKING OF: Blender in 2.5D Games

By A

lex

Ayl

esbu

ry

14

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 15: BlenderArt Magazine - 26 - Blender & Gaming

We loaded the .png files we had rendered in Blenderinto Flash and traced the 125 frames by hand.

We played fast and loose for most frames only spending2 or 3 minutes per frame as it gave a good visual resultwithout being too accurate. The last frame we tried toget close to perfect as that was the only frame thatwould be in view for more than 1/25th of a second.

The resulting animation was just 86k and looked indis-tinguishable from the original animation when playingat full speed.

I've animated 3D scenes by hand in the past with just afew reference images and my imagination, and I've usedthis Rotoscoping technique working with Blender

animations as a template dozens of times. I'd need avery good reason not to use the latter as it saves muchmore time than it takes to create the Blender animation,and the result is a lot smoother.

You can stray from the original animation if you changeyour mind and want to get creative (which we do moreoften than not), but it's always there as a guide to helpavoid your animation getting too jumpy, to give a guideto maintain the volume of your object, and as a guide towhere the shadows and specular highlights fall.

It would be easy to go on describing more exampleswere we have used Blender in other creative ways in ourprojects, but hope what has been covered so far is ofsufficient use to those planning similar projects.

Extra Resources

We have articles on our Website covering the making ofa handful of our games, and have started recordinggame development video tutorials for our 'Game Univer-sity' section.

http://www.matica.com - The Games

How we make the Games

Our new Games University section on how to makegames

MAKING OF: Blender in 2.5D Games

By A

lex

Ayl

esbu

ry

15

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Alex Aylesbury

Professional game developer for 16 years, developing Webbased casual games since 1996 and founder ofMatica.com & Smilie.com.

Page 16: BlenderArt Magazine - 26 - Blender & Gaming

IntroductionIn the last few years it’s become moreand more feasible to produce 3D browserbased games, thanks to things likePapervision3D and advancements inAdobe’s Flash Player, everyones favouritewhen it comes to online games and in-teractive content. The majority of per-sonal computers have a version of FlashPlayer installed, with around 95% havingthe latest Flash Player 10, which is greatbecause not everyone wants to have to

download new plugins to play your game.

The thing is though, in modern console gameswe're all used to the latest graphics with their highpolygon counts, real time lighting, high resolutiontextures, pixel shading and much more. But when itcomes to 3D in Flash you're going to find things willsoon start to lag the more complex you make yourscenes.

This doesn't have to be a problem though, Here'sthe approach we use at Big Pixel Studios for our 3Dgames for you to think about. When starting out itsgood to have an idea of what’s going to be involvedin your game. How big is it going to be? How muchis going on? How detailed does it have to be? ...etc.

In Big Pixel Racing (and our next 3D game which istop secret, so don’t tell nobody else!) we've re-stricted the camera so it has a fixed view on the in-game world. The camera can pan and zoom in andout, but because we never rotate the view the 3Dobjects like buildings and trees can be kept rela-tively simple in terms of their geometry, and someare almost what you could call 2.5D.

To make up for the low poly count and lack of spe-cial effects we can use in Flash, we try to give ourgame a quite stylized look instead of going for pho-to-realism. For Big Pixel Racing we went with a 3Dretro pixel graphics style, though thinking about it Iwould love to have seen photo realistic dogs drivingcars around a dog version of Miami!

As the meshes we make are so simple a lot ofwhat’s going to get the message across is going tobe the texture map, so I find that is the best place tostart and the most important thing to think about.

Your texture map is going to be a guide to help youbuild your mesh (plus as in this case its going to bea simple pixel art style texture map so this is quicklybecoming the easiest tutorial guide ever).

Though weare able to uselots of coloursin our texturemaps inPapervison3D,we have toremember thefinal look ofour game. Asour game hasa retro pixelstyle it was good to use a limited palette of colours(this is a good thing to do in artwork in general)and colours that go well with the ground texture,The ground texture is something that comes to-gether with the rest of the game objects in code, soI find it’s useful to make a little sample of theground texture on a 3D plane just for modelingwith. This allows us to get an idea of how thingsmight look in the finished game as we are mode-ling.

MAKING OF: Big Pixel

By P

aul V

irape

n

16

Cricket and Friends See a Comet!

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

2.5D Games

Page 17: BlenderArt Magazine - 26 - Blender & Gaming

In the bitmap editor of your choice make a small bitmap50px by 50px. We choose such a small size because itwill help with the pixel art. We're going to make asmallish square building here, we only need to make thetexture for two walls and the roof of our soon to be verysquare pixel building, as we are going to reuse the wallson both sides of our mesh. In this little tutorial we aregoing to make a small cafe, its a nice cafe and the coffeeis cheap, though they have been struggling recently as alarge chain has opened down the road and people onlywant so much coffee in their lives, though we don'tneed to know this plus its a small pixel cafe and is notreal.

Though lighting effects are possible in Papervision3D wedidn't use them in Big Pixel Racing, so when making thetexture map for the walls we made one darker to makeit stand out from the other wall. This darker wall will bethe one we use as the side walls to make our little pixelbuilding stand out.

Once we've finished our texture map (it didn't take long)I like to double the size because 50px is small and youmight drop it, or it might get lost down the back of thecouch, or the cat might eat it and the vet bills for hav-ing small bitmaps removed from cats can be very expen-sive! Make sure your bitmap editor of choice hasn'tresampled the image when you scale it up, we don'twant fuzzy pixels. Save the new texture map as a png,you can give it a name like 'cafe_txt.png' because thatsounds cool.

Now, before we open Blender there is something I musttell you. It was November and I was in the bathroomstanding on the toilet hanging a clock on the wall whenI slipped hitting my head on the sink. When I awoke Iwrote this... which turned out to be the links for the 2plugins that will help us in Blender. If you don't alreadyhave them you should download them now, but I betyou do because everyone does.

When youopen Blenderthere's al-ready a cube,lets call himCubey. Don'tbother re-naming him Ijust meanfrom now onhis name isCubey, youcan use itwhen youpass him inthe street.We'll useCubey as themesh for ourreally simplebuilding ex-ample.

First lets’make someground' as itwere. We'reusing Blender2.46 here. Ilike to splitthe main 3Darea andmake theright side thescript viewthen go Scripts->Image->2D cutout image importer. Thenwe can import our floor texture sample so we can getan idea of the floor.

MAKING OF: Big Pixel

By P

aul V

irape

n

17

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 18: BlenderArt Magazine - 26 - Blender & Gaming

We don't have to worry really about making materialsbecause this is all done on the Flash side, as long andwe set up the UV coordinates with the texture map itshould be okay. You can make a material in blenderthough if you want to do a test render, we do this to getan idea of how it will look by turning off the anti alias-ing then rendering it from a camera view similar to theone used in the game. Setting up a camera like the in-game view is good when you want to see how yourmodels will look.

Grab Cubey andin edit modelets select hisbottom and de-lete it, we don'tneed to seeCubey’s bottomtoday, no onedoes. Set theright view toUV/image editorthen load thecool_txt.png.Then withCubey minus hisbottom, still inedit mode, graba soon to bewall side and hitthe 'U' key toget the UV dropdown and thenpress Unwrap. Now in the UV/image editor window goto UVs->snap to pixel. Because our texture map is sosmall it will make life simple. Adjust the face-wall in theUV editor and make it fit with the wall on the texturemap. Do this to all of Cubey's remaining sides one by

one, adjusting ituntil it all fitsnicely. That's it,that was reallysimple.

Adjust the meshuntil you arehappy with itthen go backinto edit modeand use convertto triangles soCubey will export nicely.

For things like plants andtrees we use 2D planes atslight angles almost par-allel to the camera, re-member if we don'trotate that camera noone will know. Then wehave a nice and very sim-ple little scene, you canmake a few dif-ferent objects ina similar way tomake up street'furniture' whichcan be reused.

MAKING OF: Big Pixel

By P

aul V

irape

n

18

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 19: BlenderArt Magazine - 26 - Blender & Gaming

When youwant to ex-port some-thing, selectit and go tofile->export->actionscript3 class.Make sureyou’ve con-verted totrianglesfirst though.

And remember not to let your cat eat bitmaps ormeshes because they will if they can

Links:

http://wiki.blender.org/index.php/Extensions:Py/Scripts/Image/Import_2d_Cutout_Images

http://www.rozengain.com/blog/2008/01/02/export-your-blender-objects-straight-to-away3d-papervision3d-and-sandy/

MAKING OF: Big Pixel

By P

aul V

irape

n

19

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 20: BlenderArt Magazine - 26 - Blender & Gaming

Infinite Skies

Introduction"How about developing our ownvideo game?" This is probably one ofthe ways your best buddy would tryto convince you to spend all of yourspare time with a never seen, endless,giant game development projectcalled Azure: Infinite Skies. So yeah ..why not?

It has almost been an year since westarted working on this and we'vewon a few members who occasion-

ally helped us, mainly with coding. Currently we're 3people working in our spare time on Azure and afew external helping out here and there. In the be-ginning we had to fight endless verbal battles aboutwhat the game should look like or what the game-play should be about.

Some wanted a fantasy, others an action arcadegame, but after a month or so we finally came tothe decision to make an open source action flightsimulator with elements of role-play games. The ma-jor part of the game should consist of flying aroundwithin the isles of Azure, an endless sandbox fantasyworld, styled similar to our world during the 1940's -1950's.

Because we didn't want to create another boringWorld War II shooter game and because just flyingaround would be annoying in long term, we addedsome special fantasy features like levitating Islesdriven by a special mineral which makes things levi-tate. This mineral is also used for military and civil-ian purposes like giant flying ships, carriers or evenman-made stations in the sky. Maybe some of youremember the huge carriers from the movie "Sky

Captain And The World Of Tomorrow" - well, that'swhat we're aiming at. Also, inspired by CrimsonSkies, all our aircraft are extraordinary, while stayingauthentic. Here we're looking pretty much intoWW2 concept designs and experimental aviation.Besides all that technology fun, our motivation is ledby the goal of creating a sad story and an unfamiliaratmosphere, where you question your own choicessometimes. This makes the game something specialbecause it gives the player not only a yet not seenworld to explore, but also a lecture of self-experi-ence.

The second step was to choose the right tool-chainand libraries. Gimp was what we all knew for 2Dand because it's free and cross-platform - -which isimportant as we all use different OSes- the choicewas clear. For modelling we've chosen Blender, ofcourse, as we had some positive experiences with itbefore already. Currently we're using it for almosteverything visual in the game like aircraft, carriers,islands and so on. While staying open to other pref-erences of external modellers, our pipeline has beenoptimized mainly for Blender.

As game engine, we've chosen Panda3D after a longtime of comparing, and it gave us everything weneeded for the development. Unfortunately the BGEwas, and still, is lacking a few things we felt wereimportant. Panda3D is mature, free (BSD) and hasmany nice features, not to mention the great com-munity. Same as Blender it's cross-plattform, writtenin C/C++ and allowing control through Python bind-ings. So yes, we code our game all in Python, and ithas worked out very well thus far.

At the moment we're finishing ODE-based physicsand collision detection, so the backend shouldn'tneed too long now. After that we'll focus on

3D WORKSHOP: Infinite Skies

By H

uber

t G

izes

kow

iak

(PM

)

20

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 21: BlenderArt Magazine - 26 - Blender & Gaming

adding more assets like planes and scenery. The storyfirst needs some love before we think about implemen-tation - we have some ideas all written down on ourforums, but we're looking for a skilled storywriter tocombine it all. As probably every ambitious opensource project we're always open for new, skilled mem-bers, but we're also progressing on our own quite well.That said we'll probably release a first tech demo in thenext few months where you can fly a plane around andsee some nice effects.

For those interested in more info, we have a forum andwiki both hosted at SourceForge. All further info, likecontact information and more, to the whole conceptare written down there. If you have questions, you'revery welcome to our IRC channel - info on the wiki.

Have a nice day,

Azure Development Team

3D WORKSHOP: Infinite Skies

By H

uber

t G

izes

kow

iak

(PM

)

21

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 22: BlenderArt Magazine - 26 - Blender & Gaming

IntroductionWe at IronCode Gaming have been usingBlender in our games for the past 6years. Last year we released an adventuregame titled “Pahelika: Secret Legends". Itis basically a 2D game which containssimple point and click adventure dynam-ics.

Let me first get into how the game is de-veloped and how we approach the art-work in Blender. Firstly since this game is

completely 2D, we require all of our art assets asimages and sprites. Based on the story locations inthis game we have a set of stages and their corre-sponding levels set in a mystic environment.

Documentation describing the scenes was devel-oped first and a initial scratch of the concept by thegame designer, which was then sent on to the con-cept artist for further development. After his initialpenciling is approved, the concept artist prepared afinal concept renderingin color. To keep thetime short and ex-penses under controlthe artist was in-structed to draw andrender the bare mini-mum as to give enoughideas about color, toneand design for the 3dartist to work on.

This finalized colorconcept art is nowready to be made into a 3D rendered scene usingBlender. A 3D artist now prepares the props and

assets. Thefinalrender ofthe sceneand vari-ous inter-activeobjectrenderswere pre-pared to beincluded inthe game.

In all ofPahelikathere wereabout 30+scenesthat wererenderedwithBlender.

MAKING OF: Pahelika Artwork

By G

aura

v N

awan

i

22

Cricket and Friends See a Comet!

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Pahelika Artwork

Scratch developed by game designer.

Concept Developed by the Artist

Concept prepared in 3d in Blender

Final Scene rendered in Blender

Page 23: BlenderArt Magazine - 26 - Blender & Gaming

Modeling

Since the sceneseach containvarious entities,it was a long jobof recreatingthem all in 3Dand preparingthem for textur-ing.

Texturing

For most part the texturing is a mix of procedural orhandmade 2d textures in Photoshop or Gimp. Somerequired a mix of both or even node textures.

Lighting

The trickiest part of the entireprocess was lighting. Realisticlighting could be achieved byusing AO but it also increasedthe render time tremendously,given the number of small butdetailed models in the scene.None of the images that wererendered used AO and doing sohelped us in drastically reducingthe overall time of the project. A normal AO render was any-where from 15-20 minutes, while most renders we fi-nally used were done in less than a minute on a quadcore machine.

Since this is a one man team doing the 3D art it was de-cided to use the Blenders Lighting for most parts, so itwas a mix of scan line as well as raytracing for all of the30+ scenes.

Conclusion

The only gripe we had about Blender was its low qualityof raytracer and of course the complete absence of Glo-bal Illumination and caustics. Technologies like theseare best suited for our type of work, so we also spenttime testing out Yafaray. It is excellent raytracer but itsorely lacks the integrated facility of BI meaning alonger learning curve in textures as well as the lightingsetup. We were fairly satisfied with Blenders quality andalso my ability in using it ;). We have high hopes fromBlender 2,5 for the renderer and shader improvementsthat it can bring to us, hopefully before we release ournext game.

Thanks for reading

MAKING OF: Pahelika Artwork

By G

aura

v N

awan

i

23

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 24: BlenderArt Magazine - 26 - Blender & Gaming

Introduction3D games for iPhone

Apple's iPhone/iPod touch platform hasbecome one of the most exciting gamedevelopment platforms around. TheiPhone's innovative, high-resolution mul-ti-touch screen, integrated accelerome-ter, network connectivity, andultra-compact size have together effec-tively revolutionized palmtop gamingand application interfaces. In addition toa great device, Apple has introduced a

development model that enables 3rd party develop-ers to create programs that run on the device, andcreated a complete all-in-one solution to make de-veloping and marketing the apps as straightforwardas possible.

The iPhone platform includes an implementation ofthe OpenGL ES graphics library for mobile devices,making it possible to create top-quality 3D contentfor the device. Coding directly for OpenGL ES re-quires advanced skills in graph-ics programing, however. Formost of us Blender users whowant to create 3D games ahigher-level, more intuitivegame development engine isdesirable. Fortunately, thereare several such game enginesavailable as open source soft-ware. I chose SIO2 Interactive's

SIO2 game engine to work with because of its excel-lent support for working with Blender assets. An-other well-known alternative is the Oolong gameengine, which also supports working with Blender3D content.

In this article, I'll take a brief look at some aspectsof the creation of my own commercial 3D iPhonegame Shootin' Annie, created with Blender and theSIO2 game engine. The game itself is available onthe iTunes App store for $0.99, but with this issue ofBlenderArt magazine, you can download the .blendfile containing the main character assets for thegame, which is freely distributable for educationalpurposes. Unfortunately, it's not possible to give afull intro-duction toworkingwith theSIO2 gameengine andBlender tocreateiPhonegames.However, acompleteintroduc-tion to cre-ating 3Dcontent for the iPhone with Blender and SIO2 canbe found in my new book 3D for iPhone Apps withBlender and SIO2: Your Guide to Creating Gamesand More with Open Source Software. The book isslated to hit shelves February 15th, 2010, so it's likelythat by the time you read this, it is already available.If you have any trouble following the Blender parts,you'll find much more information about the meth-ods I describe in my other books.

MAKING OF: Shootin' Annie

By T

ony

Mul

len

24

Cricket and Friends See a Comet!

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Shootin Annie

The Shootin' Annie splash screen on theiPhone simulator

3D for iPhone Apps with Blender and SIO2 is available nowon Amazon

Page 25: BlenderArt Magazine - 26 - Blender & Gaming

My goal with Shootin' Annie was to create the simplestpossible character-based 3D game I could. Charactercreation is one of my favorite things to do in 3D, so Iknew I wanted a character-based game, but I didn'twant to saddle myself with the need to create the kindof complex gameplay that many 3D character-basedgames demand.

The Annie character herself was inspired by a Blender-made video I saw on the Japanese video websiteNikoNikoDouga featuring a miniature (chibi) version ofthe virtual popstar icon Hatsune Miku. I found the chibidesign of that character to be very appealing, and Iwanted to create a character with similar appeal. Al-though the style is of coursesimilar to the Japanese kawaiicharacters that inspired it,most of the design principlesextend all the way back atleast as far the early anima-tion work at Disney andMGM, and I made explicit ref-erence to Preston Blair's clas-sic book Animation to get thedimensions right (that book isavailable in its entirety fromThe Animation Archive atwww.animationarchive.org).

The Annie character includesmost of the classic signifiers of cute: outsize head; bigeyes; tiny mouth, nose, and chin; small hands and feet;and little or no neck. With these dimensions, a charac-ter will look cute even when she's firing six-guns in ablack ten-gallon hat and boots. I liked this contrast be-tween the cute and the badass, and once I hit upon thischaracter the rest of the game concept soon followed.

With respect to gameplay, my inspirations ranged fromTetris to the early cell-phone Snake-style games to just

popping bubble wrap. I wanted something super simple,but still a bit compulsive. What I came up with was asimple old-school shooting gallery game with a fewtwists. Instead of going straight across the screen, thetargets rotate around the Annie character in the middleof the screen. To hit the targets, the player taps, double-taps, or triple-taps on the target depending on thenumber of white rings in the target. This causes the An-nie character to spin around and shoot the target.

Missing a target results in losing a bullet. The iPhone'smulti-touch functionality is used as well. When the bul-let reload icon flies around, tapping it with one fingerwill fill up one gun (6 bullets) and tapping it with twofingers will fill up both guns. The number of targets,their speed, and the variation in the number of rings oneach target increases as you progress, as does the com-plexity of the targets' design.

MAKING OF: Shootin' Annie

By T

ony

Mul

len

25

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

This reportedly Blender-made animation of Hatsune Miku andfriends was an inspiration  for the design of the Annie character.

You can see the animation on YouTube .

“The Cute Character”

Page 26: BlenderArt Magazine - 26 - Blender & Gaming

Modeling

The model was created freehand in Blender, using allquads. It's much easier to work with quads when mode-ling than tris, so converting the model to tris is some-thing I only do when I'm finished modeling. I used themirror modifier to model but no subsurfing because themodel was intended for real-time (game) rendering. Ifind modeling in Blender almost as intuitive as I dodrawing with a pencil, so for non-realistic subjects I of-ten model without a reference drawing. In this case, theadded flexibility of modeling and designing on the fly

was helpful because I could change the dimensions ofthe model quickly and easily to see how various propor-tions worked. For example, I started the model withmuch less exaggeration of the head size, but found thata more drastic exaggeration suited the character better.

Rigging

The armature for Annie uses 24 bones. This is about ascomplex as I would dare to make an armature for use in

SIO2. Ifpossible,the arma-tureshoulduse asfew bonesas possi-ble, butsince theother de-mands ofthe gamewerefairly minimal, I figured I could get away with a heavierarmature here. The reason bones can slow you down isthat each bone is converted to a vertex group in SIO2,and deformations are based on the vertex groups. Morevertex groups take up valuable processing resources,which are at a serious premium on mobile devices.

A nice advantage of work-ing this way, however, isthat SIO2 can handle allkinds of deformations onthe mesh in an action. Youcan use FK posing, IK pos-ing, even Lattices and MeshDeform modifiers and themesh will deform correctlyin SIO2. The only thing SIO2cares about is the locationof each vertex in space dur-ing the action.

MAKING OF: Shootin' Annie

By T

ony

Mul

len

26

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Game play in Shootin' Annie is simple but gets challenging asthings speed up.

Several points in the evolution of the character'sproportions.

The Shootin' Annie armature is about as complex as you want toget for the purposes of an SIO2 game.

Page 27: BlenderArt Magazine - 26 - Blender & Gaming

Texturing

I used multiple UV layers and texture baking in a crucialway to texture this model. If you're not familiar withusing multiple UV layers and baking textures from oneto the other, please refer to my book Mastering Blenderfor an in-depth tutorial on how to do this. This is a verypowerfulfeature.

First, I bakedambient oc-clusion to aUV texture. Iwanted tosoften theeffect byblurring itslightly inGIMP, butwhen I didthis, theblurredseamsshowedup on themappedtexture.To coun-ter this, Ire-seamedthe mod-el, bakedthe origi-nalblurredAO tex-ture toone im-

age file, then re-baked AO to anotherimage file, andblurred that file inGIMP in the sameway I'd blurred theoriginal AO texture.

I then combined thetwo baked imagesto conceal the un-wanted seams andused the resultingimage as my finalAO texture. Thecolors of the cloth-ing were createddirectly withBlender'stexture paintfunctionali-ty, on their own image, which was baked to a single filewith the other textures at a later stage.

The manga-style eyes I cre-ated in Ink-scape. I stuckthose to theface using anObject Mappedtexture and anempty, in thestandard decal-style texturingmanner.

MAKING OF: Shootin' Annie

By T

ony

Mul

len

27

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

The first AO bake, without blurring.

Compositing differently mapped AO bakes to getrid of seams.

The model with the baked AO texture applied

Manga-style eyes in Inkscape.

Page 28: BlenderArt Magazine - 26 - Blender & Gaming

All three of these textures, the AO texture, the color tex-ture, and the eyes decal texture I associated with ashadeless material, then I baked the full render to yetanother UV texture, which included all of the textureinformation. I painted the nose and mouth onto thattexture directly using GIMP, using a Kewpie doll as a ref-erence.

Animation

SIO2 can work with Blender animation (Ipo) curves andwith actions. For character animation, you use actions. Icreated a rest action, where the character is just swing-ing her guns loosely, a jump action, where she jumps upin the air for the spinning movement in the game (thespinning itself I programmed separately in SIO2), andshoot actions for both right and left hands.

Working with SIO2

Developing with SIO2 is much simpler than program-ming directly in OpenGL ES, but it also bears little re-semblance to the kind of programming you'd learn inmost introductory iPhone programming books.

For ordinary applications, the main language used forprogramming on the iPhone platform is Objective C, anobject-oriented variation of the C language. In addition,special tools such as Apple's Interface Builder enableiPhone programmers to create sleek interfaces quicklyin a drag-and-drop, WYSIWYG fashion. This is whatyou'll learn in a standard introduction to iPhone pro-gramming. Programming with SIO2 is for the most parta completely different story.

With SIO2, you'll hardly touch Objective C except to editor comment out the odd line of code here and there,and most of the programming you'll do will use simpleC control structures within the context of readymade

SIO2 tem-plates. It willdefinitelyhelp you tohave somebackgroundin C, C++, orother C-likeprogramminglanguages(an under-standing ofpointers isespeciallyhelpful), butno special-ized programming experience is necessary to get start-ed.

I designed Shootin' Annie along the lines recommendedby SIO2 Interactive in the tutorial games available onthe SIO2 Interactive website, www.sio2interactive.com.In particular, the Meditation Garden game tutorial pack-age shows how to organize assets within the SIO2 gameenvironment for complex games.The basic workings ofSIO2 are all explained in my book, but for more ad-vanced projects, the SIO2 tutorial games are really inval-uable. If you're just getting started with SIO2, there arealso freely available tutorial videos and code packagesavailable on the website. You can study directly fromthese or use them to augment your study from thebook. For Shootin' Annie the game assets and necessaryvalues are all held in a data structure I defined calledSAGAME that is initialized soon after the launch of theapplication, outside of the main render loop of thegame. In this way, all the SIO2 objects and resourcesneeded can be accessed from that data object at anytime during the execution of the game.

MAKING OF: Shootin' Annie

By T

ony

Mul

len

28

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Animated actions in the Action editor.

Page 29: BlenderArt Magazine - 26 - Blender & Gaming

The SIO2 resource data type is also crucially importantin the design of the game. This data structure acts as aresource manager and handles the treatment of re-sources such as models or widgets. Any time you have acollection of objects that need to be cycled through anddealt with in some way, for example the collection oftargets in Shootin' Annie, it is a good idea to give themtheir own resource manager and make that resourcemanager active when you want to deal with those spe-cific objects.

For example, the collection of targets were importedusing a separate .blend file, and they are handled bytheir own associated SIO2 resource manager.

The way to bring 3D assets into SIO2 is to use the SIO2Exporter Python script to export them from Blender to aspecial file format called a .sio2 file. I worked with mul-tiple .sio2 files for Shootin' Annie. The book discussesexporting Blender files to the .sio2 format, but the .sio2file format can also be used to bring other resourcesinto the SIO2 environment, such as widget graphics. It'sincredibly simple to do this. All you need to do is put theresources you want into a directory, zip the directory,and rename it from .zip to .sio2.

You can then access these files from within Xcode justas the book describes doing with 3D assets.

Working with Apple

Working with the iPhone SDK and Apple's various proto-cols and environments is a challenge in itself that manyBlender users may not be accustomed to. Unlike thefreedom-loving, open-source Blender Foundation, Appleruns a very tight ship, for better or for worse. Given thechallenge of creating a lucrative, stable, and secure envi-ronment for developers on a mobile phone platform, it'shard to fault them for how they've gone about it.

Open source purists will proba-bly not feel comfortable devel-oping for this platform, butthen again, until recently therewere few if any open sourceoptions for mobile phonesavailable, and most platformsdid not allow 3rd party devel-opment at all, so the iPhoneplatform should be consideredin this context. HopefullyGoogle's Android will open uplucrative opportunities for de-velopers in the future.

In any case, developers shouldbe prepared to jump throughsome hoops to get their workmade available on iTunes, be-ginning with own-ing a recent Mac.The iPhone SDK, in-cluding the iPhoneSimulator, the Xcode IDE and a variety of other tools isavailable for free, so you can test the water with no ex-pense, but to program for an actual device or to makeyour game available to others on iTunes requires a $99membership to the iPhone Developer Program.

Once you're a member, there are procedures at everyturn to ensure a secure and controlled developing envi-ronment. While these can be a bit of a hassle, the iTunesservice runs remarkably smoothly once you've got allthe formalities out of the way. When you've done this,you'll have the satisfaction of having your own game onthe market for one of the hottest platforms around, andif you're lucky, you might make some money at it aswell

MAKING OF: Shootin' Annie

By T

ony

Mul

len

29

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

The blend file contains the bulleyes

Page 30: BlenderArt Magazine - 26 - Blender & Gaming

IntroductionMii-School is a 3D school simulator de-veloped with Blender and used by psy-chology researchers for the detection ofdrug abuse, bullying and mental disor-ders in adolescents. This work was fi-nanced with a research project from theSpanish Ministry of Health and Con-sumption and developed in the Univer-sity of Almería (Spain). The schoolsimulator created is an interactive videogame where the players (in this case, thestudents) have to choose, amoung 17

scenes simulated, the options that better definetheir personalities.

Different quality versions of Mii-School have beencreated, so the execution of the program can beadapted to the technical characteristics of each spe-cific computer as closely as possible. So if Mii-School is executed on a latest-generation PC, it canuse the highest-quality version to enjoy better view-ing (XGA 1024x768 resolution). However, if thegraphic card cannot reproduce this visual qualitywith sufficient fluency, other lower-quality versionscan be executed (SVGA 800x600 or VGA 640x480 reso-lutions).

Development methodology with Blender

I chose Blender as my Mii-School development toolbecause this software incorporates all the function-ality that I need to make a video game from begin-ning to end: 3d design, advance illumination andtexturing, characters animation, Blender game en-gine, programming with Python, etc. Besides,Blender has the most important property that is

most wanted in software: it is open source. Blenderincorporates almost the same functionality as 3DStudio Max (whose license costs more than 3.000€)and Virtools Game Engine (whose license costsmore than 9.000€), and Blender is free.

Mii-School development process with Blender wasdivided in three different stages:

a) 3D design, illumination and texturing

During this first stage, the 3D meshes were createdwith Blender to represent the virtual scenarios andcharacters that appear in the scenes. The Mii-Schoolsimulation takes place in different scenarios: theschool playground, the classroom, the maincharacter’s home, a park... Each scenario is dividedinto several zones (for example, the home has sev-eral rooms, the playground has an area with bench-es, another for sports, etc.), each zone is used for a

different scene and the user does not get the im-pression that the scenarios are repeated. A total of30 characters were designed in Blender: severalmale and female students of different races and so-cial conditions, the teacher who is teaching in theclassroom, the student’s parents, etc. All of the Mii-School 3D models were created using basic and ad-vanced design techniques included in Blender:

MAKING OF: Mii School

By M

oisé

s Es

píno

la

30

Cricket and Friends See a Comet!

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Mii School

Page 31: BlenderArt Magazine - 26 - Blender & Gaming

extrude, split, merge, etc. and finally, smoothing filterswere applied for smoother surfaces without overly in-creasing the number of polygons (set smooth).

For proper illumination of the scenes, a sun type globallighting illuminates above the main student on whomthe simulation action always focuses, so that the ob-jects and characters around him are always properlyilluminated. Some spotlights were also used to increaseillumination on certain places.

Texturing was also done during this first stage using theUV mapping technique and the Blender materials editor,applying good quality images to the 3D models to in-crease realismof the scenesand characters.

b) Animation

Once the 3Dmodels weredesigned, I pro-ceeded to theanimation stageby first creatingskeletons asso-ciated with the character's 3D meshes, then capturingbones movement using a series of intermediate poseswith the aid of a technique called inverse kinematics.

Character's animations were divided into two largegroups: body and facial. Body animations affects thecharacter’s whole body. I implemented several types ofbody animation in which the characters perform someaction: walking, sitting, hitting, threatening, lyingdown, fighting, smoking, drinking, etc.

In order to increase the expressiveness and realism offacial animations, the number of polygons and level of

detail havebeen in-creased no-ticeably ineyes and lips,areas thatmost influ-ence the fa-cial gestures.So if onecharacter isthreateninganother in a certain scene, his face expresses aggressive-ness. If, on the contrary, a character feels threatened,his face shows fear.

c) Blender Game Engine and Python program-ming

When thecharacterswere createdand the cor-respondinganimationsimplement-ed, I startedthe codingstage usingthe Pythonprogramming language and the Blender Game Engine.Over 6,000 source code lines have been implemented inPython to simulate the action of the 17 scenes. Thissource code is the Mii-School kernel. It specifies all thedetails necessary to compose the scenes and also cap-tures all of the information provided by the student. TheMii-School kernel is interpreted by the Blender GameEngine.

MAKING OF: Mii School

By M

oisé

s Es

píno

la

31

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 32: BlenderArt Magazine - 26 - Blender & Gaming

The source code specifies aspects such as what charac-ters intervene in each of the scenes or which scene isgoing to be developed in this moment. In order toachieve better performance during program executionin the simulation of a scene, only the characters andobjects that are going to be viewed by the camera areshown, the rest are hidden.

The source code that I have programmed in Python fol-lows the instructions of a deterministic finite automatato find out in what state of simulation Mii-School is atany given time. It then activates the corresponding cam-era, body animation, and facial expressions of the char-acter who is speaking at the moment. The following textshows part of the source code for the first scene in Mii-School. This code specifies the person speaking in thismoment, his basic body animation, the facial expression(mouth and eyebrows), the active camera and the dia-logue that is visualized on the screen. Finally, the com-plete scene is activated by sending all of the data to theBlender Game Engine.

...

elif STATE==6:

CHARACTER="baddie01"

BASIC ="bodyHandsHips"

MOUTH ="mouthNormal"

EYEBROWS ="eyebrowsNormal"

CAMERA="cameraCharacter01"

TEXT = " We want to play handball, but wehave not a ball ...”

activateScene(CHARACTER, BASIC, MOUTH,EYEBROWNS, CAMERA, TEXT)

elif STATE==7:

CHARACTER ="baddie02"

BASIC ="bodyHandMouth"

MOUTH ="mouthLaugh"

EYEBROWS ="eyebrowsBaddie"

CAMERA ="cameraCharacter01"

TEXT = "Perhaps we could use ... your headas a ball !!"

activateScene(CHARACTER, BASIC, MOUTH,EYEBROWNS, CAMERA, TEXT)

To simulate Mii-School, the Blender Game Engine notonly executes the Python source code that I have devel-oped, but also takes into account a series of events asso-ciated with the dynamic objects in the scenes, especiallycharacters (both their 3D mesh and the skeleton) andcameras (with their corresponding dialogue box, whichalso has associated events). Each event is divided into 3parts: the sensor (that receives information, for exam-ple, pressing a key or a specific signal), the actuator(which performs actions on objects, like animating acharacter or moving a camera) and the controller(which connects the sensor to the actuator).

In the Mii-School project, there are over 900 basic ob-jects with associated events. Some are complex objectssuch as a character’s skeleton or its 3D mesh, others aresimpler, such as the dialogue box for a specific camera.Each object has an average of 10 events of its own thatregulate their functioning. For example, in the camerasan event can indicate a movement, in a character anevent can activate an animation.

MAKING OF: Mii School

By M

oisé

s Es

píno

la

32

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 33: BlenderArt Magazine - 26 - Blender & Gaming

The Blender Game Engine also takes other secondarydetails into account, such as which scenes the maincharacter’s cigarette or bottle should be seen or hidden,or what color the conversation box should be dependingon the character who is speaking at that moment.

To summarize, during the execution of Mii-School, theBlender Game Engine must synchronize around 10,000different events in real time, activating only those thatare necessary right at that moment of the simulationand discarding the rest. Apart from this work, it is alsoin charge of rendering and illuminating the scenes inreal time as well as capturing information introduced bythe user.

Simulated scenes in Mii-School

During the execution of Mii-School, the student watchesa total of 17 interwoven scenes studying different as-pects of his behavior related to bullying, drug addiction,family life, capacity for attention in class and integra-tion in social groups.

There are a total of 5 scenes that study bullying. In someof them, the student is bullied by his schoolmates andin others he becomes the bully. In this way bullying canbe studied from several perspectives. Some concretecases are also studied, for example, the reaction of thestudent to the explicit violence of a physical aggressionin the schoolyard to see if he is a mediator or, to thecontrary, violent. For each bullying scene, the studentcan select from a series of choices that always follow ageneral pattern: feeling indifferent to the bullies, pro-testing to them, responding ironically, running away infear, facing up to them or feeling ashamed.

MAKING OF: Mii School

By M

oisé

s Es

píno

la

33

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 34: BlenderArt Magazine - 26 - Blender & Gaming

During the 6 drug addiction scenes, the drug offered be-comes gradually more dangerous. In the first scene, thestudent is tempted by his schoolmates to smoke in theschool playground during recreation. In the secondscene, he is invited to drink alcohol while eating a pizzaat a friend’s house. Afterwards, he is offered a joint ofmarijuana in a park. In the last two scenes, the risk isupped further when his friends offer him much moredangerous drugs, such as cocaine or ecstasy. Thechoices that the student can choose in the drug addic-tion scenes also follow a general scheme: usually use,

refuse to try the drug, advise friends to stop taking it,use occasionally or leave because he feels uncomforta-ble.

The student’s relationship with his parents is also stud-ied in three scenes: one scene checks the father’s behav-ior, another, the mother’s attitude, and a third sceneboth parent's behavior. In the first two scenes the stu-dent gets home much later than the hour agreed uponand checks whether the father or the mother scold him,threaten him or, on the contrary, are indifferent to hisundisciplined behavior. In the third scene, the studentgets home after school and feels anxious because he hasproblems with his studies and the simulation checkswhether his parents become involved in his problems orare indifferent to them.

MAKING OF: Mii School

By M

oisé

s Es

píno

la

34

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 35: BlenderArt Magazine - 26 - Blender & Gaming

There are other scenes where personality-related prob-lems and the student’s mood, attention in class, beliefsand integration in social groups are checked.

Final results and future works

The total simulation of Mii-School's 17 scenes lasts ap-proximately 25 minutes. The student can choose his sexat the beginning of the simulation to personalize theanimations to his own gender. All the information intro-duced by the student, as well as the choices selected in

each one ofthe scenesand otherdata of inter-est, is storedin a webpage formatfor laterviewing andanalysis bythe psychol-ogy research-ers.

Background music has been added in the scenes andaudio in the conversations to achieve more realism.Proper movement of the cameras during the transitionof scenes is also carefully made so the simulation hasthe quality of real movie.

As a future enhancement of the Mii-School program, thesimulator is going to be translated into different lan-guages

MAKING OF: Mii School

By M

oisé

s Es

píno

la

35

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Moisés Espínola

Website: http://www.ual.es/personal/moises.espinola

Page 36: BlenderArt Magazine - 26 - Blender & Gaming

Fullmetal Soccer - by Bernhard BauerGALLERIA

36www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 37: BlenderArt Magazine - 26 - Blender & Gaming

Zero Ballastics -by Bernhard BauerGALLERIA

37www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 38: BlenderArt Magazine - 26 - Blender & Gaming

Ranger - by Mark WowkGALLERIA

38www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 39: BlenderArt Magazine - 26 - Blender & Gaming

Riverling - by Mark WowkGALLERIA

39www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 40: BlenderArt Magazine - 26 - Blender & Gaming

Atlantis Return (Game) -by Alvaro CortsGALLERIA

40www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 41: BlenderArt Magazine - 26 - Blender & Gaming

Pandora floating islands -by Victor Jesus Acevedo del RealGALLERIA

41www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 42: BlenderArt Magazine - 26 - Blender & Gaming

Quarantine -by SebaGALLERIA

42www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 43: BlenderArt Magazine - 26 - Blender & Gaming

Sweet little soilder -by Zoltan MiklosiGALLERIA

43www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 44: BlenderArt Magazine - 26 - Blender & Gaming

SnowScene -by LightningIsMyNameGALLERIA

44www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Page 45: BlenderArt Magazine - 26 - Blender & Gaming

1. We accept the following: Tutorials explaining new Blender features, 3dconcepts, techniques or articles based on currenttheme of the magazine.

Reports on useful Blender events throughout the world. Cartoons related to blender world.

2. Send submissions to [email protected]. Send us a notification onwhat you want to write and we can follow up from there. (Some guidelinesyou must follow)

Images are preferred in PNG but good quality JPG can also do. Images should be separate fromthe text document.

Make sure that screenshots are clear and readable and the renders should be at least 800px,but not more than 1600px at maximum.

Sequential naming of images like, image 001.png... etc. Text should be in either ODT, DOC, TXT or HTML. Archive them using 7zip or RAR or less preferably zip.

3. Please include the following in your email: Name: This can be your full name or blenderartist avtar. Photograph: As PNG and maximum width of 256Px. (Only if submitting the article for the firsttime )

About yourself: Max 25 words . Website: (optional)

Note: All the approved submissions can be placed in the final issue or subsequent issue if deemedfit. All submissions will be cropped/modified if necessary. For more details see the blenderartwebsite.

45

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

Want to write for BlenderArt Magazine?

Here is how!

Page 46: BlenderArt Magazine - 26 - Blender & Gaming

46Upcoming Issue ‘Theme’

Issue 27

Disclaimer

www.blenderart.org Issue 26 | Feb 2010 - "Ready, Set, Play! Blender & Gaming Content

blenderart.org does not takes any responsibility both expressed or implied for the material andits nature or accuracy of the information which is published in this PDF magazine. All the ma-terials presented in this PDF magazine have been produced with the expressed permission oftheir respective authors/owners. blenderart.org and the contributors disclaim all warranties,expressed or implied, including, but not limited to implied warranties of merchantability orfitness for a particular purpose. All images and materials present in this document areprinted/re-printed with expressed permission from the authors/owners.

This PDF magazine is archived and available from the blenderart.org website. The blenderartmagazine is made available under Creative Commons‘ Attribution-NoDerivs 2.5’ license.

COPYRIGHT© 2005-2009 ‘BlenderArt Magazine’, ‘blenderart’ and BlenderArt logo are copyrightof Gaurav Nawani. ‘Izzy’ and ‘Izzy logo’ are copyright Sandra Gilbert. All products and com-pany names featured in the publication are trademark or registered trade marks of their re-spective owners.

"Shadow Showdown: Achieving Light/Shadow Balance" Lighting game levels and characters, images, animations

Atmospheric lighting

Nodes/compositing for great lighting effects

Coloured shadows

Ambient Occlusion

Lighting groups

Textured lighting/shadows