Creating Vector Game Art using iDraw on iPad

29. October 2014

 

As part of the ongoing Guide to Creating a Game Entirely on an iPad series, we recently looked at a number of 2D raster and vector graphics programs available onidraw_large_icon iOS.  One of the programs that really stood out was iDraw, a vector drawing program.  I’ve actually used iDraw for a while now, going back to the concept art I did for the Blender tutorial series and I am certainly a fan.  Although both Inkscape (Desktop) and Inkpad (iPad) are available for free, I find both to be pretty unwieldy at times.  iDraw just hits that sweet spot between usability and functionality, at least for me.

 

In this video I take a more in-depth look at iDraw. 

 

In this video I show the functionality available in iDraw.  THe first half of the video I complete this game art tutorial that was written for Inkscape, so if you are familiar with Inkscape, you can see how iDraw works at the same task.  If you’ve got no experience with vector graphics at all, this video should certainly give you the basics.   The last half of the video is a tour of iDraw’s additional functionality.

 

 

 

If you have a Mac or iPad and are looking for a vector graphics solution, iDraw is certainly worth checking out.  iDraw is available for $8.99 on the AppStore for iPad, while it is also available (with almost identical functionality) on the Mac for $24.99.   If you are looking for a tutorial on creating vector graphics, or are looking for more details on using vector graphics for game dev, 2dgameartforprogrammers is a great resource you should check out.

 

… I still hate the name iDraw though.  I hate an irrational hatred for all iNaming iProducts, I think many others do too!  Get over the name though and you will find an excellent product.

 

Next up, I will look at using Vector graphics from a Codea code perspective, to see how it’s done and what the performance is like.  Stay tuned!

Art , ,




Guide to Creating a Game on an iPad–Raster (pixel) and Vector Art Programs

20. October 2014

 

Now we are going to look at available raster graphics programs available on iPad.  While this post is part of an over all series about creating a game using only an iPad, this post should be of use to anyone looking to create art in general.  The iPad ( and other tablets ) are becoming increasingly viable ways of creating art, especially 2D art.  One major reason for this is cost.  An iPad is generally cheaper than a PC/Mac + graphics tablet, but it’s software costs where this really becomes obvious.  For example, the desktop version of Photoshop ( before it went subscription ) used to cost about $800.  The tablet version of Photoshop… $10!  Another desktop/tablet example is ArtRage, which ( although vastly cheaper ) is available at $50 on Desktop, it is only $5 on iPad.  Granted, they aren’t identical products, and often the iPad version has less functionality, but I tend to find it has all the functionality I generally need.  You mileage may vary.

 

So we are going to take a look at some of the Raster and Vector packages available on iPad.  Raster and Pixel mean basically the same thing, although “Pixel Art” has often come to represent a very specific style, with fat chunky pixels like from the 8 and 16bit era.  We will also look at two options aimed specifically at this style.  We will also look at Vector graphics packages, which allow you to define brush strokes mathematically, making for nice scalable graphics. 

 

I have also done a video quickly showing each application running, so you can have a better idea what the experience is like.  I only spend a couple minutes with each, but a few minutes is often all you need to decide if something is right for you or not!  All testing was done on a iPad Air, so if your device is slower, your experience may not be as good.

 

This video is a quick demonstration of every application mentioned below.  You can view it directly here.

 

 

Ok, let’s jump right in:

 

Photoshop Touch

iTunes Link

Cost: $9.99

Screenshot(s):

Photoshop

 

Comments:

Be careful when it comes to the Photoshop products, Adobe have released a number of Photoshop branded iOS projects and most of them are focused on photo manipulation and most useless to you.  The version you want is Photoshop Touch.  This is the mobile version of the venerable desktop Photoshop application.  While certainly stripped from it’s desktop counterpart, it is still impressively capable.

One immediately useful feature is the allowed canvas size.  Earlier versions where limited in canvas size, while now you can successfully create a 4096x4096 texture, which is the reasonable upper limit of what you will ever want to create.  I will admit though, at this size things can get a bit sluggish at times, although the painting experience is just fine, running tools like magic wand select or applying fx can bring up a wait logo.  Speaking of which, that is two areas where Photoshop really shines compared to it’s peers.  The selection tools are great, including a magic wand, scribble selection, polygon, lasso, etc select and deselect tools.

Tools are solid but not exceptional.  Feedback is great, there is no lag even on large files.  Navigation takes a bit to get used to, but is quick once you know what you are doing.  It has a few standout tools, such as the clone and heal brushes, which are somewhat rare.  Otherwise you are left with paint, burn, smudge, spray and erase as your primary art tools.  You do however have a ton of fine control over each tool, such as brush patterns, angle, scatter, size, flow and transparency.  You have to set it up yourself, but you can emulate basically any brush type you desire.

Of less use to game art, but still occasionally valuable, Photoshop Touch has 16 built in adjustments like Black&White, Shadow/Highlight, etc.  There are also 30+ filters built in, such as Sharpen, Drop Shadow, Blur, Glass, Comic, Watercolor, Sephia, etc.  There are also an impressive number of manipulation tools tucked away in here for cropping, scaling, rotating, transforming(warping) and fairly solid text tools as well.

Where Photoshop Touch really shines is layers.  You can have several layers, either new, cloned or imported from existing media.  Layer control is solid making it easy to move layers up, down, merge and delete as well as altering the opacity.  Additionally layers can be normal, darken, multiply, lighten, overly, subtracted, etc.  Fx can be limited to an individual layer. 

While Photoshop Touch may not be the program you create your art in, it should probably be in your toolbox for the sheer amount of flexibility it gives you.  In terms of alterations and manipulation of images, it can’t really be touched.  The selection, copy/paste, import and layering tools are easily the best out of any tool I look at.

In terms of getting your work out at the end of the day, unfortunately there is no direct Dropbox integration, but that isn’t really surprising given Adobe have their own cloud storage system, Creative Cloud.  In addition to their cloud offering, you can also save to the local photo roll.  There is however a Share option, allowing you to export the file ( as JPG, PSD, PSDX or PNG ) to just about any iPad application ( including dropbox ) or to email, printers, etc.  However the process is remarkably slow and sometimes simply doesn’t work.  At the end of the day, you can get just about anything in and out of Photoshop Touch that you would expect, but it can be awfully slow at times.

I suppose it’s fair to point out, it’s actually Photoshop Touch I used to resize and export the screenshots from my iPad to my Mac while creating this post.  It’s just a handy tool to have.

 


 

Autodesk Sketchbook Pro

iTunes Link

Cost: $3.99 for Pro Tools

Screenshot(s):

AutodeskSketchbook

 

Comments:

This product is a bit difficult for me to cover, as the version I have doesn’t actually seem to exist anymore.  At some point they moved from a premium iPad only product (Sketchbook Pro) to an freemium model, where you can download the base (Sketchbook Express), then for $3.99 unlock the premium tools.  I believe at the end of the day, they become the same product, but if there are minor differences, I apologize now.  As I am not entirely certain what is in the free vs pro edition, the below will be describing the complete purchased product.

