Category Archives: Thoughts and Opinions

Remaking Cat Cafe

Here’s a little blog about what I’ve learned while working on Cat Cafe. If you do a lot of game programming, then you’re probably familiar with a lot of this stuff. But if like me, you started off by making Flash animations, and are used to making games in the Flash Pro IDE, some of the following features may be new to you.

The advantages of hardware acceleration!

As most of you probably already now, Flash was designed for running small animations in web browsers. It’s traditionally never taken advantage of your GPU (graphic’s card), because you don’t really want to give random Flash apps that much power over your machine. Flash also likes to use vector art to save on filesize. As a result, Flash’s graphics performance is rather crap.

But new versions of Flash introduced the Stage3D API, which lets you take advantage of the GPU, hurray! Still, this feature has to be enabled on whatever website is showing the Flash content, so it won’t work everywhere. On mobile devices, you don’t generally use web apps, and instead you download them to your phone from trusted sources, and when you do that, you give them permission to do whatever they need to do. So getting permission to use the GPU isn’t an issue anymore.

So hardware acceleration means better performance, but you need more permissions, which web-apps don’t usually get.

What is Starling?

The Stage3D API is really hard to use. It’s really low level stuff. Starling is a framework that gives you a layer on top of Stage3D which is much easier to use, and works more like Flash’s normal sprites and display list.

The major difference between working with Starling and working in Flash Pro, is that you gotta do a lot more coding. You can’t just put a bunch of vector graphics down on the stage and then do some motion tweens on them. You have to save your graphics as bitmaps, and create and control them through code. This makes it a lot harder to put together a scene you’ve visualized, but it also gives you a lot more control over the objects in your game.

Advantages of scripted animation?

Well one huge advantage of scripting your tweens instead of doing them in Flash Pro means that they can be either frame-based or time-based. Frame-based tweens are synced with the framerate of your game, while time-based ones are synced to the actual time, meaning that they can have a variable amount of frames in them. This is pretty useful sometimes. In Cat Cafe, it means that the game doesn’t slow down if your phone can’t handle the full framerate of 60fps. It simply runs at the same speed, but at a lower framerate, and doesn’t play differently at all.

A lot of frequently used tweens like “bounce in” or “ease in and then out” can be created by setting one variable, which is a lot less work then setting easing over several keyframes in Flash Pro. You can even create your own preset tweens to reuse later! (I haven’t tried this, but it seems very useful. Would have been very useful in EBF, for death and heal animations, which always use the same color/alpha tweens.)

Another advantage is that it’s usually just plain easier to make changes. If you want to make an animation last longer, or you want to tween an extra property, or you want to run a function when the animation finishes, or whatever… you just have to add or change one variable. Meanwhile in Flash Pro, it can be quite frustrating trying to update many keyframes of animation if you want to change something.

One final advantage, which is quite handy, is that you can easily have tweens “blend” into each other. For example, if your character is doing an “attack” animation, and then he’s interrupted half way through and starts doing a “hurt” animation, the tweens will naturally  move into the new animation. If you animate in Flash Pro, you can’t do this, instead you get an instant animation jump, which sometimes looks quite ugly.

What is DragonBones?

DragonBones is an add-on for Flash Pro, which lets you export animations you make there into a format that is usable by Starling and maybe other frameworks too. Basically, it takes your animation, and converts all of the vector art into a bitmapped spritesheet, and converts your tweens into XML data, which can be parsed by whatever engine or framework that supports it. It actually works well, and supports frame labels and events, and everything that I needed for Cat Cafe. I haven’t tried anything very complicated yet though.

This is cool because it means you don’t have to do frame-by-frame spritesheet animation to take advantage of hardware acceleration! The performance is a bit worse due to the extra processing of the tweens and all that, but it saves memory, and it’s better than having to pre-render every frame of a long animation! Also, it lets you swap out textures/skins, which I do a lot in my games.

The main inconveniences are that I have to export the whole animation every time I want to make a minor change, and that parsing the XML data seems to take some time. But no big deal.

Dragon bones!

Dragon bones!

How has all of this effected Cat Cafe?

Well first off, it’s totally spaghettified my code. Cat Cafe was already more than half finished before I even considered using Starling or DragonBones, so I had to redo quite a large portion of the game. It would have helped to do a bit more research before jumping into a project I guess.

