Little Longhorn – Part 7 – Burn it down and build it up again

Oh, it’s been a while since I have written anything about Little Longhorn! Actually I just discovered that my last post is from 1. February 2010, so that is pretty crazy how fast times goes by. :)
Even though I haven’t written anything about the game a lot have actually happened. In this post I will take you through some of the things we have done these months.

Little Longhorn - screenshot RadialWheel
What you see in the middle is our new RadialWheel menu component.

[more]

Code clean up and a lot of rewrite/refactor

In the last post I wrote about how we showed a alpha version of the game at a party and how it went. The two weeks up to this party we coded intense on the game to make it playable. We had the focus on getting things done fast, not making any big thoughts on the code design. This resulted, and we knew that from the start, in some “Spaghetti code” just to make it work. 

After the party we started to clean up all of this code and at the same time we discovered that we had a major bug in the core (coordinate system) of our engine. Without getting into too much details about this, we spend a good deal of time on figuring out how we actually wanted it to work and how we could implement it.
[Insert a lot of trial and error here :) ] 

When we figured out how we would like it to work and how we would implement it, the entire game almost broke down, as these changes where so fundamental that almost all code needed to be fixed or entirely rewritten. This gave us a lot of work, without actually doing any progress on the game it self.

Now we are almost back to the point where the game is playable again, but we now have a much better and cleaner codebase to work with. Which makes changes a lot easier.

Everything is XML – almost

One of the really big things we have done, which is making our developer lives SO much easier now, is the ability to define things in XML and load it in from code at runtime. We have this concept of Screens and Components, which makes up the entire game. Both of these can be defined in XML and used in code , actually a little like how XAML and code-behind file works in WPF and Silverlight. It really makes it easy to put new things in and move around, and keep the focus on the actual logic, not how you the texture on the SpriteBatch etc.

We are not ready to really show any of this code yet, but I still thought I would tell you about it, as it’s a major thing for the engine we are building, to build Little Longhorn on.

SilverSprite changes

As we write the game for both Xbox360 (XNA) and Silverlight we use a library called SilverSprite. This makes our XNA code run in Silverlight. Up until recently, SilverSprite have had it’s own namespaces, which meant that we needed to do a lot of #if SILVERLIGHT in code, to make it work. Now Bill Reiss have changed this, so SilverSprite now uses the same namespaces as XNA, which makes everything a lot better and easier on the eye to look at.

Windows Phone 7 Series

This isn’t related directly to Little Longhorn, but it might be in the future: )
At  MIX10 Microsoft announced XNA 4.0 and Windows Phone 7 Series. XNA 4.0 will run on this new phone, which means that we can have Little Longhorn run on this pretty easy. It’s not in the scope for us to start targeting the new Windows Phone yet, but when we have a final running game on Silverlight and Xbox I’m pretty sure we will look into this device too.

Even though it’s not in the scope right now, I couldn’t help it and try to make Little Longhorn run on the WP7 emulator. I mean, when Microsoft is to kind to throw an CTP of the framework and tools at you, why not?
All in all, I think I spend around 30 min to 1 hour to make the game run on the device. Of course it didn’t work fully and didn’t fit to the screen etc. but still it was a nice feeling to be able to have the game up and running on the Windows Phone 7 Series (emulator) in XNA 4.0 within an hour.

  image   image

And besides that, I’m just very excited about the Windows Phone 7 Series in general!
It’s Silverlight and XNA, can it get any better?

14 days iterations

As this is a hobby project and its something we do in our spare time, it can be hard to control and manage the project. What you want is to have control of the project and what everybody is doing, without having it to take up all your time. The typically problem for hobby projects like this is that people have many, if not all, roles in the project and therefore can’t spend a lot of time on “silly” things ;)
Up till now we have had this iteration concept we use to group issues in time. The problem have been that these iterations haven’t had a defined duration from the beginning, which makes it too easy for us just to kind of “push the deadline”. Again this is a hobby project, so we don’t want to push our self too hard, on the other hand, we have realized that we needed to do something if we wanted this game to be done before we lost the interest and excitement of the game.

What we try out now is to have iterations with a fixed duration of 14 days each. Today (4. April 2010) we are ending the second of these iterations and starting the third.

These last two, “14 days iterations”, have been highly productive and we have come a long way. I will try to publish a blog post on every iteration end/start from now on. I know I have to be careful with making promises like this, but I actually want to push my self to HAVE to do this, both for the readers of this blog and for myself.

Hope to see you again in 14 days for a new Little Longhorn blog post :)

– Enjoy!

Little Longhorn – Part 6 – Two weeks in the name of progress