Sketchbook is exactly what the name suggests, a virtual sketchpad.  It’s an impressive one at that.  It’s got a minimal interface that get’s out of your way ( all of the things you see in the above screenshot are brought up by pressing the circular icon.  Let go and it’s just you and your drawing. Drawing tools are pretty typical with pen, pencil, market, highlighter, erase, smudge and airbrush available, plus the ability to choose custom brushes/stamps from probably 100+ presets, including common pencil type (2H, 8B, etc) and oddly enough, so clip art.  Responsiveness while drawing is instant.  Using a quick pop up tool you are able to alter your brushes dimensions and opacity with a single touch.  One nice feature, lacking from many similar products, is the ability to draw lines and shapes, although curves didn’t seem to work.

There are a couple unique to Sketchbook features, of varying levels of usefulness.  There is a symmetry draw mode, enabling you to draw mirrored about a centre point.  You can also do time lapsed recording and collaborative sketching with someone else with their own copy of Sketchbook.  Sketchbook also has decent text creation abilities built in.  Most importantly (to me), Sketchbook also has layer support, although nowhere near that of Photoshop Touch.  Even just a single layer to enable tracing for animation is invaluable. 

You can export from your gallery directly to the local photo gallery, to iTunes, email, etc… as well as directly to Dropbox.  You can create images up to 1800x2400 in size, although the size of image limits the number of layers.  A 1800x2400 image can for example have 4 layers, while a 768x1024 image can have up to 18 layers.  The largest image you are able to create is 2830x2830.  No idea why it stops there…  Even at that size, performance remains smooth.

Sketchbook is a great product for creating sketches, the brushes are natural, performance is good and tools are complete enough to recreate most anything.  The interface is faster to navigate than Photoshop Touch, but it has a great deal less functionality, with absolutely no filters, effects, selection tools and minimal layer functionality.  For drawing however, I would take it over Photoshop Touch every day.


 

Art Rage

iTunes Link

Cost: $4.99

Screenshot(s):

ArtRage

 

Comments:

This is the most applicably named application I have ever encountered!  It’s an amazing application for creating digital art, and it is horrifically rage inspiring!  ArtRage attempts to recreate real world art process digital, and does an incredibly good job of it.  You can choose your paper type (grain), metallic-ness then go to town using tools like paint, roller, trowel, crayons, markers, pens, erasers, pencils, airbrush and a couple different paint brushes.  For each brush you can set a number of settings specific to each tool such as pressure, thinning etc.  You really can recreate a very “painterly” feel.  So why the rage?

Well that part is simple.  This application lags.  Always lags and I absolutely cannot use it for that reason.  Regardless to the complexity of your scene, your paint brush will always been a half a second behind where you are touching.  Of all the applications I looked at, this one had by far the worst performance.  If you can handle the delay while drawing, this application is certainly worth checking out, especially if you are looking for a natural media look.  I personally cannot get over the lag.

From a technical perspective, Art rage allows a maximum canvas size of 2048x2048.  It supports layers with an absolute ton of blending modes.  There is no manipulation tools for selection, transformation nor any filters or effects.  This is a painting program focused on painting and nothing more.  It however probably does the best job of recreating brushes and paper in the digital world.  It has the ability to export to Dropbox as well as save locally, but not to send to other applications on your iPad.


 

Bamboo Paper

iTunes Link

Cost: Free for Base + up to $3.99 to add tools

Screenshot(s):

BambooPaper

 

Comments:

Made by Wacom, famous for the titular Bamboo tablets.  The free version ships with a pen, then for 99 cents each, or $3.99 for all, you can add tools such as Brush, Crayon, Pencil etc.  It’s got a slick package, good export support (including Dropbox) and does feel like working in a notebook.

That said, it’s simply too limited to be used for much more than sketching.  Lack of layer support, minimal dimension options, no selection tools, filters or advanced brushes.

 


 

Paper

iTunes Link

Cost: Free then up to $6.99 for all tools

Screenshot(s):

Paper

Comments:

Paper is a somewhat famous application, as it has been used in Apple promotional materials.  It is also incredibly basic, basically just trying to mimic the drawing on paper experience.  As you can see from the screenshot above, I only have the free version installed.  For up to $6.99 you can add other art tools like a pencil, marker, paint brush, colour mixer, etc.  Export abilities are limited to save to camera roll and send to app.

The drawing is nice and natural, but it’s too limited to be of much use for game development.  Additionally, it’s price is hard justified compared to similar applications.  Can’t really recommend paper other than for sketching if the minimal interface floats your boat.


 

Skeches

iTunes Link

Cost: Free to start, up to $4.99 for all tools, plus text and layers

Screenshot(s):

Sketches

 

Comments:

Sketches is very similar to Paper and  Bamboo Paper, in that it emulates a classic sketchbook.  However the major exception is, with the premium purchase of $4.99 you gain among other things, layer support.  Additionally the free version includes a complete set of tools, but limits the customizability of each.  It contains all of the same tools as the previous two applications.  The interface can be minimized by swiping aside panels.  Navigation is multitouch based and to be honest is confusing as hell until you get used to it.

You are able to export to a number of formats, including Dropbox.  You can select from a number of paper types, but unfortunately have very little control of resolution of the image, maxing out at that of a Retina iPad.

Of all the sketch based drawing applications, this one was easily my favourite, even with it’s somewhat unnatural navigation interface. 


 

Concepts

iTunes Link

Cost: Free to $6.99 for full toolset

Screenshot(s):

Concepts 

 

Comments:

Of all the applications I’ve covered yet, Concepts is probably the most unique, and in some ways, the most powerful.  Designed for creating sketches for concept art, it comes with several tools you haven’t seen yet.  For example, there is a tool for tracing lines and arcs.  There are snapping tools for snapping to the grid.  Speaking of which, the grid can be turned off, on, and set to a number of different densities and formats, including isometric, which can be invaluable if that is the art style you are going for.  There is full layering support, but they are intended for organization/tracing/layering and not artistic effects.  Beyond transparency, there are no blending options for layers.

Artistic tools are somewhat limited to pens, pencils and markers.  More natural art style would be hard to achieve in this program as a result.  That said, the color system is amazing and emulates COPIC markers, allowing you to create pretty much the same tools that concept artists use.

For precision works, this is hands down the best choice out there.  For drawing striaght edges, lines and curves, only the next option comes close.  For more painterly effects, this is a poor choice.  There is no filter or fx support.  Export support is robust, and actually capable of exporting to DXF ( Autocad ), SVG ( Vector ) and PSD formats.  You can also export as an image to the local camera roll, as well as export to Dropbox and others ( including somewhat shockingly, Adobe’s Creative Cloud ).

If you are doing concept art, or going for a technical look, this is hands down your best choice.

 


 

Adobe Illustrator Draw

iTunes Link

Cost: Free!

Screenshot(s):

 AdobeDraw

Comments:

Adobe make a number of products of a very similar nature, Adobe Ideas, Adobe Lines and Adobe Sketch.  Adobe Draw however ties together the best of each of them and has some very interesting abilities.  By far and away the most important feature is the ability to use an angle or french curve ( like shown above ) to draw straight lines and curves.  The actual drawing features are somewhat limited, mostly pen/pencil style drawing implements.  You can control the brush tip size, colour and opacity and that’s it. There is layer support buts it’s tied to each tool somewhat oddly.  The response is quick, the interface is nice and clean and though limited, the brushes are different enough to be useful.

All that said, this application is free.  It’s good and it’s free.  In some ways the drawing tools are amongst the best available.  The angle/french curve functionality is exceedingly well implemented, much better than the curve support in Concepts, which is the only other program that offers similar functionality.  Export functionality is fairly traditional, you can save to the local camera roll, upload to creative cloud and hit the standard share with targets, including Dropbox.  Unfortunately it seems you have little (no?) control over the canvas size.

I don’t really understand the business model here, but free is a wonderful price.  Be sure to check this one out.

 


 

Inkist

iTunes Link

Cost: Free *for a limited time, seemingly forever

Screenshot(s):

Inkist 

 

Comments:

I will be honest, I had a great deal of trouble navigating my way around this application.  Even saving a file was somewhat perplexing.  In many ways it has an interface like many desktop art packages like GIMP or Paintshop.  That interface doesn’t necessarily work on a touch device.

There is actually a LOT of functionality packed in here, more so than most of the packages listed here, except perhaps Photoshop Touch. There is full layering support, but limited to 3 layers ( I think, who knows whats behind that interface that I couldn’t figure out! ), and all kinds of blending functionality between layers.  Art tools are somewhat limited.  I think everything you need is in here, but accessing it is somewhat of a trick.

That said, it’s listed as free for a limited time, and that was over a year ago.  It doesn’t seem like this application is still being developed, so it’s a completely free option.  For that reason alone you should check it out, the interface might click for you better than it did me.  If nothing else, the price is right!

 


 

Pixel Art Packages

 

Sprite Something

iTunes Link

Cost: $4.99

Screenshot(s):

SpriteSomething

 

Comments:

This application is unique in the list as it is specifically aimed at low resolution ( 8/16bit ) pixel art.  At it’s core it’s a fat bit grid editor.  You draw pixel by pixel, although it does have some handy tools like fill, line drawing, etc. There is also layering ability, but there is no blending between layers, it’s literally just stacked pixels. You work in a massively zoomed in window, but you can preview the end result as you work.  There are also tools for doing frame by frame animation sequences, including onion skinning functionality.  This part of the interface can be a bit clunky.

One very unique thing about sprite something is, it has a simple level editor built in as well.  See the video for more details.  Export is limited to email and local camera roll.  If you are working in fat bit pixel style, this is your best ( and almost only ) option. 

 


Codea

iTunes Link

Cost: $9.99

Screenshot(s):

Codea 

 

Comments:

I’m just mentioning this one for thoroughness.  If you are reading this as part of the overarching iPad game creation tutorial, there is a simple pixel art example “Spritely” built into Codea.  Its another fat bit grid editor for pixel art.  It’s very simple but may be enough for you if you have simple requirements.

Obviously not recommended to non-Codea users.

 


Vector Graphics Packages

 

Vector graphics applications work a bit differently than raster packages we described above ( except perhaps Concepts which is a cross between Raster and Vector graphics ).  Raster applications work on a pixel by pixel basis.  Vector graphics on the other hand work on mathematic formulas representing each brush stroke.  This gives you a bit less fine control over the end results, but allows you to scale up or down to any graphic resolution you want.

 

Inkpad

iTunes Link

Cost: Free and Open Source

Screenshot(s):

 Inkpad

Comments:

Completely free and open source, Inkpad is a powerful vector graphics package.  If you’ve ever used Inkscape on a PC, you know what you are in for.  You draw using paths, manipulate curves either straight line or bezier for curved edges and using simple geographic shapes, build, color and layer them to create more complex images. 

Inkpad has full layer support, although they don’t really effect each other like in raster packages.  You can however bring in a standard graphic as a background or to trace over.  Inkscape supports saving as an image locally or exporting as PDF or SVG.

Once again, it’s completely free.  Free is nice.

 

iDraw

iTunes Link

Cost: $8.99

Screenshot(s):

IDraw

 

Comments:

iDraw has one of those iNames iAbsolutely iHate, but don’t judge the package by it’s name.  I absolutely love this package and strongly recommend it to anybody reading this that wants to work with vector graphics.  This application works very similar to Inkpad, except with more functionality, more polish and a higher price tag.  I have struggled in the past with vector graphics applications such as Inkscape ( unwieldy ) and Illustrator ( overwhelming ) and iDraw is the first one that just “clicked” for me.  Once again, the basic concept remains the same, you draw shapes using lines (paths), fill those paths with colors or gradiants, and layer them to make more complex shapes.  One major difference between this and Inkpad is the free form drawing tools, that allow you to use it much more similar to a traditional drawing package.

iDraw is also available as a complete application on Mac and files are interchangeable.  This page has full layer support and is capable of saving directly to Dropbox.  Files can be exported as iDraw, PDF ( very very very useful with Codea as we will soon see ), SVG, PSD, PNG and JPEG, with resolutions of 72, 144 or 300dpi.

 

 

Summary

 

This is only a small subset of graphics packages available on iPad, but does represent a large cross section of them, as well as featuring most of the “big names”.

 

Myself, if I were to only be able to keep a couple applications, my personal choices would be:

  • Photoshop Touch — for image manipulation, modification, effects and some creation
  • iDraw — Vector graphics made easy
  • Adobe Draw — Great sketching app, excellent line and curve support, completely free
  • Sketches — Most versatile drawing app with different brushes like watercolour, paint, etc
  • Concepts — Perfect for technical drawings, similar to Adobe Draw but much more technical, Copic integration
 
If I had absolutely no budget available, I would most certainly recommend people download:
 
  • Sketches — For all your sketching needs, I’d pay for it, so free is awesome
  • Inkpad — Powerful vector graphics, completely free
  • Inkist — The interface is rather awful, but it gives you a lot of editing functionality, completely free
 
All told, that represents under 20$ worth of purchases and provides a level of power way taken together that exceeds any desktop application at many times the price.  Even for a total spend of $0, you can end up with a remarkably complete 2D art package.

Art , ,




GameFromScratch Guide to Getting Kids Started in Game Development

16. September 2014

 

It is getting more and more common for kids of younger and younger ages to show interest in game development.  In this day and age there is a wealth of information out there, possibly too much information at times.  This guide is intended to help parents or younger readers get started in the world of game development.  So, what exactly does this mean?  First it means I will focus on technologies that are appropriate to beginners.  Second, it means I am making no assumptions about your technical abilities, in fact, I am assuming you have none.  So if it ever feels like I am insulting your intelligence or speaking down to you, I am not!  On the other hand, if I am unclear or confusing at some point, please let me know and I will try to clarify.

 

 

How young is too young?

 

This is perhaps one of the most common questions asked.  How old do I ( or my child ) have to be to get started in game development?  This is a question with an impossible answer as all kids are different.  On the extremely low end of the range ( and using the right tools ), an incredibly motivated 6 year old would probably be able to have some success.  On the other range of the spectrum, a typical 12 year old should have the educational foundation and mental abilities to succeed.  The actual age is bound to be somewhere in the middle.

 

There are a few critical things to be aware of up front. 

 

The first is motivation.  Motivation is more likely to be the biggest hurdle to success, not mental ability.  If your child absolutely loves creating stuff ( loving to play video games is massively different than loving to create video games ) and is willing to trial and error, they are perfect for game development!

 

The second is managing expectations.  This is where we lose the most potential game developers out there, regardless to age.  Game development doesn’t have to be exceptionally hard, but it is certainly complex.  Your child is not going to be creating massive modern games like Call Of Duty or NHL any time soon.  Nor are they going to create an MMO ( online game like World of Warcraft ).  They need to start small, very small and work their way up from there.

 

A key way to put it is, if your child’s mindset is “I am going to create the next Minecraft”, they are going to fail and fail hard.  On the other hand, if their mindset is “I am going to create the next Minecraft, eventually”, they have perhaps the perfect mentality to succeed.  Knowing the difference there is critical.  Like almost any other skill, you need to start small and build on your successes.  Starting too big will just result in failure and frustration.  For the record, I believe I was about 8 when I started programming using Atari BASIC.

 

 

What is Game Development anyways?

 

This section is going to get slightly more technical, but not overly so.  Game Development is an umbrella term, it includes many different skills all coming together to create a greater whole.  Think about Game Development like you would an car maker.  There is no single skill involved in making a car, instead you have engineers, graphic designers, manufacturers, quality assurance and more all coming together to make a car.  In the case of a game however, it’s still possible for all of these different tasks to be performed by a single person.  There are a number of highly successful games out there that were written, drawn and scored by the same person.  It is important to realize though, this generally isn’t the case.  Basically what I am saying is game development isn't a single task, it’s multiple.  While your child may really enjoy one part, they may dislike another part.  It’s also important when looking at what tools to use to see if they come with art or sound examples to get your child started, so they don’t have to do everything all at once.

 

If you look at a modern game’s credits, you will literally see hundreds of different names and job titles contributed to the project.  When just getting started however, there are really only two tasks to focus on. Creating the game and creating the stuff that goes in the game.

 

Let’s look at the board game Monopoly as an example.  Two major sets of skills went in to making that game.  First you had to create the game…  design the board layout, make the dice rules, write up all the game cards, etc.  Then you had to create the contents of the games, the pictures that went on the board, the drawings on each card, the little plastic houses, etc.

 

In video games, it’s really no different.  You have the task of creating the game, generally called programming and the task of creating stuff to populate your game, be it art, animation or music/sound.  These skills are completely different but are generally required for a game.  This actual tutorial is going to focus mostly on programming, when a child is interested in game development, this is generally what they mean.  A child interested in being a game artist for example, has probably already got their face buried in a notebook, sketching away!  This by the way is the perfect approach for them too, as the difference between “an artist” and a “game artist” is miniscule.  If you do however want to explore computer art for games a bit closer, read this guide.

 

 

What is Programming?

 

So, chances when you are talking about game development you are actually talking about game programming.  What is programming?  The simplest definition I can give is programming is the art of telling the computer what to do.  In the case of game programming, this means doing stuff like “when the user pushes the UP arrow do this” or “when player health equals 0, draw that”.

 

Now how you program games, that’s a much trickier conversation and one of the biggest things that you will struggle with.  Perhaps more importantly, it’s the thing that is going to be most dependent on your child.  We don’t all think the same way and we don’t all express ideas the same.  In some cases a child might take to one particular style while a completely different child would possibly despise it. 

 

For the most part for game programming there are three different ways to tell the computer what to do ( and often a combination of all 3 ):

 

Visually – this is a very common approach for beginners and for game development in general ( Unreal Engine 4, one of the most commonly used commercial game technologies has a Visual scripting interface called Blueprint for example ).  In Visual programming languages you generally drag and drop to draw your game screen, then wire it all together in a flow chart like experience  Basically it’s the programming equivalent of creating a flow chart.  If your child is a visual thinker, this may be the best route for them.

 

Here is an example of a Visual game development tool, Construct:

 

Scripting Languages – With scripting languages you tell a computer what to do using small text files.  You often still draw your game using a visual editor like the picture above, but when actually telling the computer what to do, instead of filling in text boxes or creating flow charts, you use code.

 

Here is an example of the LUA scripting language, using a 2D game library named LÖVE:

image

This little bit of text tells to computer to load an image with the filename “whale.png” and then to draw it on screen.

 

Traditional Programming Languages – Finally a lot of game development is done in traditional programming languages.  Common names include C++, Java, C# and more.  I should start straight away by saying, I do not recommend young programmers start by using a traditional or more accurately, a compiled programming language for several reasons.

 

The big question you may have is, what’s the difference between a scripting and compiled programming language?  A lot of it is technical and beyond the scope of this article but most of it comes down to complexity.  Dealing with a compiled language leaves you dealing with a number of things you simply don’t have to worry about with scripting languages.  Things like compiling ( the act of turning the text you write into something the computer can understand ), linking ( can’t easily explain this one ) and more. 

 

Perhaps more importantly, it’s purpose.  Scripting languages are generally much more focused in what they do and are designed to make things easier for the developer.  Put in the simplest terms, scripting languages are generally a lot easier to learn and use.  If you do want to learn more about traditional programming languages, you can read this guide.  It is a much more technical guide than this one.  If your child is in their teens, this may be an appropriate place to start.  That of course isn’t to say that teenagers ( and older ) are too old for the stuff recommended below.

 

In the end you will often find game development tools offer both a visual system and a scripting language, where much of the game is created using drag and drop but portions can be controlled using a scripting language.

 

 

IDE, Library, what???

 

OK, one last topic to cover before we get into it.  There are a bunch of terms and expressions that get thrown around that might be confusing.  I am going to quickly cover some of them.

 

Language – This is the programming language used.  Just like we used English, Spanish, German etc to talk to each other, we use different languages to talk to computers.  In the example above the programming language was Lua.

IDE – Integrated Development Environment.  This is a bundling of a number of tasks all into a single application.  Not all suggestions will have an IDE, meaning you need to use different programs to do different things.  Generally an IDE includes a text editor, a programming language and various tools all in a single spot.

Library – Think of a library like someone doing a bunch of work for you.  Generally even the “simple stuff” isn’t actually part of the language, things like drawing on the screen.  Instead people write that stuff and make it available to you as libraries.  In some cases, like GameMaker or Construct, it’s all bundled together for you.  In other cases, like Lua, you pick a library to go with the programming language.  Each approach has advantages and disadvantages.  For example, Gamemaker bundling everything together makes life easier to get started, but with Lua, if they don’t like a particular library, they can simply use a different one.

Sprite – A sprite is a graphic used in a game, for example the player.  A sprite can be a single image or could contain multiple for animations.  The exact meaning of a Sprite changes from engine to engine, but is always a visible thing in the game that moves.  If you’ve played Super Mario Brothers, Mario, the turtles, fireballs, etc… would be considered sprites.  The world however, such as pipes and the sky, would not generally be considered sprites.

HTML 5 – This one can get a bit confusing.  HTML5 is the most current version of HTML ( Hyper Text Markup Language ) which is the language of the web.  When you load a webpage in your browser or phone, generally it’s an HTML document that you are looking at.  The confusing part is, HTML5 is actually an umbrella term for a number of technologies that work together to make the web work.  Those include HTML itself, which is a language that describes the contents of a webpage, CSS which is another language that describes how a webpage should look, and finally JavaScript, which is a scripting language that controls the logic.  People often use the terms HTML, HTML5 and JavaScript interchangeably, although this isn’t technically true.  HTML5 can be used to create games and doesn’t have to be run in a web browser.

Debugger – When your game doesn’t run correctly, it can be tricky to figure out why.  Some packages ship with something called a debugger, which is a tool to help you identify problems or “bugs” in your game.  It is a somewhat advanced feature for beginners, but at the point you need one, a debugger can be invaluable.  For additional information on debugging click here, although advanced warning, that is a highly technical article.

 

 

 

Kid Friendly Game Development Options

 

Now after all of that we get to the meat of the article… the actual suggestions for development tools to introduce your child to the world of game development.  This is by no means an all inclusive list!  For each example I will list what’s included, an example of how it works, positives and negatives, the costs if any and links to books available, if applicable.  One last very important thing to note…  any of these options is a valid one, there really isn’t a single ‘best” choice.  Tailor your decision to best match your kids interests.  If you first choice doesn’t work out, try a different one.

 

The following list is in no particular order.

 

Scratch

 

http://scratch.mit.edu/

Overview:

Scratch is an MIT backed project aimed at teaching kids aged 8 to 16 to learn how to program.  There is a massive community built around Scratch, which has been around since 2006.  There is a special focus on being family friendly.  Scratch is run entirely in the web browser, you simply go to the web page and start programming.  If you want to save your work, you need to register, but it’s a simply form and doesn’t even email you for verification.

 

Scratch is firmly in the visual programming languages category.  Your child works by dragging actors onto a scene, then controls them using Lego-like programming blocks.  The blocks are a good parallel to actual programming language structure, so if they switch to scripting or traditional programming, it will make immediate sense.  There is a good amount of documentation available and you can find literally thousands of sample scratch programs to learn from.

 

Perhaps the most valuable part of scratch is it comes preloaded with all kinds of content for your child to get started with.  However it also has the ability to import graphics and audio you create yourself or get from the community, allow an easy transition between programming and making game assets.

 

Screenshots:

Scratch running in Chrome:

image

 

Loading a new Sprite

image

 

Programming in Scratch:

image

The above is a script attached to the blue dog.  It’s in two parts, first is when the Green flag ( Go ) is clicked.  It makes the dog visible, moves to a certain position on screen, then moves by one step over and over.  The other waits until it gets the collide message from the other dog, when it does it goes back to the starting position, changes the scene then hides itself.  Each Sprite has it’s own script.  The programming blocks are drag and dropped from the programming palate:

 

The Programming Palate:

image

These are the blocks you use to program in Scratch.  Above are the “Looks” options.  As you can see, there are a number of different categories to choose from.

Includes or Alternatives:

Scratch is an all in one solution, so you need no other tools to work in Scratch.  It also ships with a large variety of sample scenes, backgrounds and sounds to start with.

Costs:

Scratch is completely free and run by sponsorship donations.

Books:

 

Comments:

Scratch also makes an iPad application called ScratchJr which is aimed at children 5 to 8.  It is also completely free.  Since there is nothing to buy, or download and you don’t even have to register to try Scratch, it is probably the easiest option to try out in this list.

 



 

 

Construct 2

 

https://www.scirra.com/

 

Overview:

Construct2 is another visual programming based game engine.  You create games in Construct2 using a drag and drop interface and control logic using a flow chart like event system.  If the functionality you need isn’t available in Construct2, you can create your own plugins using JavaScript, although this is certainly an advanced feature and is strictly optional, Construct2 is meant to be controlled using the event system.  The ultimate output of Construct2 is HTML5, which can be exported to run on a number of platforms such as mobile ( Android, iOS, Windows Mobile ), browsers and desktop.

 

Construct2 is a great deal more complex than Scratch, which has a two fold impact.  First, Construct certainly has a higher learning curve than Scratch, so it isn’t suitable for younger children and does not take a teaching approach.  On the other hand, it is meant to provide an easy to learn tool capable of creating professional games, instead of for learning.  This means there is a lot more runway before your child runs into any limitations.  There are many professionally shipped games that were created in Construct 2. 

 

There is a good deal of documentation available, including a complete references and a PDF manual available for download.  There is a very active community and strong forum for support.

 

Construct is an application installed on your computer.  Construct requires a computer running Windows.  There is no Mac option currently available.

 

Screenshot:

Construct 2 Main Window:

image

 

Event Sheets

image

This is the primary way of programming a Construct 2 game.  The example above is part of the code controlling how the player responds to input, taken from one of the included samples that shows creating a simple shooting game.

Behaviors

image

Behaviors allow you add quickly add predefined behavior to a game object.

Integrated Image Editor:

image

 

Includes or Alternatives:

Construct 2 is an all in one solution that contains everything you need to get started.  Out of the box however it does not contain a ton of content to get started with.  They do however have a free asset pack available for download. ( Warning, that is a direct download link.  Click it and the 38mb archive of assets will start downloading ).  If you move beyond the free version, you get more assets included.

If you do get into creating plugins, you will need to download the JavaScript SDK, which is available for free.  In this case you will need to provide your own text editing environment, Construct does not include one.

Costs:

Construct2 has tiered pricing.

  • There is a free version available to download.  The free version is only able to create games that run in your browser.  It also includes less bundled assets and has a number of limitations on the complexity of game that can be created.  This limits shouldn’t be too much of a problem at least initially.
  • The Personal Edition is currently 129USD, is able to create Desktop, iPhone and Android games and includes much more bundled assets like sounds, songs and sprites.
  • Finally, there is a Business Edition, which is exactly the same as Personal Edition, except it costs more and is required if you make more than 5,000USD from your Construct2 games.  Basically if you have this problem, it’s a good problem to have!

 

Books:

 

Comments:

None

 



 

Game Maker

 

https://www.yoyogames.com/studio

 

Overview:

GameMaker is an all in one game creation system that is a hybrid providing both a visual programming interface, as well as a scripting language, their own proprietary language GML.  GameMaker initially exports to Windows only, but for a fee can also create games for iOS, Android, Web, Windows Phone and more.

 

Programming in GameMaker can be done in a flow chart like manner, similar to Construct2.  It also adds the option of programming in their own scripting language GML.  This is both a plus and a minus.  The ability to program using a Scripting language in addition to the visual system gives the user a great deal of flexibility.  It is however a more complex process.  Since the language is proprietary to GameMaker, if they move to a different environment, a lot of their knowledge will be less useful.  That said, general programming concepts stay pretty much the same from language to language, so this isn’t as big of a problem as it might sound.

 

Other than assets to get started with, GameMaker quite literally ships with everything you might need out of the box, although the quality of the tools varies.  You are able to create graphics, sounds and levels in addition to programming, all in one single application.  GameMaker has been used to make some very successful commercial games such as Spelunky and Retro City Rampage ( not for children ).

 

GameMaker is one of the more complex options on this list and is probably not appropriate for pre-teen level children.  For older children though, it offers a lot of flexibility and a ton of options should they wish to share or sell their games eventually.  Obviously this changes from child to child, so there is no hard set rule.  Just be aware, compared to say Scratch, the difficulty level here is much higher. 

 

Screenshot:

Main Interface:

image

Visual Programming:

image

Scripting:

(Script for firing a bullet)

image

Level Editor:

image

Sprite Editor:

image

Includes or Alternatives:

GameMaker is an all in one solution and contains everything you will need to make a game including code editing, image creation and editing, map designer and more.  It also includes a built in debugger, useful for hunting down problems.  The standard version however comes with very little in the way of included samples to get started with.  In fact, there are none.  However there is a very active community and tons of examples and tutorials available online.  The quality of the materials varies massively and curation by Yoyo Games is lacking, so finding the best starting material can be a bit of a challenge.  For all of the screenshots and code samples in this entry, I used material from this tutorial.

 

Costs:

GameMaker licensing can be a bit confusing, as their pricing structure has changed and not all material is updated.

The version you initially download is heavily restricted by the number of resources and scripts it can support.

You can however update to the Standard edition by simply registering an email address, which will be verified and you will then be sent a product key.

Then there is a “Professional” version for $100 USD that adds functionality for working with other developers ( you will not need at this point ).  The biggest difference is the Professional version can buy additional modules that support exporting to platforms other than Windows.  Each platform is generally $200 USD.  So for example, if you want to export your game to play on Android and iOS it will cost $500.  $100 for Professional, then $200 for each platform. 

Finally there is a “Master” version, which is basically Pro with all of the different export platforms enabled.  It’s $800USD currently.

For a new developer, the registered Standard edition is most likely good enough.  If you do need Professional, keep an eye on the Steam Store, it is made available for sale quite often.  To add to the confusion, the Standard edition you can download for free is $50USD on Steam.  DO NOT BUY IT!

 

Books:


Comments:

Note, it is not necessary to use the included tools.  For example, if you want to use another graphics program to create sprites, or to import graphics from another source, this is perfectly possible!



 

Lua with LOVE

 

http://www.lua.org/

http://love2d.org/

 

Overview:

Lua is a scripting language, while LOVE is a library for making games ( see the descriptions earlier for definition of a library ).  Lua was a programming language created for non-programmers and has become increasingly popular as a scripting language for commercial games, such as these.  That is one large advantage to choosing this option over say, Gamemaker’s custom scripting language, GML.  Lua is used elsewhere and fairly commonly, so it is a skill that will carry forward very well.    As a language it is fairly simple to learn.

 

LÖVE is the library you use to create games using the Lua programming language.  LÖVE provides pretty much all of the functionality you need to create 2D games including drawing graphics, playing sound, controlling input, loading files, etc. 

 

LÖVE and Lua isn’t a turn key solution like some of the others however, you still need a text editor to create and edit your scripts, a drawing program for creating art, and audio programming for recording sounds, a map maker for creating maps, etc.  Fortunately all of these things are freely available and I have recommendations below.  You do however have to download each one separately.  LÖVE however comes with no assets like graphics or sounds to get started, but sites like Open Game Art and FreeSound can help you get started.  It is however, yet another thing you have to locate and download.

 

The biggest negative about LOVE is the lack of platform support.  Currently LOVE can only create games for computers, although mobile targets are in the works.

 

Screenshot

Sample Lua/LOVE Code:

image

Zerobrane Studio:

image

Includes or Alternatives:

The LOVE library contains Lua, so all you need to get started is here with the getting started documentation here.  However that just gives you Lua and LOVE and nothing else.  You still need a text editor to create your code, plus art and sound programs.

 

For straight text editing, two very popular choices are Notepad++ and Sublime Text.

However, for Lua development I would recommend ZeroBrane Studio which is a more integrated development environment (IDE) that allows things like code suggestions and debugging.  Oh, plus it’s free, which is nice.

For art creation, Paint.NET, GIMP and Inkscape are three very popular free options, the last two however have a pretty hefty learning curve.

For creating levels and maps, Tiled is a very popular and free choice.

 

On the alternatives front, LUA is the scripting language for a number of popular game development tools including Corona, Gideros and Marmalade Quick.  None are as easy to learn as LOVE however, which is why I recommend LOVE over all.  They do however illustrate how learning Lua is a skill that transfers well to other projects.

 

Costs:

Both Lua and LOVE are free.  ZeroBrane is a pay way you like product.

 

Books:

Only one of these books is specifically about LOVE programming.

Lua also have a free reference manual available online.


Comments:

The name of the library is actually LÖVE with an umlaut over the O.  While cute, coupled with the commonness of the word love makes searching for help incredibly annoying.  When using Google, always add “lua” to search expressions.



 

Python with PyGame

 

https://www.python.org/

http://www.pygame.org/news.html

 

Overview:

Like the Lua and LÖVE option, this is a programming language and game library combination.  Very similar to the LÖVE library, PyGame is a very beginner friendly library.  Python is the programming language used in this pairing.  Python is a popular scripting language, although less so in game development.  It is an extremely popular language in the world of 3D graphics, such as at Pixar.   It is also quite commonly used by IT professionals to automate tasks, so even outside game development, Python can be a very valuable skill.  Python has been used to make several games.

 

PyGame also provides most of the common functionality you would expect in a game such as audio, input and graphics.  You also need to provide your own text editor, graphics, sounds, etc.  However unlike LÖVE, PyGame does ship with several examples and some sample assets to get started with.

 

Screenshot:

Python Code in PyCharm

image

Includes or Alternatives:

See the recommendations for LÖVE above, most of the same tools can be used.

ZeroBrane studio however is not an option for Python.  I would personally recommend checking out PyCharm, which has a free version available.  It is however a somewhat complicated editor.  Of course, you can still use whatever text editor you would like, such as the earlier recommendations of Notepad++ or Sublime Text.

 

Costs:

Python and PyGame are both free.  PyCharm is available in a free version.

Books:


Comments:

Python is a more complicated language than Lua, so its is recommended only for older children.  On the other hand, programming in Python is also much closer to programming in traditional languages, so the experience of learning Python will be closest to what professional programming generally feels like.

Sadly, there are two versions of Python, something that has plagued the language for a very long time.  Most of the time you want to use the 2.x version of the language.



 

HTML5 with various

 

http://www.gamefromscratch.com/page/Links-of-interest-for-HTML5-game-developers.aspx

Overview:

HTML5 is a somewhat confusing term these days.  Basically HTML is the language of web browsers while Javascript is the language that enables HTML to do stuff.  With each generation of web browser, the ability to create games has gotten more and more impressive.

 

Javascript is an interesting proposition for learning with as your kids probably already have experience in using a web browser.  Then can simply open a text file, type some code, save and load in the webpage and play.  It’s a very nice feedback loop.  Unfortunately there are some downsides here too.  While a pretty straight forward programming language, Javascript has some horrible flaws that make it hard to recommend to a complete beginner.  On top, each browser has tons of flaws, that also add a layer of complication on top.  Finally there are just so many options when it comes to HTML game development, unlike Lua or Python, that making a recommendation could actually take another article even longer than this one!

 

If you child is interested in working on HTML5 games, it is a good option to persue with the right library.  Two very good options, that provide game functionality and deal with some of the browser lunacy are Phaser and CreateJS, but there are literally hundreds of options.  Both of those libraries are straight forward, well documented and commonly used.

 

Like Python and Lua, HTML5 is not an integrated solution, so you need to provide your own text editor, graphics, etc.  However, pretty much every modern browser has build in tools to make development easier.



 

Stencyl

 

http://www.stencyl.com/

 

Overview:

Stencyl is a visually programmed game creation kit that bills itself as “the quickest and easiest way to make games”, which may actually be true!  In functionality it is very similar to Construct2, you program by drawing out your scene, then adding behaviors visually.  It is an all in one solution with an integrated image editor, although you can always import assets created in external tools.  There is no way to script in Stencyl, although you can create extensions using a programming language called Haxe, if there is functionality you need that is not available in Stencyl.  This however is advanced functionality and is probably beyond your child’s current ability level.  You can however download pre-made extensions from the marketplace.

 

Stencyl runs on Windows, Linux and Mac and by default can only create web (Flash) applications.  The ability to target other platforms like desktop computers (outside their browser), as well as iOS and Android is available for a cost (see below).  While it doesn’t ship with a ton of assets, it does make them very easily available.  In addition the help available online is very good.

 

Screenshot:

Stencyl:

image

Defining Behaviors:

image

Level Editing:

image

Program Flow:

image

Includes or Alternatives:

This is a pretty all in one solution.  Unless you delve into Haxe extension programming, basically everything is here with the initial download, or is linked directly from inside the application.

Costs:

Stencyl is available for free, but limited to applications that run in Flash, either in the integrated player or your browser.  Published games will have a Stencyl splashscreen when they load.

For $99, there is Studio that enables you to target desktop computers outside of the Flash player.  The splashscreen is removed in this version.

For $199, you gain the ability to target iOS and Android.

Books:

     

Comments:

None



 

Lego Mindstorm

 

http://www.lego.com/en-us/mindstorms

 

Overview:

Right off the top let me just say, this stuff is expensive Name Your Link'>Name Your Link'>really expensive.  However if your child shows an interest in robotics or is an avid Lego fan, this can be a very good introduction to programming.  Mindstorm Lego is basically a simple robot creation kit using lego.  The key part is it ships with a programmable piece that enables you to program your robot’s behavior.  Mindstorm enables a nice progression, your child can start by building in Lego, then start controlling the robot using the desktop or iPad application, then graduate to actually programming logic.

 

Lego Mindstorm enables you to simply control your creations, or program them using the EV3 software, a flow chart like process.  They do however make tools available allowing you to get as low leveled as you want to. 

 

Even though it’s somewhat off topic, I mention Mindstorm because it can be an ideal introduction to more (literally) hands on children to the concepts of programming.  Literally being able to see cause and effect in the real world can be very valuable.

 

Screenshot:

Programming Mindstorm:

mindstormProg

A Mindstorm robot assembled:

LEGO Mindstorm robot

Includes or Alternatives:

N/A

Costs:

Name Your Link'>Name Your Link'>Lots!

Books:

EBooks of the manual ( pdf link ) and teaching guide ( pdf link ) are available online.


Comments:

This is pushing the definition of “game programming”, but certainly is a very tactile introduction to many of the same skills that go into game development.  Also I have to say, had my parents purchased this for me as I child I would have considered nominating them for parent of the year awards.  When my daughter gets a bit older I am certainly buying this, but then, is it for her, or me? :)

 



 

