Categories
Personal Development

The First 20 Hours of Learning

Early in the life of this blog, I wrote about practice and talent. In it, I mention the now very commonly known idea that it takes 10,000 hours of deliberate practice to become an expert in something.

In the years since, I was part of the Thousander Club, which was started by Scott Hsu-Storaker after he read that post. The idea was to practice some skill for 1,000 hours in a year, which meant practicing roughly 3 hours a day. With a day job and a vague skill, I fell woefully short over the years, but it was a good experience to track just how much time I was spending on something that I thought was important enough to learn.

Still, 3 hours a day is a lot of time for people, especially people who are new parents or otherwise have a lot of demands. It’s easy to feel spread thin.

Plus, you don’t necessarily want to be an expert in something. You might just want to learn enough to have fun. Playing guitar, skillfully playing StarCraft, and drawing realistic portraits? You can learn any of these things enough to enjoy it, and maybe that’s enough. You aren’t necessarily interested in joining a band as lead guitarist. You may just want to be able to play love songs to your significant other without them sounding terrible.

Josh Kaufman, who wrote The Personal MBA, also wrote The First 20 Hours: How to Learn Anything…Fast!.

In this Tedx talk from last year, Kaufman says his research tells us that to learn something, it takes 20 hours to get past the fear of feeling incompetent.

Merely doing something for 20 hours isn’t enough. It’s like the idea that practice doesn’t make perfect. Perfect practice makes perfect. You have to do it in a deliberate way to learn in an accelerated manner.

There is a method. He says that there are four steps:

  1. Deconstruct the skill. What do you actually want? Practice those first.
  2. Learn enough to self-correct. Don’t procrastinate by reading books or websites. Get to the point where you can practice.
  3. Remove barriers and distractions to practice.
  4. Practice at least 20 hours.

Last month, I dedicated myself to learning Android app development, and to start, I thought I’d pull up the Android Developer resource, but it was quickly clear to me that the docs were not updated along with the tools. It was like the instructions said, “To learn how to drive a car, first put your key in the ignition, then…draft behind the pole position before overtaking” with no mention of the basics of how to accelerate or brake. I don’t know if there was an expectation that I knew how to load specific resources in Eclipse considering I just learned that loading resources was a thing, but that’s how it felt. The Getting Started pages seem to have gaps if you treat them as a tutorial.

So I found Programming Mobile Applications for Android Handheld Systems on Coursera. Rather than take the actual course, I watched the videos. Partway through, I knew enough about what Android apps could do to be dangerous, but I watched all the way through the videos before allowing myself to do much development myself.

While I am glad the course is offered and that I could get this insight, I could have started practicing earlier. You don’t learn from watching videos. You learn from doing. By not taking action, and deluding myself that I was still learning, I was merely procrastinating.

It’s daunting to start something new. I already know how to make games for GNU/Linux, and yet Android seemed to be a different beast altogether. How long was I going to have to go through the steps of learning everything I needed to learn before I was capable of delivering games to Android users?

The good news is that I am not starting from scratch. I already know how to do so software development fairly well (hey, Self from 2006! You did good in practicing all these years!). Also, Android development is less about learning how to program and more about understanding what capabilities are available and what deployment procedures there are.

But once I started applying what I supposedly learned, then I was really learning. And once you get past that initial frustration with how ignorant you are, once you get a little confidence in your abilities, you can start enjoying the process.

Categories
Geek / Technical

Is There Creativity in Programming?

Binary

A colleague of mine was complaining about pair programming. He said one of the problems was that it restricted his coding creativity when he had to argue or discuss what he wants to do with someone else.

I was reminded of a forum post I made many years ago in which I similarly said something about creativity in code. Someone replied and said something to the effect of, “No, software development is engineering, not creativity.”

I have since thought about that response often, and it made an impression on me.

So I told my colleague that if you’re being creative while programming, it probably means you don’t know enough or have enough experience to know what to do.

An example I gave to him was some work we had done together in the past. We created a set of classes to handle filtering some data based on some criteria. We had come up with some very good work here. It was test-driven, very clean, and worked well. We spent about a week on it.

It was a creative solution.