So I had to reprogram a lot of the game, and move a lot of code and assets to different places. The result is the messiest code that I’ve worked on since Bullet Heaven (when I was just learning AS3).

But apart from that, the performance is a lot better! Cat Cafe now easily runs at 60fps and 720p on my Galaxy Note 2. Previously it was only getting around 30fps. There’s also more animation going on now; previously the cats didn’t move once they popped up, but now they breathe and stuff. The game also runs perfectly on my dad’s HTC Sensation. I’ve also been testing it on my old HTC Desire, and it doesn’t run amazing, but it’s perfectly playable, at around 33fps.

The newer phones seem to have gained a larger performance boost from the changes. Maybe that’s because they have much better GPUs or something. Having multiple CPU cores doesn’t help much, because Flash never uses more than one (as far as I know).

I think the performance bottleneck is now at the logic, rather than the graphics rendering. For example, parsing and initializing the Dragon Bones skeletons seems to take significant processing. It’s not very noticeable on my Note 2 (takes maybe a second or less), but on my Desire, it takes around 3 seconds. Luckily, I only need to do that once when the game is loaded.

Anyway, the game runs a lot better now than I ever expected was possible with Flash, and I’m sure the performance could be even better if I was more familiar with Starling and Dragon Bones.

I should also mention that I was too lazy to remake the menus in Starling, so they’re still just normal Flash content. They don’t have much animation, and performance isn’t vital there, so I don’t really think they’re worth the effort of updating. But in future I’ll do things properly from the start and all the way through.

I need more phones!

I need more phones!

What’s next?

Well Cat Cafe is almost finished now. I just need add achievements, polish off a few things, maybe try to improve the performance a bit more, test on some more devices, and then publish it for beta testing.

I’ll release the phone version on the web for some testing and feedback first. This will literally be the phone version, but in your web browser. So it’s going to play a little strangely. I’ll mainly be looking to fix bugs and get suggestions with this release, and I’ll take it down after a few days.

After that I’ll release it on Android, and if things go smoothly, I’ll start looking at iOS shortly afterwards. Porting to iOS should be very easy, the only issue is that I’ll have to buy an iDevice or two, or try to find some people who have some.

And then once all of that is sorted, I’ll release the real web version to promote the mobile versions. Woop.

Starling Tests

When I was in London, a bunch of people recommended that I check out the Starling framework for making Flash games for mobile platforms. I was already slowly looking into it, but after hearing about the massive advantages and relative ease of implementation, I jumped right into it.

Basically, Starling let’s you use Flash’s Stage3D API and hardware acceleration without having to do any low-level programming.
With hardware acceleration, you get much better performance, which is very important for mobiles.

The limitation is that Flash’s traditional motion-tweened animations don’t really port well; it’s better to use sprite-sheet style animation.
That’s fine for Cat Cafe though, because the animations are very simple, and I can port the tweening required quite easily.

Anyway, here’s some of the tests I did:

icon1

Test 1: Stars

icon2

Test 2: Cats

icon3

Test 3: Tweens

 

 

 

 

 

The first test is just a bunch of glowy and transparent objects bouncing around, much like they would in Bullet Heaven.

The second test has a lot more particles and no transparency, which speeds things up a bit.

The final test is just to see what Starling’s built in tweening engine can do. It’s pretty easy to code objects flying around, stretching, rotating and fading. But it would be pretty hard to animate a character with multiple moving parts this way.

All of these tests should run at 60fps on a decent machine. They’re pretty extreme though, and no games that I have planned will need this many objects, not even a potential Bullet Heaven 2. For now I’m just going to use Starling to get Cat Cafe working at 60fps on crappy phones.

Checklists and Trello

Checklists are the most important organizational tool ever.
If you don’t use checklists, you’re not organized, and you should feel bad.

Wikipedia puts it quite well: “A checklist is a type of informational job aid used to reduce failure by compensating for potential limits of human memory and attention. It helps to ensure consistency and completeness in carrying out a task.”

Basically: “Your memory sucks. So make checklists so you can never forget anything.”

Whenever I work on a game, I make lists of features to add, bugs to fix, stats to set, and other things to do. I then work through these, and cross them off when they’re done. I’ve got checklists for items, foes, maps, stats, skills, treasure chests, menus, mechanics, ad locations, bugs, tweaks, user complaints, users to credit, and everything else. I have a look at each item in the list, and either address it, or decide that it’s no longer relevant and get rid of it. Once the list is empty, I move onto the next one. I even sometimes go further and add stuff like the current progress on each task, its priority, or how much time that task is expected to take.