Honourable Mentions

 

All lists must end at some point, and this one is no exception.  The following are other recommendations I have for parents looking to get their kids into game programming, but for whatever reason didn’t make the main list.  If nothing above appeals to you, be sure to check some of these options out.

 

Minecraft Modding

If your kids play games, there is probably a pretty good chance you have already been exposed to Minecraft.  Modding is the act of modifying an existing game and Minecraft happens to be a very popular game to mod.  Modifying an existing game can often be a great way, or at least motivation, for learning programming.  There is a HUGE community of people that mod Minecraft.  The downside is, it’s done in the Java programming language and it certainly isn’t suitable for young children.  If your child is very interested in Minecraft though, this could be a good approach to take.  You can learn more here.

 

GameSalad

http://www.gamesalad.com/

GameSalad is another visual game creation kit in the veins of Stencyl and Construct2 mentioned above.  It has been used to create professional games, there is a free version available as well as paid versions for other targeting other platforms.  I personally have no experience with GameSalad.

 

Codea

twolivesleft.com/Codea/

Codea is an iPad application for creating games on the iPad.  It currently costs $10USD.  It uses the Lua programming language and provides it’s own library for creating games that is very easy to learn.  It comes with code editing tools, debugger and tools to hook up with your computer.  You can later hook it up to a Mac and actually create a game for publishing.  However, typing code on an iPad keyboard is extremely unfun, so a bluetooth keyboard is pretty much essential.  It does however come with tons of examples and is actually a great option for a young developer who has an iPad, especially if that’s all they have.

 

