Gamasutra: The Art & Business of Making Gamesspacer
Suck at Coding, But Make Games Anyway
View All     RSS
August 28, 2014
arrowPress Releases
August 28, 2014
PR Newswire
View All





If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 
Suck at Coding, But Make Games Anyway

December 5, 2012 Article Start Page 1 of 3 Next
 

If you're an artist or designer, you may find that your ability to code seems opposite to your main talents -- I have certainly found this myself! My main passion is game design, but without code, you can't make a game, right? With tools like Unity and Playmaker (a visual scripting system for Unity) this isn't necessarily the case.

After working part time on a couple of games, Zombie Outbreak Simulator and Class 3 Outbreak for a few years with Binary Space's programmer/CTO Saxon Druce, I was looking to add more titles to my game designer belt, but at the same time I wanted to keep things small-scale and achievable.

I had been playing a lot of iOS games while we ported Zombie Outbreak Simulator to iOS, and Tiny Wings in particular had me completely enthralled. From a gamer standpoint, I loved the feeling you got of being in the zone, getting perfect jump after perfect jump. From a business standpoint, I loved that it was essentially one level and extremely simple gameplay, hence quick development time.

After toying with a few ideas for games, I ultimately decided to try a version of Tiny Wings that was first person, in 3D. Using just Unity, I struggled through some basic physics code to get a ball rolling around on its terrain engine (I can hear you laughing) and after a week or so, I was quite happy with the result.

However, being the most hopeless coder of all time, progress was slow and infuriating. Not only was I trying to get my head around 3D physics and vectors, but also Unity itself, AND JavaScript! There are some creatives that can bash out some script without much problem, but I'm not one of them, and to learn this side of game development would set me back arguably years of study and practice, which at the ripe age of 32 I'm not willing to do!

Enter Playmaker

Somehow -- I think while looking through Unity's Asset Store -- I found Playmaker. Playmaker is a visual scripting system / state machine manager, which uses states (which house actions, each a snippet of pre-written code) and transitions to develop a game. A highly simplified example: You can attach a finite state machine, or "FSM", to a character with the states "fighting," "idle," and "walking."

Within each of these states, you can include animation actions, raycasting/shooting actions and movement actions. You transition between each state using events, i.e. within the idle state, you would add an action that waits for a left mouse click. This left mouse click triggers a transition event to the shooting state. Each action in a state is essentially a pre-made piece of code that you can tweak and fit together to create a state machine, and eventually an entire game.


Playmaker's Test Lab example scene, which controls simple opening/closing doors

You can see from the above image how, for the non-technical, these visual state machines are so powerful. When I look at a block of code, I see a wall of text, and try in vain to understand what it does, when it triggers, and what it's doing at any given point. With Playmaker, I can glance at an FSM and see what it does in almost an instant.

I can also see not only what it is doing in real time in the visual editor, but also in the game view, where each object will display which state it is in. I can't tell you how good this is for debugging and just general understanding of what your FSM and the game in general is doing. Add to this things like debug rays, break points, and more, and you get a very clear understanding of what's happening.

Using Playmaker, I've just completed my first (mostly solo) creation, Unknown Orbit, where you can float, jump and fly around a surreal, 3D planetary system as a comet. Part-time, this game has taken me about a year. Full-time, I imagine it would have taken six months, and now that I've learned Unity and Playmaker to a greater level, I think the game could be recreated in a few months if not less.


Unknown Orbit

Here's a quick example of an FSM for Unknown Orbit, where the player picks up snowballs. On the left are the states and transitions that control when we move between states. The middle pane is currently showing the actions inside the "destroy self" action. In this FSM, when the player flies into a snowball and picks it up, an event is broadcast called "Add snow".


The state machine attached to a snowball pickup in Unknown Orbit (click for larger version)

The comet object hears this broadcast via a "global transition", and enters a state that increases the radius of the comet's ice core.


The state machine attached to the ice/snow object in Unknown Orbit (click for larger version)


Article Start Page 1 of 3 Next

Related Jobs

Infinity Ward / Activision
Infinity Ward / Activision — woodland hills, California, United States
[08.28.14]

Build Engineer-Infinity Ward
Cloud Imperium Games
Cloud Imperium Games — Austin, Texas, United States
[08.27.14]

Lead Network Engineer
Cloud Imperium Games
Cloud Imperium Games — Santa Monica, California, United States
[08.27.14]

Animation Programmer
Cloud Imperium Games
Cloud Imperium Games — Austin, Texas, United States
[08.27.14]

Lead Software Engineer






Comments


Brett M
profile image
I would recommend the Antares Universe unity addon too. It has a state machine like Playmaker built in, and it will actually help you learn to program aswell, because it's blocks are 1:1 with the documentation.

http://img507.imageshack.us/img507/4826/tutorialinputball3.png

Playmaker definitely requires programming for anything slightly complex with custom classes, etc.