This all makes it very easy to remember what I have to do, and to keep track of how much progress I’ve made. It keeps me focused and motivated.

At first I did this mostly on paper. I literally have piles of notebooks full of just notes and checklists.
I moved on to using notepad and other plain text editors, once paper started going out of fashion for me.

I’m currently using a webapp called Trello for my checklists. It does the job very well, using a sticky-note style interface. You’ve got different “boards” where you attach your lists, which look a lot like sticky notes. You can also include images, links, dates, colors, or whatever else you need.

There’s some pretty cool advantages of using Trello over traditional paper notes:

  • I’ve got the Trello app on my phone as well as on my desktop PC, so I can update my lists from anywhere.
  • Trello archives all of your activity, so you can always go back and find out exactly when you did what.
  • Trello can be used for collaborating! You can share your lists with others for managing projects, and assign different people to tasks.

Here’s what some of my lists currently look like:

trello

As you can see there, checklists aren’t only useful for work! You can put fun things on them too! My favorite use is making a list of in-real-life achievements to work towards. If people can do pointless and repetitive tasks to earn achievements in videogames, why can’t they do the same in real life, where the achievements actually matter?

If you wake up every morning and open up Trello, you’ll quickly remember what work you’re supposed to do today, what activities you’ve got lined up for your free time, and what your long-term goals are.

So yeah, I just wanted to get that out there. Occasionally I get questions like “How do you stay motivated to finish your games?”, and stuff like that. Well, checklists are a big part of the answer.

Mobile Games Research

Hey, so as I mentioned before, I’m planning to start developing mobile games soon. I recently got a Galaxy Note 2 phone, or er, it’s almost big enough to be tablet actually. Anyway, I played a lot of games on it while I was in Sweden.

I’m trying to figure out what sort of games are popular, how controls are implemented on touchscreens, and how developers monetize and market their games. This post is mostly just some notes for myself, which others may find interesting or want to add to.

First of all, here’s a list of games that I played:

They’re all pretty fun and you should check them out. There’s still a lot more that I’ve installed and have yet to play…

Touch Controls

I found that the more simple the controls, the better they worked. A lot of the games literally had one type of input:

  • Rayman, Jetpack Joyride and Whale Trail have “tap the screen anywhere to go up”
  • Sporos, Monster Cube and Pixel Kingdom have “tap objects”
  • Fruit Ninja, Pudding Monsters, Unblock Me and Color Zen have “swipe objects”
  • Happy Jump and Labyrinth have “tilt the device to move”

Games that try to use traditional gamepad controls with onscreen buttons weren’t very fun to play in my opinion. They feel a bit awkward to play without physical buttons to guide your fingers: there’s a lack of physical feedback. Meanwhile, the above listed controls can be combined easily, as tapping, swiping and tilting are very distinct actions.

Lesson: Use simple controls that are native to phones and tablets.

Adding Replay Value

A lot of the same schemes are used in mobile games as in web games, so there’s nothing too surprising here. Most games have achievements, level rankings, upgrades, highscores and the usual stuff.

Something which I found interesting was that a lot of the unlockables don’t even add to the gameplay. There’s stuff like new skins for your character, or wallpapers for your phone, or links to promotional YouTube videos. I guess this is because it’s a more casual market and kids like that sort of stuff? Maybe. I don’t know. Sounds fun to implement though.

I also noticed that a lot of games are updated with new level packs or other content to keep users coming back. Most web games on the other hand don’t usually add new content once they’re finished, unless they’re really popular. This is down to the distribution method I guess: mobile games can easily alert you to new updates, while web games are hosted on a lot of different websites and can’t be updated so conveniently.

Lesson: Add plenty of stuff to unlock, whether it effects gameplay or not. You can also update games.

Monetization Strategies