Kodu or Project Spark

http://worlds.kodugamelab.com/browse

or

http://www.projectspark.com/#home

This is a game that is about creating games.  Basically it’s a game you can modify to do just about anything.  Kodu is a visual programming language created by Microsoft.  Project Spark is a modified version of Kodu being released shortly for the XBox One console.  It’s pretty far from normal game programming, but many of the concepts ( and the end result! ) are very similar.

 

Code Combat

http://codecombat.com/

Code combat is an interesting concept.  It’s a web based game where you control your character through programming.  As you progress in the game, it teaches harder concepts.  Basically you learn to program while playing a game.  It was originally created to teach Javascript, but has since added a number of other languages.  I believe it is completely free, so you’ve got nothing to lose by trying.

 

Alice

http://www.alice.org/index.php

Alice is a integrated programming solution designed to teach programming.  In their own words:

Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a freely available teaching tool designed to be a student's first exposure to object-oriented programming. It allows students to learn fundamental programming concepts in the context of creating animated movies and simple video games. In Alice, 3-D objects (e.g., people, animals, and vehicles) populate a virtual world and students create a program to animate the objects.

Alice is maintained by Carnegie Mellon university and is completely free.

 

RPGMAKER

http://www.rpgmakerweb.com/

RPGMaker Ace is a product similar to GameMaker specifically for creating one type of games, Role Playing Games, generally along the Japanese style.  Their tagline is literally “Simple enough for a child; powerful enough for a developer.”  There are some commerically created games available that were written using RPGMaker.  If your child is really in to this style of game, RPGMaker could be a great introduction to game programming.  RPGMaker is $70, although quite often on sale on Steam.  Ironically enough, as I write this, it is on sale for 75% off.

 

 