Nick Harris
profile image
I believe that coding is difficult because it forces the programmer to express their solution in one dimension, even if the problem entails multiple dimensions. Equations with subscripts, superscripts, division bars, etc. are two dimensional constructs on the page, even though they can be represented as functions nested inside one another in accordance with their operational precedence. Matrices are two dimensional. Tables are two dimensional associative pairings of a symbolic key and one or more values of some expected type. Vectors are degenerate 1D Matrices, whilst Matrices are degenerate 2D Tensors. The Finite State Automaton's graph is most comprehensibly expressed two dimensionally. The Halo 3 Forge is four dimensional insofar as you get to define when and where a weapon / vehicle (re)spawns within a 3D map. Its custom game settings will let a group of friends play the game with adapted rulesets that encompass pastiches of Call of Duty, Battlefield (Flag Rally = Conquest Mode, with depleting reserviors of tickets), Left4Dead, Crazy Race Tracks and Silly Obstacle Course challenges. Far Cry 3 allows the terrain itself to be remodelled and pre-fabricated buildings quickly placed and tested for in-game sight lines. Little Big Planet's rich creative toolset and 2.5D simplicity explains its success - proudly celebrating the 7 Millionth user generated level:

http://www.mediamolecule.com/blog/article/littlebigplanet_the_roa
d_to_7_million_levels/

These console "mod tools" aren't successful just because they foster exploratory creation through instant feedback (i.e. no waiting for your experimental changes to compile), but because they spread out the space in which the problem is articulated: usually by providing 1:1 contextual triggers for in-game events. Yet, a degree of indirection supports the construction of mechanisms, traps, and even computers!

http://www.youtube.com/watch?v=ZiRgYBHoAoU

I mention all this as I forsee a convergence between development tools, mod tools and open source. In the future Independent developers should not have the unnecessary burden of having to build and debug a 3D engine from scratch, to handle collisions and a stereo soundscape, they should be able to adapt AI routines written by others and published altruistically as open source, common models of trees and buildings should be done once and made available to all rather than needlessly replicated. If someone makes a virtual Paris for a racing game, some of that work can be reused for a detective game, etc.

Right now there may be two developers at different companies struggling to build two Eiffel towers!

Austin Farmer
profile image
While I agree with most of what your saying I do have 1 issue.

"In the future Independent developers should not have the unnecessary burden of having to build and debug a 3D engine from scratch, to handle collisions and a stereo soundscape, they should be able to adapt AI routines written by others and published altruistically as open source, common models of trees and buildings should be done once and made available to all rather than needlessly replicated. If someone makes a virtual Paris for a racing game, some of that work can be reused for a detective game, etc"

The problem for this is most game assets are custom made for that game or even that specific level. How would you like to be playing GTA5 and see the same gun from Fallout New Vegas, while this might be cute to some, I personally would feel like they were shorting me a gun model. And the 2 different developers could just buy an eiffel tower model if they were that terrible at modelling.

Richard Matey
profile image
Using Playmaker close to a year, I can indeed say that Playmaker is a gateway drug for artists / designers to get more involved in the logic side of game creation. Since then I have learned Javascript and can now see where the coding learning curve runs right brain focused people right into a wall. Mostly terminology, remembering all functions and how to use that can be so tedious and cumbersome, that from start to actual playable is so unreachable or discouraging that it turns people away. While Playmaker makes terminology easy and logical like "create object" instead of "instiante", then it makes it very clear what you can do with those functions and easy helpers in clear view. I think this is the break through for me and Playmaker is nice because it is not just paint by numbers and can scale to having some fairly complex machines.

Love Playmaker and hope to see more systems expand on this idea.

Ozzie Smith
profile image
This was a pretty inspiring read, thanks! I too am a designer that is not very good at coding. I will definitely be checking out Playmaker because of this article. Thanks!

Daniel Campbell
profile image
I'll have to check this out for sure. I've been working on design for a long while now but programming is something that I just can't seem to wrap my head around. This looks like a good happy medium. Thanks for the write up!

Lauren White
profile image
Thanks for the inspiring article. Coming from a psych research background, it's great knowing that it's possible to make something awesome without a coding background.

Ramon Carroll
profile image
Great article, Jay. Thank you very much for sharing this. I love Unity, but was not aware of Playmaker. Do you know how stable it is with Unity 4, and if there are any alternative tools/plugins like it?

Chris Hendricks
profile image
Playmaker, Antares, and uScript all come quite highly recommended, and are all available on the Unity Asset Store. I don't know how stable any of them are with Unity 4, but given their collective userbase, I'm sure they've been hard at work at it.

I'm glad for things like this, because it provides a nice bridge for artists who know the logic of what they want done, but don't know the language the program "speaks" to make it happen.

Michael Mullins
profile image
Ha! How about the opposite? :) I keep meaning to take up sketching and human anatomy, but all these science-y things keep interjecting.

As a more serious encouragement:

The key thing I've learned being an english nerd turned engineer, curiosity, perseverance, and a measure of pure bloody-mindedness are the three greatest traits to cultivate in making the leap to any STEM-like discipline. They turn a person's thoughts from "that... is too much for me" to "I can almost pretend I understand it" to "I think I got it" to "Old hat old bean". Keep at it and be grateful for the kindness of teachers, friends, and mentors.