But only because it wasn’t until months later that someone pointed out that what we had implemented was already provided by the 3rd party framework most of our software was based on.

Had we known that there was an existing solution, there would be no need for creativity. We would have simply solved the problem and moved on.

On the other hand, we’ve learned that incremental development results in better software. Rather than do the waterfall approach of big design up front, we implement a working piece of value, then build on it.

Often, the process of building the software is the way we learn how to build it. Coding, then, isn’t merely a matter of giving form to requirements, but a way of exploring the problem space. Write some test code, see what happens, and gain a more accurate understanding of what you’re making. Rinse, and repeat.

Software is malleable and allows such experimentation. The end result is a working program to run. We have created.

But can we call it creativity?

Many years ago, I was creating the best RPG ever! a walking demo of an RPG. I wanted the ability to talk to villagers and have conversations instead of merely receiving a single canned message.

I wrote a bunch of logic to load messages, identify if there were branches based on certain things being available such as a quest item, and even provided a way to choose options as replies. You could buy and sell things, which allowed you to change your inventory and your money supply. Inspired by Final Fantasy III‘s thief town, you could even lose money just by talking to certain characters.

I was very proud of the system I came up with and put together in QBasic. I came up with a very creative solution, I thought. It wasn’t until years later that I realized I basically reinvented what’s called a scripting engine.

Had I known about the scripting engine concept, I probably would have realized that it was exactly what I needed. Instead, I stumbled into it over many days of hacking together something that did more and more as I thought of it.

Then again, even if I know the concept, isn’t there some creativity in the specific implementation? Or am I mixing up the roles of the programmer and the game designer here?

If I write some code to calculate mortgage interest for a bank and realize that a side-effect of my effort is that it is easier to get data for some strategic analysis, that’s not programming creativity so much as business insight. Similarly, realizing that I could add another cool feature to the scripting engine is more about adding to my game design capability than about being creative with code. The code was just the way I expressed the creativity of game design, and so therefore incidental to it.

One of the things I believe is that being cute with programming means more headaches than it is worth. There’s a bug in your OS you can exploit to accomplish some data manipulation faster? Great, until it is patched. Best to stick with documented features and not trust that what happens to work today is what is right.

Similarly, writing “creative” code seems like a recipe for disaster. How clear can your code be if you’re being creative when you write it? You want to be creative? Experiment with code katas. Hack away for fun on a side project. Join the The International Obfuscated C Code Contest. But I don’t think “creative” code belongs in released production.

I think creativity in code is just another way of saying, “I’m guessing that this might work. Let’s see what happens.” It’s like throwing things into a fire and observing the results. It’s not creativity so much as experimentation.

When I learned about design patterns, entire concepts were made clearer to me, and my programming capability improved. I didn’t have to be as creative to write code to solve a problem or accomplish a task. If I’m ever trying to be creative while writing code, I think it says more about my lack of knowledge in the area than with the nature of programming.

What do you think? Is there creativity in programming?