Conclusion

 

Of course I only scratched the surface of the options available, but I think I got the majority of options in that list.  If you think there is something else I should have put in this document, let me know!  I tried to make this clear to people of all technical levels, but no doubt I’ve made mistakes.  If I lost you somewhere, please let me know and I will try to clarify.  The most important thing to remember, all children are different, so one approach that works for one child may fail with another.  Pick the option above that you think most fits with your child's personality, but if it doesn’t seem to be a good fit, remember there’s a dozen other options!

 

I hope that was useful.  Good luck.

Programming, General, Design, Art , , ,




Programmer Art: A simple Jet blend for generating game sprites and how to use it

12. September 2014

 

Today while putting together this Phaser spritesheet tutorial I found myself needing a series of sprites to create a sprite sheet with.  Downloading samples from the web can be a tedious process, especially when TexturePacker wants individual frames.  Then I remembered the Blend file for my Blender Game Art tutorial was sitting on my dropbox folder, preconfigured to render sprites.  Two seconds letter, presto, the sprites I needed.

 

Then I realized in the entire tutorial series, I didn’t actually published the finished Blend.  Oops.  It dawned on me today that programmers struggling with programmer art might find a Blend file that can spit out a sequence of jet sprites could be of some use, so here is this post.

 

First, here is the blend file.  It’s nothing special, but its already animated and the texture is included in the Blend file.

 

