// you’re reading...


Now Loading… Loading Bar anti-pattern

Making a decision about using a loading bar animation

A school year has ended, programming projects have been submitted, so it’s time for me to reflect on a common element I keep on seeing in high school quality games – loading bar animations. Some are alright, some are quite artistic, all of them are coded somewhat as follows:

for i: 0 .. 100
end for

Why, why, why would anyone delay users from beginning to enjoy a game, keeping them inside a sleep loop that does nothing but draw a dummy animation? There are two parts to the answer.

Missing the larger picture

With limited programming experience, there are two points of reference when developing a video game for a project – existing video games, and what is taught in class. So unless the latter explicitly enforces the better practices, it is the former examples that act as models to be matched. The “problem” is that most students will never have over 4 Gigabytes of content, and as a result just about everything is loaded nearly real-time. The dummy loop builds up an illusion of something complex going on in the background, which closer matches the limited understanding and serves as somewhat of an ego-booster. “Hey look – it’s pretty!”

Lack of proper re-enforcement

I can only hope that some schools are better than others, but it is my general understanding that most game projects are judged with emphasis on aesthetics, gameplay, presentation… just about everything but the science of computing. I have seen some fairly odd requirements such as “must use for-loops, functions, etc” and even odder “may not use _list of certain functions_”. The evaluation becomes almost entirely subjective.

I think that we would be conveying a very wrong message to the students, when poorly performing applications with a “pretty loading animation” receive a higher grade than similar projects that use algorithms sufficiently more advanced as to not require enough time for the loading message to remain visible.

Read more


  1. Posted by fabiopedrosa | June 20, 2007, 12:27 am

    I would consider have a built in progress bar, even if the data is loaded quickly. Sometimes, uncertainty cames in play (slow computer, slow system, …) and a user-responsive interface is always better. There can always be a “way” where you only display the bar if is taking long.

    I agree, sometimes schools give to much attention to the visual and superficial “features”, instead of focusing on how it was achieved, hot it was taught.

    Reply to comment

  2. Posted by Tony | June 20, 2007, 9:07 am

    It would obviously be well thought of to have a progress bar flash for a quick load, just in case something goes wrong. It’s just that when there is a “loading bar” that loads nothing but a delay – the students have missed the point so badly, it hurts.

    Reply to comment

  3. Posted by Bashar | June 26, 2007, 5:39 am

    Sorry to hear that, I guess your grades didn’t go as it should from what I’m reading.
    I had a similar case with my graduation project when I built the whole thing from scratch and got blamed there are missing functions, while the other group downloaded ready made auction framework and deployed it the night before presentation and got straight A best team!

    I remember saying it to the Dr. “I wasted my time, people who work got low grades, people who didn’t got high grades”. The shock was the Dr. reply
    “I know they got ready made framework, but they customized and made it work to Kuwait environment”!!! What does environment has to do with computer program? It will work no matter where!

    Sadly this is the quality we have over here most of the time. But I couldn’t care less as I learned. I work to improve my self not please my professor.

    Anyways, glad to see a post finally. I was missing your blog :)

    Reply to comment

  4. Posted by Tony | June 27, 2007, 9:43 pm

    @Bashar – oh, my grades are just fine. This is just an observation that I’m making about things I come across in Computer Science education. As you illustrated yourself with your example (thank you for sharing), it’s quite common for priorities to be wrongfully misplaced.

    I am glad to be publishing posts again too! Although it seems that the pace will be slowed down for some time. It’s summer, I’m incredibly involved with my job and I have other projects that require more of my attention. Thank you for commenting though, I will attempt to keep up with occasional posts still.

    Reply to comment

  5. Posted by Bashar | June 29, 2007, 2:49 am

    Glad to hear back from you and your grades. All the best with your summer job.

    Reply to comment

  6. Posted by hthth | July 2, 2007, 9:20 pm

    I’m astonished that anyone would do that, and at the same time very happy that I’ve never come across anyone doing it back here in Iceland.

    The students’ age is relevant though. For young beginners, adding a loading bar could be considered practice (e.g. where to invoke it, when, how). But even then, it’d be hard to justify having a completely pointless bar that only “loads delay”.

    Reply to comment

  7. Posted by McKenzie | July 3, 2007, 10:13 am

    I don’t know Tony, the loading bar thing is not all about marks. I tell kids that I hate loading bars that simply waste my time, and explain that you should only use one if you are actually loading a bunch of information, so the user knows the program didn’t freeze. Even when I tell them that when I mark their project I just comment out their silly loading bar they still leave it in. Kids love loading bars because it makes their project look more professional in their eyes (maybe it impresses their non-CS friends too?) I think its like the way kids love making random green letters that look something like the matrix.

    Reply to comment

  8. Posted by Tony | July 5, 2007, 9:20 am

    @hthth – you’re right, a student’s age does come into play. I think that at a high school level they simply don’t need to justify such pointless “functionality” to themselves.

    @McKenzie – as always, I applaud your exceptional teaching. Perhaps your students leave the “loading bar”s in precisely because they know you will comment them out? Who knows. Dan and I subscribe to the theory of introducing some sort of a penalty for exceptionally bad implementations, although that might be a bit harsh. It’s a gray area between loading a delay and playing “intro animation” by any other name.

    At least they are not drawing randomly sized / positioned / coloured ellipses all over the screen. I think I’ll write another post about that.

    Reply to comment

Post a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>