(Photo: http://www.flickr.com/photos/chrisjrn/8058863952/ | CC BY-SA 2.0)

Categories
Geek / Technical

Converting from UnitTest++ to Google Test

Converting UnitTest++ To Google Test

In 2008, I wrote Test-Driven Game Development, which was more about being reintroduced to Test-Driven Development (TDD) and asking if other game developers use it regularly.

Around the time, Noel Llopis had written a survey of C++ unit test frameworks, and eventually co-wrote UnitTest++ as none of the existing frameworks were sufficient for his needs.

I’ve used it ever since.

At my day job, I’ve been introduced to Google Test. It’s so much more full-featured, and paired with Google Mock, it means I don’t need to handroll my own mocks and fakes.

Since UnitTest++ isn’t actively maintained anymore, and Google Test does so much more, I’m switching my development to it.

I do my development on a Linux-based system. I use CMake to manage my builds which allows me to produce a game and port it to Windows easily.

It took me an hour to switch a project over to Google Test. Actually, it took mere minutes to change the code:

TEST_FIXTURE(ParticleFixture, ParticleInitializedWithPositionAndImpulse)
{
CHECK(particle.isAlive());
CHECK(initializedPosition == particle.position);
CHECK(impulse == particle.velocity);
CHECK_EQUAL(maxLifeTime, particle.lifeTime);
CHECK_EQUAL(maxLifeTime, particle.maxLifeTime);
}

turned into:

TEST_F(ParticleFixture, ParticleInitializedWithPositionAndImpulse)
{
EXPECT_TRUE(particle.isAlive());
EXPECT_TRUE(initializedPosition == particle.position);
EXPECT_TRUE(impulse == particle.velocity);
EXPECT_EQ(maxLifeTime, particle.lifeTime);
EXPECT_EQ(maxLifeTime, particle.maxLifeTime);
}

What took longer was figuring out how to add Google Test to my project’s structure.

With UnitTest++, I built it once and had a copy that all of my projects could leverage.

Google Test started out allowing you to “make install”, but citing C++’s
One-Definition Rule, the developers say:

we recommend to avoid installing pre-compiled Google Test libraries. Instead, each project should compile Google Test itself such that it can be sure that the same flags are used for both Google Test and the tests.

I spent quite a bit of time seeing if there was an example of how to do it, but build configurations are based on the needs of individual projects and I suppose it is hard to make such recommendations. So I had to figure out how to write the CMake file, and that’s always a painful process of figuring out what abstract implementation detail is provided by CMake to do the specific work you want.

So here’s my solution.

First, I added the gtest-1.7.0 directory to my project’s test directory. I suppose I could take steps to make this more generic and allow for upgrades without requiring me to change more than necessary, but it works, and it can be tweaked.

Second, I changed my CMakeLists.txt file.

INCLUDE_DIRECTORIES (${BUILD_ENV_LIB}/UnitTest++/src/ ${PROJECT_SOURCE_DIR}/source/game ${PROJECT_BINARY_DIR}/source/game ${PROJECT_SOURCE_DIR}/source/tests/Mocks)
ADD_EXECUTABLE (Test${GB_PROJECT_NAME}-bin ${TEST_SOURCES})
TARGET_LINK_LIBRARIES (Test${GB_PROJECT_NAME}-bin ${GB_PROJECT_NAME}-lib ${BUILD_ENV_LIB}/UnitTest++/libUnitTest++.a) # ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY})
# Run the test executable.
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/RunTest.sh ${PROJECT_BINARY_DIR})
EXECUTE_PROCESS(COMMAND chmod +x ${PROJECT_BINARY_DIR}/RunTest.sh)
ADD_CUSTOM_COMMAND(TARGET Test${GB_PROJECT_NAME}-bin POST_BUILD COMMAND ${PROJECT_BINARY_DIR}/RunTest.sh ARGS ${PROJECT_BINARY_DIR}/Test${GB_PROJECT_NAME}-bin VERBATIM)

became