Now, the how to use it part.  Double click the Blend, and assuming you have Blender installed, it will load up preconfigured for you.  Now to render a sequence of frames.

 

The initial window should look like this:

image

 

Now on the right hand side, change the output directory to where you want the files to render:

 

image

 

An absolute path is fine by the way ( aka, C:\TEMP ).  I used c:\temp\sprites\jet

This will result in the files having the name jet in the folder c:\temp\sprite.  It will make it if it doesn’t exist.

 

Now scroll that window up and click the animation button:

image

 

And now open the folder and presto:

image

 

20 Sprites ready for game use!

 

Of course you can play around with the settings and camera to get different angles etc.  For higher resolution images or more frames, change that in the render panel:

 

image

 

 

Hope some of you find this useful the next time you need a sprite animation!

Art




Baking Blender materials to texture to make them usable in a game engine

16. July 2014

 

Or…

How to take a Blender model you downloaded from the web and make it actually usable in your game in 28 easy steps!

 

… granted, the second title doesn’t have the same flow to it, does it?

 

I just had to run through this process and I figured I would share it as it is something that occurs fairly often.  When working with Blender, there are dozens of behavioral textures available that can make for some very nice results quickly.  The only problem is, when you get your asset out of Blender and into your game engine, things suddenly go horribly wrong.  The problem is, those textures only make sense inside of Blender.  Fortunately through the magic of baking, you can easily convert them into a texture map usable in any game engine.

 

