Bedroom Coder Rebooted

In which a lapsed developer of 16-bit freeware attempts to rekindle his game dev 'skillz' after half a lifetime away. Backstory here.

Posts tagged tutorial

Jun 8

What I’ve Been Up To

So, yeah, I’ve not posted anything on here for a while.

Firstly: Onward My Zombie Horde is on an indefinite hiatus. Apologies to the one guy who got excited about it - it’s something I’ll come back to at some point, but I realise now that I was trying to take on too much, too soon.

On the plus side, hitting a roadblock with the AI for OMZH spurred me into a pretty major rethink of my options as a beginner indie dev, which has led to a few changed priorities.

So what have I been up to? Well:

1. For a number of reasons I’ve decided to ditch SFML in favour of something more beginner-friendly and with better options for distributing any finished games. After weighing up my options I went with Microsoft’s XNA Framework, which gives me the potential to create games for Windows, XBLIG and Windows Phone using the same code base. While I was impressed wtih SFML in some ways, it seemed a bit of a cul-de-sac where distribution is concerned.

2. Unfortunately, this choice required that I learned C#. Not an easy thing to commit to having just spent a couple of months getting to grips with C++, but with the help of online tutorials from csharp-station.com it was reasonably painless. For me, it makes more sense as a language than C++ and I like how it’s object-oriented from the ground up.

3. Then I needed to learn the basics of XNA. I’m now just at the stage where I’ve done enough with the tutorials to be able to start working on my own ideas, but rather than start a game straight away I’m trying to put together a few methods for things like sprite animation and 2D tiled maps that I can re-use between projects, making my life a bit easier.

So far I feel like I’ve made the right decision. I’m finding C#/XNA *much* easier to work with, and I’ve also had lots more game ideas that I want to try out.

I’m not sure if I will ever get back to updating this blog as often as I did in the early days, but do I plan to keep it going (perhaps with separate dev blogs for major projects as and when they warrant it).


Dec 7

PEW!

My space invader now makes a PEW! noise when you press space.

This is the most awesome thing ever.

It also concludes my dabbling with the SFML tutorials. Next up, to tackle an actual honest-to-goodness game.


Dec 6

Sound and vision

So, having swotted up on the nuts and bolts of C++ it’s time to make a start on my first game.

Before I get that far, though, there’s the small matter of making the leap from command-line based, text-only programs to all-singing, all-dancing (literally) games programming.

It’s a bigger leap than it might sound to the non-programmers out there. There are many things a game needs to do that aren’t covered in the standard C++ libraries or taught in the core tutorials, and that would be hugely complicated for a beginner to write from scratch.

Things like drawing things on the screen, moving sprites around, playing sounds and music, loading graphics and sound files from disk, checking for input from a joypad… that sort of thing.

Fortunately for the beginner, there are various free libraries out there that essentially provide extra commands to use in programs to do all that sort of thing for you.

Allegro, the library I used during my brief foray into C, is still doing the rounds and seems quite a popular choice for my fellow newbies. But although it works with C++, it isn’t built from the ground up for the language (it isn’t “object-oriented”, which I gather is quite important - although I’m not quite sure why).

Another popular choice is SDL, which has also been around for a fair old while and has many devotees. This, it seems, is the more “hardcore” option and has made its way into several commercial titles.

But I’m going with the new kid on the block. SFML (it stands for Simple Fast Multimedia Library) is in its relative infancy compared to the other two libraries mentioned but gets my vote due in no small part to the noob-friendly tutorial section on its website. It’s completely free, even if used to make commercial software. And, from the quick play about with it that I’ve had tonight, it’s pretty damn impressive.

After following the first couple of tutorials I’ve managed to plonk a big space invader on the screen and get it moving around according to keyboard presses. I can even rotate it, something I couldn’t have done in my wildest dreams back in the Amiga days. Life is good.


Dec 5

The end of the beginning

A second day in a row of cracking on through the cplusplus.com tutorial and I’m more or less done with it. Two and a bit days, 140 pages, 60 tutorial programs compiled.

I think I’m more or less on top of things, but so far I’ve just been typing in other people’s code and trying to understand what each line does. The acid test will be writing my own stuff.

I’m not going to be daft enough to leap straight into trying to realise my great game idea from yesterday, but it’s time to start trying to write a game of some sort. I’ll worry about that another day though - this weekend has been exhausting.


Dec 4

Dreams versus reality

I woke up today with a great idea for a game. It just popped into my head fully formed. I know what the main characters look like, how the control scheme will work, how the levels will progress as you get further into it, what the sounds will sound like, even some of the music. This game, I thought, is going be brilliant.

Thus inspired, and this being a weekend, I promptly sat down in front of my laptop, loaded up Codeblocks and got cracking apace with the C++ tutorial I downloaded earlier in the week.

This brought me back down to earth with a thud.

It’s a bit like dreaming you’re winning the Monaco Grand Prix, then waking up and having to take your first driving lesson.

Don’t get me wrong, I’m gradually getting to grips with it. But my great game idea is going to have to stay on the back burner for a while. After a full day of following the tutorial and bashing out code, I’m still wrestling with the basic nuts and bolts of C++. The most interactive program I’ve written so far asks you to type in a series of numbers, then parrots them back on the screen.

It’s going to be a long slog before my game idea sees the light of day. But at least I now have something to aim towards.


Dec 2

Back in business

I did have one final foray into coding after the AMOS days when, as a student, I taught myself just enough C to program a frankly awful Operation Wolf style shooting gallery game that was basically an elaborate in-joke for a few mates. Hey, I had too much time on my hands.

That was 13 years ago, and I’ve not coded in anger since. I remember virtually nothing about C, except that I taught myself by downloading an in-depth tutorial in PDF format.

Well, if it worked for me once…

As luck would have it, a similar thing exists for C++, over at cplusplus.com, so that’s going to be my starting point.

And so, tutorial in hand, I press on.