ADD_SUBDIRECTORY (gtest-1.7.0)
enable_testing()
INCLUDE_DIRECTORIES (${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/source/game ${PROJECT_BINARY_DIR}/source/game ${PROJECT_SOURCE_DIR}/source/tests/Mocks)
TARGET_LINK_LIBRARIES (Test${GB_PROJECT_NAME}-bin ${GB_PROJECT_NAME}-lib gtest gtest_main) # ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY})
ADD_TEST( Test${GB_PROJECT_NAME}-bin Test${GB_PROJECT_NAME}-bin )
ADD_CUSTOM_COMMAND(TARGET Test${GB_PROJECT_NAME}-bin POST_BUILD COMMAND ${PROJECT_BINARY_DIR}/Test${GB_PROJECT_NAME}-bin)

I used to have my own script run the tests because UnitTest++ didn’t do color-coding. I wanted to see red on failure and green on success. Binaries created using Google Test has red-green colors built-in so I could get rid of my RunTest.sh script.

I’ll be honest, though, I’m not sure what ADD_TEST() is providing. I kept seeing it recommended in the blog posts I could find out there, but as far as I can tell, no one says “I want to run my Google Test tests immediately after a build”.

Supposedly it adds a “test” target to your Makefile, but it seems to be broken. Hence, the ADD_CUSTOM_COMMAND() to actually run the command. I wish the official Google documents would say, “If you want to run your tests as part of the build instead of having to explicitly ask for it, do this.” Instead, I had to cobble together bits and pieces of information from a variety of sources.

So I hope this post helps you if you’re trying to integrate Google Test into your project. And if you see anything I’m doing that can be improved upon, please let me know. It seems project structure and CMake is a dark art to me, and I’m sure there is some workflow improvement I’m missing out on.

Categories
Game Design Games Marketing/Business

A Shameful Game Backlog, or a Glorious Library?

Last week, cliffski once again went on the offensive against the trend of selling games at deeply discounted prices. In We Need to Talk About Unplayed Games, he argued that the constant sales of games results in bad news for everyone.

People buy games based on almost nothing but a screenshot and a low price in an almost Pavlovian response to the announcement of a deep discount. They don’t even play the games, which sit on hard drives and rarely get considered. In fact, some people buy the games over and over again simply because they are in bundles with other games or they forgot that they already purchased them.

The results? Players Game buyers don’t value quality, the organizers of sales become gatekeepers, and the games themselves are devalued. If developers optimize for results, what role does game development have? Most players won’t see even a small percentage of the actual game, so why focus there? It’s similar to the concerns about narrative in games: if people don’t finish them and never see the story play out to completion, then why invest so much on game writing and elaborate plots in the first place?

It becomes less about the games themselves. People buy into the deep discount, no matter what is being offered, and for what? A backlog of games they ignore? That’s terrible!

Or is it? Ben Kuchera thinks otherwise in Your stack of shame is a lantern for your future, and a gift to the industry:

We respect people with large libraries of books, but we tend to look down on people with shelves and shelves of games.

Oof. When you put it that way, yeah. I suppose when I look at my shelves, I see books I haven’t read yet, as well as games that I obtained partially because they weren’t at full price. I have a copy of Civilization III still in shrink wrap when I found it at the store for only $15. Two incarnations of the series have since been released. I also have a number of Neal Stephenson books that are waiting for me to read them.

Kuchera’s argues that even if you don’t play the games now, what you are doing is sending a message to the developers and the industry about what kinds of games you want to support.

On the topic of sales, both cliffski and Kuchera agree. They work. To illustrate, I was at a party recently talking about these posts (I’m a pretty wild and crazy guy!), and a colleague told me that you don’t have to look further than JCPenny to see what happens when you buck the trend there.

In early 2012, JCPenny changed its pricing strategy. Instead of markups and sales, there would be “every day” prices.

Late last year, the company announced it was reversing the decision, citing dismal sales figures.

So, JCPenny discovers the hard way that despite the logic that a low price is a low price, there is some psychology to a sale price, to the idea of getting a bargain. Now we get to benefit from that information.

But Kuchera says the biggest benefit is that increasing your catalog of games is good for you.

Maybe you’re not ready for the pace of a game like Gone Home today, but you can never tell when the game will satisfy an itch you don’t know you had. Buying games on sale allows us to browse our own selections, be surprised at something we had forgotten we had bought, and find that finally, we’re ready for that game.

I can relate. When I was a child and had no way to earn money but a weekly allowance, I would save my money for months in order to go to Toys R Us and browse the game selection. One time, I picked up Wizardry: Proving Grounds of the Mad Overlord. I might have been 10 years old at the time. I had no idea what the game was, but the back of the box had illustrations of dragons, knights, and skeletons. COOL!

I tried to play it, but I couldn’t figure it out. I mean, I understood the mechanics of walking around the first-person maze, entering selections to fight, and casting spells. But I had no idea what I was doing. I would fight incredibly tough enemies and have a total party kill before I knew what happened. It was too much, and the game wasn’t what I expected at all.

It was a few years later when I pulled it out of my collection of games to try it out again, and my more mature self was able to grok it way better. Oh, I have to map out the maze I’m exploring! I need to make sure that I gain experience and skills and purchase good equipment before venturing too far into it. It all clicked. It all made sense. I wasn’t ready to play the game when I bought it, but I’m glad I did all those years ago because the Wizardry series became one of my favorites.

I appreciate what cliffski is concerned about. It would be nice if when a new piece of entertainment is released that everyone played it together. Around 10 years ago, I bought Total Annihilation and Homeworld: Cataclysm due to the recommendations of a friend, both times years after the games had come out. Cavedog’s Boneyards and Sierra’s WON.net were mostly empty before eventually being shutdown entirely, but I was told that they used to be filled with active gamers ready for your challenge. Had I bought the games on release, I might have experienced it, but as I was late to the party, I missed out.

It’s captured perfectly in this xkcd comic.

The alt-text: “I remember trying to log in to the original Command and Conquer servers a year or two back and feeling like I was knocking on the boarded-up gates of a ghost town.”

Similarly, the Steve Jobs biography that was all the rage a couple of years ago? The local library had a high double-digit long waiting list. I never ended up reading it, although I still want to. But when I do finally get to read it, it would have been years after the book was topical. Am I similarly missing out by reading it so much later than everyone else?

Or isn’t that the point of books, that they are there for me to read whenever I feel like it?

And so it is with games. For years, I’ve always wondered how people can be so comfortable selling their old games to get credit towards the purchase of new games. I, on the other hand, still have my Atari 2600. I still have my NES, SNES, N64, and original Game Boy. Despite being able to play any Gamecube games on the Wii, I still have my Gamecube.

But more important than my inclination to keep consoles beyond the point that might be reasonable, I still have the games I bought for those systems. I’m still unhappy with the discovery that my father gave away the Apple II c+ from my childhood to his coworker, which means I lost my copies of Troll’s Tale, Snooper Troops, Below the Root, Bill Budge’s Pinball Construction Set, and other games. Some of them were beyond my capabilities at the time, but I’d be ready for them today.

But being able to pull out my older consoles and play games from almost two decades ago is a capability I enjoy having.

I currently have two large six-shelf bookcases in my office filled with books. I have a computer rack with a few shelves taken up by CD cases for computer games. In the living room are the console games. In another room is a set of shelves filled with boardgames and card games.

I used to fantasize about having an entire room of a house dedicated to being a library, with books and games stored from floor to ceiling.

Video games these days end up being in the cloud. I have 30 games across 7 virtual shelves on GOG.com, quite a few Humble Bundle bundles, and a few games in Steam. If not you then people you know have much larger catalogs of games stored as bits on a server.

It’s not as tactile, but we still enjoy having those collections to pick up and play whenever we allow ourselves to do so.

What I am not sure we’re seeing is a change in the game design efforts of developers, which is I think cliffski’s biggest concern. While some developers put out buggy and shoddy games, I don’t think they last long. Even if most games don’t get played, I don’t think a pretty screenshot and a sale is enough to get people to reward the developer. Reputation still matters.

How do you feel about your backlog? What impact, if any, do you believe the constant sales and discounts has on game design and the efforts of a developer?

Categories
Game Design

On Game Narrative, Again

Dan Cox said the following in reply to my recent post Plot Ignored + Unfinished Games = Useless Effort?

I’m fearful that the take-away for many developers will be to not attempt much of a story now. If people can’t remember their favorite game’s story, would go the logic, there’s not much of a reason to try at all.

Of course, I would argue that the problem is not that any particular game’s story is memorable or not, but more that, in general, they aren’t very good. Some are, sure, but way too many AAA games have very little story.

I imagine that there will be some industrial momentum that will keep writers employed in the game industry for some time.

That said, frankly, I think it’s difficult to make a good game with a fully authored story.

In game design, there’s the concept of meaningful play. If you give the player agency, then the player should expect to be able to express it. If you are trying to enforce a specific story, however, then that agency is an illusion. No matter what action the player takes, it won’t affect the story in any meaningful way, which reduces the quality of the game.

At the extreme, you have “press button to turn the page” kinds of games. Years ago, a friend of mine was excited to find a cheat code that allowed him to instantly finish missions of Star Trek: Armada because he just wanted to see the story. To him, he wasn’t playing a game, and in fact the game seemed to be an obstacle to his enjoyment of the narrative. He would have been happier if it was a a movie or new episode of Star Trek.

But many gamers want their actions to matter. So then you have games that allow you to go through XYZ branches of a story, where XYZ isn’t unlimited but is in fact quite limited, relatively speaking. But, hey, your choices affect the story!

I’ll admit to loving Wing Commander for its branching storylines. If you did poorly in a mission, you didn’t retry it until you got it right. If you survived, you kept going, and your ability to escort a supply ship or strike at a key base affected the war effort.

My favorite moment from the game, in fact, was the final mission in the branch of the story where the Tiger’s Claw is being forced out of the sector by the overwhelming Kilrathi. You were tasked with fighting off the enemy while the Tiger’s Claw slowly makes its way to the jump point to safety…and it was made clear that if you aren’t on the carrier when it leaves, you’re stranded. Everything I’ve failed to do throughout the game comes to mind as I realize that this is my last chance at doing something well.

Still, as enjoyable as the story was in that game, it was limited. There are only so many branches, scenarios, and missions.

And then you have games with no inherit story, yet the stories they generate can arguably be the most memorable. I have posted stories that were generated by the playing of NetHack plenty of times. And I’m overdue for one. B-)