Let’s take a look how.

 

First we need a model.  I am using a beautiful new model that was recently added to Blend-Swap.  It’s a free download but you need to register.  Don’t worry, you can use a real email address, they don’t spam, or at least haven't so far.  The model in question looks like this:

 

image

 

Unfortunately when we load it in Blender we quickly learn this model is in no way game ready.  Let’s take a look:

image

 

Ick.  So instead of a single Mesh, we have a dozen individual meshes.  Problem is, we need to unwrap them as a single object, so let’s join them all together.  First let’s get the camera out of the default layer.

 

If you look at the way this particular Blend is setup, there are currently two layers, the second contains the armature, the first contains everything else.

image

 

Lets get the camera out of there.  Select the camera object then hit the M key.  Then select the layer you want to move the camera to, like so:

image

 

Now click the first layer ( bottom left box ) and it should now only contain geometry.

 

We want to join everything together.  Press ‘A’ to select everything in the layer, then hit “Ctrl + J” to join everything into a single set of geometry.  Now it should look something like this:

image

 

Perfect, now we can unwrap our model.  Switch in to EDIT mode

image

 

Press ‘A’ again, until all faces are selected, like so:

image

 

Now we unwrap our model.  Select Mesh->UV Unwrap-> Unwrap ( or Smart UV Project ).

 