This is the most important section, for developers anyway. I’ve noticed a lot of different approaches to monetizing mobile games…

  • “Pay for the game” – No free version, just a paid one. Not sure how these games are supposed to gain popularity if users can’t try them out for free. I guess this method relies heavily on good reviews to promote the game (that’s how I found them, anyway).
  • “Try for free, pay for full version” – A single payment that unlocks a “full” version of the game, which usually includes extra levels, or removes ads. Great because the user can get addicted before spending any money, and it usually means there’s no microtransactions (but not always!), which a lot of users don’t like.
  • “Pay to progress faster” – Microtransactions that give in-game currency or other upgrades to reduce the time spent grinding. I’m not a fan of this one because it means you have to make a grindy game. But on the other hand, it means players who don’t want to pay can unlock all of the content for free, but slower.
  • “Pay for more content” – Microtransactions for level packs, new characters, upgrades etc. Good because it lets you keep updating a game and milking dedicated players.
  • “Pay for cheats” – Microtransactions for, er… cheating. Pay to skip a level or to make it easier! Sounds really cheap, but most games have been quite careful with this, and make the cheats available for free too (although only a limited amount of them).
  • “Disable ads” – Usually thrown in as a bonus with any other purchase, but sometimes it stands on it’s own.
  • “Watch ads” – Of course, developers can earn money without taking any from the players. Not particularly profitable from what I’ve heard, but it can be if you have a really popular game. I’ve noticed that ads can usually be removed by disabling your internet connection (I wonder how many players have figured this out…?). Some games give out in-game currency for watching ads, playing the game once every day, and stuff like that.
  • “Get sponsored” – Some games include a lot of branding in exchange for monies from a large sponsor. There’s a Skittles version of Fruit Ninja! I’m not really sure what sort of sponsorships are available yet, but I’ll have a look into those. Kongregate and Armor Games do mobile sponsorships too, though they promote the games rather than receiving promotion from them, and take a cut of your profits. I think.

The best monetization method really depends on the type of game and amount of content you’ve got.

Lesson: There’s a lot of different ways of making money!

Anyway, that’s all for now. I still need to do a lot of research (income and download stats for different games, if I can find those!), but that’s a good start.

EBF4 Post-mortem

So I’ve decided to write this lengthy blog about how much went wrong with Epic Battle Fantasy 4.
I’ll also be doing a talk on the topic at Mochi London in September.

Before I start, I’ll quickly go over what went right:

• The game was very well received by players. After 3 months it’s still the top rated game on Kongregate and Newgrounds, and has a pretty high rating on Armor Games too. It didn’t have a lot of bugs on release, it improves on the previous games, there’s plenty of content in it… it’s just a good game overall, and players like it.

• Premium content sales on Kongregate went quite well, and I suppose that shouldn’t be too surprising since the series is very popular there. I think it’s worth noting that the premium pack doesn’t really add very much content: just a few new skills and equips, and a Newgame+ feature. EBF4 is already a complete experience without it. Many fans just bought it to support the series, which was nice of them.

That’s everything good out of the way, now I’ll go over all the bad stuff…

Sponsorship and Distribution:

I went with a performance-based sponsorship deal for EBF4, the same as I’ve done for my previous games with Kongregate. This means that Kongregate pay me for the traffic that I send to their site through links in the game. Since the games are part of a series, a lot of users visit Kongregate to play the previous games.
This has always worked quite well for me, especially with Adventure Story.

This sort of deal means a game has to get a lot of distribution across the web: a lot of sites have to host it, and a lot of users have to play it on those sites.
EBF4 didn’t distribute very well at all. This may be due to some of the following:

• EBF4 is a big game. It’s not something that you can play for 15 minutes, like is expected from most web games. At 33MB, a lot of users probably won’t even be able to load it in 15 minutes. This probably hurt distribution quite a lot.

• A lot less people are playing games in their browsers, and are playing on their phones instead. This means that many Flash game sites will have reduced traffic.

• Having premium content in the game probably hurt distribution a lot too. A lot of sites probably didn’t want to host the game if it looked like an incomplete version. Telling users on other sites that they can visit Kongregate to buy the premium content will have boosted sales a bit though, so it may not have been a terrible decision overall.

• When I first published the game, I targeted the newest version of Flashplayer, and a few users quickly told me that they couldn’t run the game. I also used the new LZMA compression method for the swf file, which some sites (such as DeviantArt!) apparently don’t support. I reverted to older settings as soon as I realized these were a problem, but they might have also hurt distribution a bit.

Luckily, Kongregate was kind enough to give me a reasonably generous advance payment on the sponsorship deal. I didn’t feel I needed it at the time, but it turned out that EBF4 didn’t even bring in enough traffic to earn that amount. So it turned out being pretty nice.