Over half a decade ago (!!!), I wrote about the importance of stories:

In general, I suppose stories are important for games. I just think that they don’t necessarily have to be dictated from within the game. There is nothing wrong with games that tell a story, but games that do tell stories shouldn’t let the story get in the way of the game. Some people might prefer games that let them figure out their own stories. When I play Flatspace, I like to be a trader, but I like to hunt pirates as well. I don’t have to fight the pirates, but I’m just taking the law into my own hands, hoping to get my hands on the pirate who destroyed my life in my made-up past. There is no actual support for the story in the game, but there isn’t anything that gets in the way of that story, either. I enjoy the act of creation, even if it is only in my mind.

Amazingly, I still agree with my past self. The more games have fully authored stories, the less game-like I think they can be because authored story demands less meaningful game play. I don’t think there is anything inherently wrong with such games. They are wildly popular and have an audience, so it isn’t hurting them.

But when I play games, I’m not as interested in someone else telling me what my experience will be. My experience is my story, which gets generated during play. The more a game allows me to craft my own story, the more I think it is leveraging the strengths it inherently has. Minecraft allows so much story to be generated out of the interaction of play and mechanics, for instance. The Last of Us, on the other hand, only allows so much.

Games are meant to allow players meaningful interactions within a play area. While the game design can guide a player towards moods, ideas, and concepts, the story should be the player’s to generate. Otherwise, the meaning of play is nothing more than what the player needs to do to watch the rest of the movie that’s marketed as a game.