Switch your view to UV/Image Editor

image

 

It should look something like this:

image

 

Now create a New Image:

image

 

This image is where we are going to render our texture to.  Here are the settings I used.  Remember, games like Power of 2 textures.

image

 

Ok, now let’s look at the actual render to texture part.  Take a quick look at how the model is currently shaded:

image

 

Frankly none of those are really game engine friendly.  So let’s render all of those materials out to a single texture.  Go to the render tab

image

 

Scroll down and locate Bake.

In the UV Editor window, make sure everything is selected ( using ‘A’.  They should be highlighted in yellow ).  At this point, with your generated image and all the UV’s selected, it should look like:

image

 

 

Now under bake, set the following settings:

image

The key values being Bake Mode = Full Render and Selected to Active checked.  Now click the Bake button.

 

Up in your top part of Blender, you should see a progress bar like so:

image

 

 

Now if you go back to the UV/Image viewer, and select your image RenderedTexture, you should see:

image

 

Cool!

 

Let’s save the result to an external ( game engine friendly ) texture.  Select Image->Save as Image.  Save the image somewhere.  Remember where.

image

 

 

Now lets modify the textures on our model to use only our newly generated texture map.  First in 3D View, switch back to Object Mode from Edit mode.

Then, open the materials tab:

image

 

Select each material and hit the – ( or killswitch engage! ) button.  So it should ultimately look like this:

image

 

Now hit the + button and create a new Material.  Then click the New button.

image

 

The default values for the material should be OK, but depending on your game engine, you may have to enable Face Textures:

image

 

Now click over to the Texture tab.  Click New.

image

 

Drop down the Type box and select Image or Movie.

image

 

Scroll down to the Image section and select Open.  Pick the image you saved earlier.

image

 

Now scroll down to Mapping, drop down Coordinates and select UV.

image

 

Under Map select UVMap.

image

 

Now if you go to the 3D View and set the view mode to Texture:

image

 

TADA!  A game ready model.

 

One word of caution though, if you render this scene in Blender you will get the following result:

image

 

Don’t worry.  That’s just a biproduct of going from Blender materials to texture mapping.  If you want the texture to be seen, you need to add some lights to the scene.  Or change the material so it has an Emit value > 0, so it will provide it’s own light source.

 

With Emit set to .92, here is the result if you render it:

 

image

 

Now, what about it game?

 

Let’s create a simple LibGDX project that loads and displays our exported model:

 

package com.gamefromscratch;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Files.FileType;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.PerspectiveCamera;
import com.badlogic.gdx.graphics.g3d.Environment;
import com.badlogic.gdx.graphics.g3d.Model;
import com.badlogic.gdx.graphics.g3d.ModelBatch;
import com.badlogic.gdx.graphics.g3d.ModelInstance;
import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute;
import com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader;
import com.badlogic.gdx.utils.UBJsonReader;


public class ModelTest implements ApplicationListener {
    private PerspectiveCamera camera;
    private ModelBatch modelBatch;
    private Model model;
    private ModelInstance modelInstance;
    private Environment environment;

    @Override
    public void create() {
        camera = new PerspectiveCamera(
                75,
                Gdx.graphics.getWidth(),
                Gdx.graphics.getHeight());

        camera.position.set(3f,0f,6f);
        camera.lookAt(0f,1f,0f);

        // Near and Far (plane) represent the minimum and maximum ranges of the camera in, um, units
        camera.near = 0.1f;
        camera.far = 300.0f;

        modelBatch = new ModelBatch();

        UBJsonReader jsonReader = new UBJsonReader();
        G3dModelLoader modelLoader = new G3dModelLoader(jsonReader);
        model = modelLoader.loadModel(Gdx.files.getFileHandle("robot.g3db", FileType.Internal));
        modelInstance = new ModelInstance(model);

        environment = new Environment();
        environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.8f, 0.8f, 0.8f, 1.0f));
    }

    @Override
    public void dispose() {
        modelBatch.dispose();
        model.dispose();
    }

    @Override
    public void render() {
        Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
        Gdx.gl.glClearColor(1, 1, 1, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);

        camera.update();

        modelBatch.begin(camera);
        modelBatch.render(modelInstance, environment);
        modelBatch.end();
    }

    @Override
    public void resize(int width, int height) {
    }

    @Override
    public void pause() {
    }

    @Override
    public void resume() {
    }
}

 

And we run it and:

image

 

Wow, a model downloaded randomly from the Internet actually working in the game engine!  How often does that actually happen? ;)

Programming, Art , ,