Gamedev book – day 0

book-textbook

I am thrilled to say that today I've started writing my book about game development! Every great (and huge) journey starts with a single step, which probably is the hardest one. This book is one of my new year’s resolutions for 2013.

I've been planning to start this book since the beginning of the year, but university work (and some side projects, such as 1GAM) swamped me with tasks. I knew there was no easy way to start this book, so I reserved 20% of my week to work exclusively on it. My workmate Denio and I made a pact to progress a personal side-project during a specific day of the week. We chose Friday for that and named it "Insane Friday" (sounds much better in Portuguese).

Sharing a common day to work on our projects is great because it helps us focus on the job, even though we are working on completely different things. No matter how much university work we need to overcome during Friday, we must progress with our projects, that's the rule. I know 20% (a single day of the week) is not the perfect amount of time to finish a book, but I need to start with a healthy pace. The idea is to (hopefully) increase that amount over time, but smoothly.

During my first day of work, I did the obvious: planned the content. I brainstormed all the subjects I want to cover, then I wrote them down on a draft summary. Our first Insane Friday just lasted for a couple of hours, so I was not able to make my draft become a real summary, but that's already a start.

I am looking forward to working on my book again. I will blog every week about my progress, so I can keep track of the time and measure how many centuries it will take me to finish this book :D .

AS3-Utils

Sometimes I find myself solving the same problems again and again on several different projects. Definitely there is no need to reinvent the wheel, you just have to use the right tools.

Theses days I found a perfect help on that subject. AS3 utils is a set of useful function that solve common problems such as randomizing or summing the values of an a array. All functions were collected from several open souce projects from the Internet, so there is no unified license.

BulkLoader – managing multiple loadings in AS3

One of the most common tasks in game development is the assets loading process. You have two options: 1) ship your game as a single 45Mb SWF file filled with sweet and compressed-to-the-bones images/sounds or 2) load all those assets separately and on demand.

Sometimes the first option is your best shot, but for casual online games the second one is more suitable. Multiple loadings in AS3 can be a pain, because there are several file types to load (wave, JPG, mp3, GIF, swf, etc) and there is no single way to load them all.

So far my best approach to solve this problem is called BulkLoader, a library for managing multiple loadings with AS3. It is licensed under the MIT License and has amazing features:

  • Connection pooling.
  • Unified interface for different loading types.
  • Unified progress notification.
  • Events for individual items and as groups.
  • Priority
  • Stop and resuming individually as well as in bulk.
  • Cache management.
  • Statistics about loading (latency, speed, average speed).
  • Various kinds on progress indication: ratio (items loaded / items to load), bytes , and weighted percentage.
  • Configurable number of retries.
  • Configurable logging.
  • Various assest types (XML, NetStreams, Swfs, Images, Sound, Text Files)

Design goals:

  • Minimal imports.
  • Few method to learn.
  • Consistent interface, regardless of content type.

BulkLoader gracefully handles progress notification in these use cases:

  • Few connections to open: bytes total can be used instantly.
  • Many connections opened: progress by ratio
  • Many connections opened for data of widely varying sizes: progress by weight.

One of the things I like the most is that this project was created by a Brazilian fellow named Arthur Debert :) . Thanks for this great tool!