Categories
Games Linux Game Development

GOG.com Finally to Offer Linux-based Games

GOG Offering Linux Games

Some of the big news this past week was that GOG.com games will soon be available for GNU/Linux. At least 100 of them by fall of this year, in fact.

No specific games are announced, but it seems after all of these years of dismissing what has been the biggest demand by their community, GOG is finally ready to support games playable on Linux-based devices as official and supported offerings.

Is the decision due in large part to Valve’s recent pushes onto the OS?

No matter what the reason, I welcome the news. Perhaps it will be followed eventually by Unity offering its editor on GNU/Linux as well.

I posted in the past about a mistake I made purchasing a game on GOG because I didn’t realize there wasn’t a Linux-based version available until it was too late. Luckily, the developers provide indie-level support, but I’m looking forward to being able to go to GOG.com to get any updates easily.

What do you think about the news?

Categories
Game Design

Plot Ignored + Unfinished Games = Useless Effort?

Each time I logged into Twitter this week, I’m reminded that I’m not at GDC.

Thanks go to each of you who post about what’s happening. I live vicariously through you.

As for what’s happening, a colleague forwarded this article that covered the talk “Death to the Three Act-Structure” which mentions research by Microsoft that claims players can’t remember the plots of games.

Combine this information with the statistics that show most gamers don’t finish the games they play, and you can imagine how futile it feels to be a game developer trying to create a very intricate interactive story.

Of course, there has been a number of people pointing out that making games is not the same as making movies or books. The more you try to make your game like those other media, the less you rely on the strengths of games.

Games are less about specific details of plot and narrative and more about the experience the player has. You can guide it, you can influence it, but you can’t author it.

It’s 2014, and it sounds like people are finally figuring out that writing for games isn’t the same as writing a novel.

What was your takeaway from the talk?

Categories
General

Merry Christmas, Indies!

I’ve been enjoying time with family, including my nieces who have introduced me to what’s going on in children’s television these days. The oldest one wanted to play with apps on my phone that let her “build, build, build!” I found a very basic Lego app, but if anyone has any better suggestions for a 4 year old, I’d appreciate hearing them.

I hope you’re enjoying a great holiday. Merry Christmas from GBGames!

Categories
Game Design Game Development Games Linux Game Development

November #1GAM Entry: Raking Leaves

November’s One Game a Month entry is uncreatively-named Raking Leaves, a leaf raking simulator chock full of leaf-raking action!

Download Raking Leaves for Linux 64-bit (1.2 MB tar.gz file)

The object of the game is to rake all of the leaves into a single pile. The wind will blow the leaves around, however, and if you lose too many leaves off of your lawn, the game is over.

I had a lot going on this month, and so I didn’t dedicate a lot of time to making a game. Still, I wanted to make something for #1GAM. What could I make?

I recently bought a house, and with home ownership comes the oh-so-fun task of raking leaves. I decided to make a game out of that experience, and raking leaves is usually done in the Fall, which goes along with the optional theme of “Change”, so it was a perfect concept.

I started out making leaves and randomly throwing them about the yard.

November #1GAM

I then added a rake, which replaces the mouse cursor:

November #1GAM

I wanted to capture the frustration of raking leaves, and so when you click and move the rake, the leaves will move, albeit a bit slower than the rake. This means you have to go rake the same leaves over and over to move them a long distance. I was pleased that it was working as well as I had planned.

November #1GAM

I had some funny bugs, such as this accident which features the level resetting over and over, except it wouldn’t reset the number of leaves but merely add to them. It looks like a giant set of orange hedges.

November #1GAM

Another funny moment was after I added wind. I wanted early levels be less windy, while later levels would get more wind. Here is what it looks like to rake in a hurricane:

November #1GAM

Wind affects leaves in a radius around it, and the farther away the leaves are from the center of the wind, the less of an impact the wind will have. It works very well, but out of curiosity, I set the level to 1,100, which has over 20,000 leaves in it and has winds every second. It resulted in some cool visual effects, as you can see in this video:

Eventually I think I achieved a good balance, complete with a scoring system to let you know how well you’ve done compared to your best raking.

November #1GAM

Considering I worked less than seven hours on this project, I’m pleased with what I came up with. I had plans for rocks, bushes, trees, and other obstacles, as well as a child running around jumping into your pile and scattering the leaves. Having sound would help, too, but for now, I think I’ve got one of the best games about raking leaves out there.

Categories
Game Design Game Development Linux Game Development Personal Development

October #1GAM Entry: Candypreneur

October’s One Game a Month entry is Candypreneur, a candy tycoon game inspired by the classic Apple II game Lemonade Stand.

Download Candypreneur for Linux 64-bit (432 kb tar.gz file)

I wish I had dedicated more time to this project. I had surgery and wasn’t able to work on it while I recuperated, and when I was able to spend time on it, I squandered it.

Still, I learned some things, such as that a best practice for representing money in software is by using integer values to represent cents rather than using doubles to represent dollars.

October #1GAM

October #1GAM

I wish I had time to theme it up a bit more. Some candy icons would have helped.

Also, the economics model is too simple. I managed to add random events that can impact the number of prospective customers, which you can sometimes prepare for if you check the reports screen for the upcoming month.

For this project, I had a much more complex simulation in mind. I wanted competitors, suppliers, customer moods, storefronts, candy ingredients, and research & development.

Even when I scaled down, I still didn’t put in things such as the rising cost of advertising or the ability to take out and pay back bank loans.

I’d say this is probably the project I’m least happiest with. I feel like there isn’t enough there, although some last minute additions make it less certain you’ll sell that candy.