Armor Games offered me a very good fixed sponsorship deal, but I turned it down. There’s a bunch of different factors to consider, but it might have turned out better for me overall. Oh well, I’ll never know for sure.

Greenlight Planning:

As I mentioned earlier, EBF4 is almost too big to be a browser game. A lot of players would prefer to play it offline, without the various limitations and annoyances that come with browser games. So I felt that trying to get the game up on Steam would be a great plan, especially since it wouldn’t require much work to port it, as Steam supports Flash games.

A Steam release probably was a good idea (I think EBF4 is of high enough quality), but I think I went about it the wrong way, for a few reasons:

• I felt that promoting the game’s Greenlight page during development would put off sponsors of the web version, so I only started after the web version was published. It turns out Kongregate wasn’t bothered by the game being released on Steam, and they wouldn’t have minded if I started the Greenlight campaign much earlier. Oops.

• I also didn’t realize that Greenlight is very accepting of unfinished games. I should have definitively put EBF4 up on Greenlight months earlier.

• I felt that having a free web version of EBF4 would generate interest in the game, which would later translate into Greenlight votes. Well, EBF4 didn’t distribute very well, so that was unhelpful. But more importantly, it turns out that it’s hard to get hyped over an upcoming Steam game that’s already available (mostly) for free. Maybe I should have done what Binding of Isaac and VVVVVV did, which was releasing only a demo of the game online. I didn’t really want to risk that though, since the web version was still pretty profitable, and there was no guarantee that the game would get on Steam anyway.

Currently, EBF4 is collecting votes very slowly. If it does ever get through Greenlight, it’s going to take over a year. I wouldn’t get my hopes up.
I am still considering implementing the extra content that I planned for the Steam version, and instead selling the game on some other service, or selling it myself. We’ll see.

Losing Saved Games:

A massive problem that EBF4 still faces is that saved games are being deleted, either by browsers, computer cleaning tools, or occasionally site updates.
I already knew this could be an issue, but it’s getting worse over the years as browsers are becoming more ready to delete your cookies. And it’s particularly devastating in EBF4, as the game can take as long as 20 hours to finish.

I thought Kongregate’s API would have a cloud saving feature, but it turns out they don’t. I was really planning on them having it. Armor Games’ API has one though, so there’s another reason I could have went with them for sponsorship.

I’m actually surprised that EBF4 manages to hold the spot of highest rated game on Kongregate despite this massive problem.

Data Mining:

So collecting data from everyone who plays your games is pretty cool. I like to track data to find out what sites users are playing my games on, what settings they use, where they die, what items they use, what their highscores are, what languages they speak, and so on. It’s great for balancing game difficulty, or learning who your users are so you can market stuff better.

It turns out that finding a reliable data tracking service is rather difficult though. I used Mochi Analytics for collecting data for Adventure Story, and was quite satisfied with them until their service went down for a few months. I eventually got all the missing data back, so that was awesome. But they no longer do custom data tracking, because developers over-used it and it wasn’t profitable. That should have taught me not to rely too heavily on similar services, but I didn’t take the warning.

For EBF4, I decided to use Playtomic to track data. It all worked well, and their graphs and heatmaps and all that were awesome. But then their service went down without warning or explanation, and I just assumed it would be back up soon. But nope, they went out of business just as EBF4 was being published. I got a bit of data during beta testing, but after that, I’ve got no data on EBF4.

That was a total disaster, and it could have easily been avoided if I used more than one data tracking service. I am mega disappointed.

Translations:

I spent around a month organizing a team of fans and refactoring code to translate EBF4 into Spanish, Portuguese, German and French.
It was an educational experience, but whether or not it was worth doing otherwise is unclear. It was quite time consuming because the game wasn’t originally programmed to support multiple languages.

Since I don’t have any data from Playtomic, I have no way of knowing how many people actually played the game in other languages, and therefor I don’t know if it’s something I should try doing again in the future or not. So that really sucks.

Conclusion:

Anyway, EBF4 still earned me around $60K (so far), so I shouldn’t complain too much. That’s not too bad for 1 year’s work, but it’s not terribly good either.
It’s definitely not enough for me to continue with a series that I’m getting bored of.

I’m taking a break from Flash games now. I don’t know whether I should try to sell an expanded version of EBF4, if sequels to Bullet Heaven and Adventure Story are worth making or not, or if I should finally move on to mobile games and ditch Flash entirely. I’ll worry about that once I get my social life sorted out.