ION08: Game Frameworks for Rapid Prototyping and Empowering Designers

Robert Mitchell, Sony Online Entertainment

Summary

Interesting to see what they’re doing, we’ve been looking at a lot of similar stuff recently. If I were in their position I’d want to try hacking the IDE to make it integrate with their build system directly – the speaker said that highly integrated build systems are a must for this stuff, but that doing everything inside the IDE with no external clicks or actions (like a “check in to perforce” action) was also essential. You can’t do both 100% without modifying the IDE; I’ve done that before for stuff we did for PXC, and it works like a dream, ONCE you’ve got it working ;).

I’m not sure I really captured the details of what was said, I found it quite hard to follow at times exactly what points were being made. I think the lecture would have been more fun if he’d left out the whole idea of trying to write a game during it – I’d have trusted him that he could do it if he’d merely said so. It’s pretty obvious from the concrete parts of the lecture that they’ve got together enough of a framework – and, more importantly, enough of the required mental attitude to prototyping – that they could feasibly do this quite easily.

I suggest you pay particular attention to the point that a lot of stuff that in reality is hard becomes easy if you remember you’re going to throw away everything you make – e.g. leaderboards and anything data-based like achievements are really really easy to add if you don’t bother to think about scalability issues ;). Obvious point, but worth remembering.

My own commentary in [ square brackets ], any mistakes/misunderstandings my own fault :).

Empower designers

This is the Secret Sauce. Get your designers writing code early, during prototyping, so that by the time you hit full production they actually are competent.

Writing script is writing code; treat it exactly the same: use code control, do code reviews, everything. So, it’s too much for designers, get them to change only simple code, not to write stuff from scratch.

With Free Realms, we gave all the designers Flash, and nothing happened for the first few weeks. This was all new to them, takes time for them to learn.

They did lots of googling, as that’s what designers are used to. They ended up learning how to do basic re-creations of Tetris etc because that’s what was easy to find.

You need to give them a bit more direction, and although you leave them to it, you don’t just abandon them to work out everything.

Using Flash as the Framework worked well as a start, because of all the stuff that Flash provides out of the box.

Timers, Events, core Game-Loop – don’t get the designers to do this. Figure out what you’re going to need in the Framework – easiest way is to build 3 games in a row, first with no framework, then refactor some stuff into an FW before doing number 2, then more before number 3.

If you go to a Flash audience and say I want my logic on the server, then they look at you funny. But I think they’re starting to accept that this is the right way to go, and that it’s necessary. It was part of our absolute requirements.

We included “production capable” in our initial requirements, even though you should use your prototype only for prototyping.

For prototyping, we have one SWF that includes both client and server code.

For production, there’s a split between client and server – client has scaleform to do GUI easily, server has just the game logic running – would love to do it in actionscript, but expect to have to rewrite in C++ after prototyping compelte, or write a flash -> C++ compiler.

For testing (working with external outsourcers etc), we used Smart Fox. It’s great, but the version of Flash is version 1 Flash, doesn’t support most stuff – you need to use Java on the server if you want to use SF right now.

Framework contents now

[ADAM: obvious stuff like Event queues, keypresses, sound, etc]

We do mostly level based-games, so we have a part just for doing level management, may later add a “turn” part.

A bunch of Network-related pieces, including stuff to simulate network delay, packet drops, etc.

Making a game from scratch during this lecture

Now going to build a game in the remainder of this talk. First we’ll look at some basic levels premade.

1: find hidden object game, with basic popover dialogs, cliks, timers, reset score and status, sprite rendering.

The interesting test is can I actually run this via a server?

[ADAM: using perl for the server at this stage]

[ADAM: showed same game but with the code split between running in a “server” app and a “client” app – just run both of them side by side on same machine.]

2: Simon

[ADAM: standard Simon says, just adding a couple of sound playbacks now and simple sprite animation]

3: Wack-a-mole

[ADAM: added custom cursor, and graphics embedded in the dialogs with a basic layout engine by the looks of things]

[ADAM: added more standard game features, like powerups, and randomized traget enemies, with status per-enemy (ones that need multiple hits to kill). Also added achieements for simple things in the game]

4: the miner game in FR demo presentation

[ADAM: showed it and played it manually]

[ADAM: 1.7Mb SWF with 0.5Mb sound file too by the looks of things in window explorer]

[ADAM the same basic dialog from the other games – 5 second countdown timer is the whole game, with the same basic scores display on screen etc.

Rule of thumb: don’t put code in you FLA file, because it stops you doing revision control etc.

I’m down to 3 minutes, and I still want to fulfil my promise, so you’ll have to visit me after the talk, because I think 3 minutes is going to be a bit too optimistic even for me!

Q: we’re working on client/server flash model. Have you tried the opensource AS9 compiler from Adobe

Our requirements are CS2, not CS3.

The server side to us is the easy side, since we’re an MMO company. That’s where we as a company are likely to add most of our value, because that’s our big strength, that’s where the really hard problems are.

I’m not sure that even fi I could now, I’d run AS on our server. We run Lua and Java, so it’s not much of a stretch to run compiled AS.

C++ is the better choice for us for server code, we want to do distributed network backend for it, etc.

Mostly, I can write compilers to convert AS into java, C++, etc.

Q: have you tried XP by putting a designer with a programmer?

Most of our studios are using Scrum, so in practice yes, because of the mixed-ability teams used commonly in scrums.

Ideally, yes I would do that, the wasted programmer time will go down as the designer comes up to speed. But currently I’d put a junior programmer on fixing the code.

Q: You mentioned you had support for achievements?

Leaderboards and stuff is really easy stuff to do. Once you have the data it’s easy to do [adam NOW AY!]. Well, it’s a prototype, so with a prototype, it really is easy to do!

ADAM Q: did you think of sending designers on training courses?

Hard to find CS2 courses.

I’d rather have them focus on game design than on becoming competent junior programmers.

Q: [ADAM] why did you add framework libraries for simulating network problems like latency and packet dropping – why not do this with standard on the wire tools?

Because we’re running the client + server code on one machine, so there is no server, it’s much faster compile/test/debug to run it locally on that one machine just using a pair of SWFs.

(Q2: if you could easily have servers for each team, with 1-click deploy of the server SWFs (e.g. window networking, drag/drop each new saved SWF to the server), would you do that?)

No, because I want zero-clicks, not 1-click.

You want to keep the designers entirely in the IDE (Flash) at all times, rather than having to remember to go outside of it and do additional tasks. Remember, the aim here is to take all obstacles away from rapid iteration of finding out what is fun and not fun, not iteration of creating production code.