About two weeks ago I wrote this post about how we decided to try and change the focus on how we develop this game. We have for a long time coded on the “engine” part of the game, so we have something solid to build the game on. This is very exciting and very needed, we just started to hit a point where we felt like we needed to have something we could “show” people. We needed to have a simple “playable” prototype of the game that we could show people and they could try. There were mainly two reasons for this:

  1. We were starting to have a hard time finding the motivation to code on the project, as all the things we did were “non-visual”, like all the engine work, which didn’t gave anything to the game, visually or game play-wise. Motivation is a pretty important factor when you are doing a hobby project like this :)
  2. We are both (me and Allan Hansen) very interesting in designing code as good as possible, which is why we usually talk a lot of how we can do stuff before we start coding it. This actually a good thing, but in this case, we saw that we needed a different approach.

So, with the points from above in mind, we wanted to do something about it, which is what we did the last two weeks.

[more]

Deadline

To help motivate our self, we set a deadline for when we needed to have a “playable” version of the game ready. Allan were holding his birthday/house-warning party Saturday 30th January 2010 and that became the deadline. It turned out that this deadline, even though it were just set by our self (keep in mind this is a hobby project) and no one really knew it or were expecting anything, help very much on the motivation for getting a “playable” version of Little Longhorn ready.

Making progress

The last two weeks we have made major progress. We went from a kind of tech/developer/proof-of-concept version to a playable version with menu, better graphics (still just dummy stuff), music/sound, menu, game play flow like start->play->game over->restart->complete level and much more. The way we did this were to focus only on getting features implemented, even though we didn’t knew if we did it the “right” way, code-wise. It has turned out that we could get something together this way pretty fast and we now have many idea how to do stuff better. So this has really helped us a lot. Here are some before and after screen shots.

Before:

Little Longhorn Screen Shot

After:

Little Longhorn Screen Shot Little Longhorn Screen Shot Little Longhorn Screen Shot Little Longhorn Screen Shot Little Longhorn Screen ShotLittle Longhorn Screen Shot

The good stuff is that we have something playable now, even though it is still of course far from what we have in mind for the final release. We can now look at the code we have and easily see how we can improve it and make it better, because we have something that actually works.

Show time

So the day arrived where we needed to have the game ready. We made it, but of course still had some last minute changes, right up to it were deployed on the Xbox. We started out by showing it where we played the game to explain people what the game were all about and that it were a early prototype etc. (You know, all the crap developers say to let “normal people” understand that this is NOT a final game :) ) Then we handed over the controller to some of the guests at the party and they started to play it. It were actually pretty funny to see people play the game and see how fast they understood the goal of the game, which is a very good thing and something that got noted by us (the developers). Even thought it is a prototype people actually found it pretty challenging and funny to play.
A funny thing that we discovered were that a minor change we did to some of the collision code, turned out to make the game lag like crazy after wave 5 or so. So from wave 5 to wave 8 (the game have 8 waves in all levels at this point) it were kind of a “slide show” :) That were funny by it self, but what were even more fun were that people insisted on keep playing, even though they saw 2 frame per second, because they wanted to see if the totems they placed could beat the enemies. Some of the guests actually managed to complete the level this way, pretty cool! I see this last thing as a good indication on that the game actually can become very funny and challenging to play.

We also recorded a video while we showed the game and people were playing it.

Next step

As mentioned before, we now have a kind of working game, but the code can be done much better many places. So what we need to do next is to go through the code and refactor. I’m not talking about performance improvements here, I’m talking about generally better architecture of the game. Well, we of course need to fix the collision bug I mentioned (lag from wave 5 to 8), but besides that, we will not do performance improvements yet, as it’s way to early to do that.
When we are done refactoring/cleaning up the code, we will start implementing an level editor. This will be for use internally by us at this point to make levels faster and easier (right now it’s raw XML editing when doing levels), but it might be possible for players to make levels also in the future, but no promises here.

Hope you enjoy following the progress of this game, please let me know what you think about it, by leaving a comment :)

– Enjoy!

Little Longhorn – Part 5 – Changed focus

As I mentioned on my last post, another developer (Allan Hansen) have joined the project. We have done a lot of work in getting a pretty solid foundation/engine to build the game on. Not that it’s “done”, far from, but we have something now that should save us time in the long run. This means that we have invested a lot of time in getting this done, without actually getting forward with the actual game play.

Now, after the project have been on hold for some time, we have started up again, this time with a changed focus. We will now focus more on getting implemented the different features of the game, instead of keep building on the foundation/engine (non visual stuff). This way we can see progress as the game play will evolve, both our self, but also when we show the game to others. This way we can start pretty soon to get feedback from people, even though the game is young.

[more]

Hopefully this will also helps us show it off to our girlfriends and maybe, just maybe, have them to say something positive about it. Usually, girlfriends don’t see the über in two red boxes colliding or a long talk about path following algorithms :)

Let’s see how it goes with this new change of focus. We started up this week and we already have implemented some nice stuff. Here is a screenshot of how the game currently looks. Keep in mind that all the graphics is just dummy sprites from various sources so we have something to test with as we develop.

image