Michael Mullins
profile image
I should clarify. I mean encouragement to not just let tools like Playmaker be the end of things for you. Be curious. Try stuff. Learn something and then learn something else.

[User Banned]
profile image
This user violated Gamasutra’s Comment Guidelines and has been banned.

Will Corona
profile image
The layout of coding looks very much like, if not entirely like, Unreal Engine's coding system.

Remy Trolong
profile image
Great article! I'm still on my "journey" to release my first solo game with Unity, so this is full of hope and good advices. I'll give a look at Playmaker, and also Unknow Orbit :)
Keep it up and many thanks for sharing!

Rusty Johnson
profile image
Great article and motivating!

Daniel Hayes
profile image
Thanks for the great article, I just started using Unity this month and I am excited to try Playmaker out!

Steve Cawood
profile image
I use Playmaker all the time now, occasional coding my own simple actions. I can now actually concentrate on the logic of what I want my game to do instead of wondering how I program it.

David Konkol
profile image
Now if there was something like this for easily making 3d models, adding bones and animating them.

Jeremie Sinic
profile image
This is very inspiring. I have been thinking about getting into coding for a while now, but never really did. This article has convinced me there is no reason left for me not to try. Thanks!

Eric Schwarz
profile image
Hmm.

I learned flow graph scripting in engines like CryEngine and Unreal before I ever did anything in actual scripting. Now that I have a fairly good grasp of scripting using C++ (and could probably move to other syntax fairly easily), I wonder if this would be a good way to make the leap from scripting to actual coding.

The only thing is that I feel that the game engine should already handle so much of the coding side of things already. The wonderful thing about using an engine like Unreal is that, for the types of games it's built for, you can literally get started making a game in it with almost no tweaking necessary (and usually it's to the small stuff, like camera distance from the character, UI placement, etc.). If you are at a point where you have to program the physics yourself from scratch, I feel that's already a problem for game production.

While custom tweaks to an engine are always going to be needed for certain games of course, and any engine should let you edit just about anything, I do think that the idea of a "game kit, just add content" is probably a better route if you have a specific genre in mind. I'd love to see the same thing for, say, RPGs, RTS games, and that sort of thing in addition to just shooters.

Austin Farmer
profile image
I agree with Eric. It seems like most engines these days are tailored for shooters or 2d games. I would like to see some more suited for other kinds of games.

Jashan Chittesh
profile image
Actually, Unity is a general purpose and yet easy to use engine. It makes no assumptions on the kind of game you're making ... except it being a 3D game. So, due to the concepts used, 2D games aren't supported that well - but still there's a lot of 2D games done in Unity, and packages on the Asset Store which are designed specifically for creating 2D games (so they kind of add what Unity is missing on that end).

I haven't looked into ShiVa but I guess that's another "general purpose" engine. If I liked coding in LUA, I'd probably try ShiVa ... but since I prefer coding in C# and am very happy with Unity, I don't look much further ;-)

William Bell
profile image
Great article! I'm somewhat the opposite - I'm a programmer with minimal artistic skills (which I am slowly improving.)

I still enjoy using PlayMaker because as you mentioned, it's visual coding, and designing around states really helps to keep things organized, manageable, and understandable at a glance.


As far as for teaching myself Unity and PlayMaker, I found it very helpful to port a couple of the 2D games created in the "The GameMaker's Apprentice" book (for the GameMaker engine) to Unity & PlayMaker!


The 2D art assets were already created on the book's CD, so it was then just a matter of learning how to create the sprites, collision objects and physics back in Unity and getting PlayMaker to mimic GameMaker's code blocks - in some cases I even created custom PlayMaker objects to more closely match the functionality of GameMaker.

Turned out the be a great way for me to learn PlayMaker and Unity.

Seeing how easily I was able to port the GameMaker games to Unity made me appreciate the power of using Unity & PlayMaker together - what a powerful combination!

Jashan Chittesh
profile image
I thought it might be interesting for people using PlayMaker that ScoreFlash (basically "Scrolling Combat Text on Steroids") also has PlayMaker actions. I've just uploaded a video showing how to use ScoreFlash with PlayMaker- http://www.youtube.com/watch?v=sFsUokJ5dTs

Let me know what you think!

Jacob Merrill
profile image
I have used logic to code a hunting/ path finding AI

My logic bricks are undeniable
Blender wins again
http://www.youtube.com/watch?v=H3lEgMqm1eg

Jacob Merrill
profile image
I have used logic to code a hunting/ path finding AI

My logic bricks are undeniable
Blender wins again
http://www.youtube.com/watch?v=H3lEgMqm1eg

Michael Graham
profile image
While I started visual scripting with Playmaker I've since made the move to another visual scripting tool for Unity called uScript.
I find it a lot easier to debug but if any of you are interested in seeing it in action below is a link to a demo video that I made for people who are doing tutorials in uScript that I'm running out of Sydney.
http://www.youtube.com/watch?v=Pp-LI7wvRWo
As you can see it is very similar to UDK's Kismet, but I've found just as flexible as Playmaker and again, a lot easier to debug.


none
 
Comment: