• Register

Malevolence: The Sword of Ahkranox is an indie game with the intent to recreate the amazing turn-based, first person RPGs from the golden age of PC gaming using modern game engine technology. Rich classics such as the Might & Magic series, Eye of the Beholder and the like have inspired this new title which, when finished will put its players into a literally infinite fantasy world filled with procedurally generated content. The Sword of Ahkranox isn't trying to compete with the larger, professionally developed RPG titles out there, but instead our aim is to fill a large gap that we believe has existed in game technology since the mid-nineties. It is definitely a must-have for all enthusiasts of the quintessential RPG. The game's procedural engine can generate an infinite number of weapons, items, spells, monsters, dungeons, cities, countryside and even dialogue, allowing the player to explore the game with no end and no reason to stop.

Post news Report RSS Advice for New Programmers

It's been quite a while since my last blog update (about 2 weeks... Sorry guys...) I thought I'd share with you all a bit of an insight into how things work in the behind-the-scenes part of this project.

Posted by on

It's funny, really. As a long-time (12+ years) programmer, I still don't think of myself as a long-time programmer. I'm constantly learning and trying new things - so much so that I always kind of think of myself as a n00b when it comes to games programming.

As such, I actually get a bit shocked when I get emails from programmers who are learning about the field or just starting out asking if I have any tips or advice for them when it comes to making their first really big game. I try and answer the best that I can, but as you've probably been able to gather from earlier blog posts, I'm not overly good at explaining things :-S

So, since it's been quite a while since my last blog update (about 2 weeks... Sorry guys...) I thought I'd share with you all a bit of an insight into how things work in the behind-the-scenes part of this project. The reason you haven't heard much from us of late is because we've been dealing with some major coding issues which are only present at all due to bad coding practices. Big fault on our part, but we tried to rush things so we'd have something to show you. That was a bad move, we've learned our lesson, and now we thought we'd share that with you so that if you're new to programming you can - hopefully - learn from our mistakes!

The golden rule for us with programming is planning and documentation. Before you write a single line of code, you should have pages of notes on features, gameplay techniques, design ideas, and - if you want to be really thorough - von neumann diagrams (or some sort of flowchart) to outline the processing behind the screen. A lot of people find this to be far too boring to complete and the fact is, compared to getting stuff done in code, and making working prototypes, it IS boring. But let me tell you, if you're working on a project that is big enough, this stage will save your bacon more times that I can say.

Malevolence is broken up into 3 distinct tiers. The first tier is the subterranean exploration tier (dungeons, tombs, caves, etc) the second tier is overworld exploration (forests, canyons, etc) and the final tier is the settlement tier (towns, cities, etc) and each one is coded seperately since they all operate so differently. This is why you only saw dungeons for ages and ages. For the first tier, we did the full planning and documentation stage. We actually filled 2 and a half 300-page notebooks with our plans and charts for it, and our artists have countless concept sketches so everyone had a clear idea of the look and feel of the game.


As a result, the dungeons turned out to be beautiful. They run beautifully, the look beautiful and all-round they are a real joy to play. However, it went a bit downhill from there. People started assuming that the entire game was just dungeons (rather than reading the info) and we felt that everyone was getting the wrong impression of the game. So we decided to rush it and pump out external environments without the proper planning.

The result was mixed... Yes, we got a working prototype, but it was written so hastily and so un-planned that every time a new feature was to be added, or a change was to be made, the spaghetti code that we had written was so interlocked and co-dependant that a simple fix that should have taken 15 minutes ended up taking an entire evening (which is quite depressing to deal with).

Early on, if you'll remember, we started out with a rough 3D prototype of an infinite forest:


And yes, it worked fine, but it looked like butts and was very clunky. Not to say it was all bad though. We learned a great deal working on it, and there's still some really great code there to be recycled, but in terms of adding things to it, well, it's terrible...

We started getting a bit boned working on it, and people seemed to forget our "get it working now, make it pretty later" philosophy on this project, so we decided to play around with a pretty version, which came out looking really sexy:


But still it was just new graphics built on top of crap code. So we decided to call a mulligan on it for now. It was working, that was the important thing. So we decided to have a play around with town generation, which yielded similar results:


Yes, it worked, but it was written so sloppily that even making a change as simple as allowing different buildings to load with different texture options became a nightmare of infrastructure re-writes.

So what have we learned? If you realise you're fighting an uphill battle with code, JUST STOP. Don't keep pushing on, thinking "ahh, I'll fix it later" because it won't work. Stop, cut your losses, and re-write. If you'll remember, we did it four times with the dungeon code, and each revision got faster, cleaner and more efficient. So we're doing that now with the overworld and towns.

Malevolence is based on a roguelike system. Everything is in a 2D grid made up of ASCII characters (except we generate 3D models from those ASCII characters) so we're currently going through and making the whole overworld/town thing work in a roguelike platform first, then converting the data into 3D models. So for a while, it's going to look like this:


It may look basic for now, but it means that we can VERY clearly see any problems before they blow up into bigger ones.
You probably won't see any of this stage (unless we get a lot of comments asking us to show it haha) but we want this game to run smoothly and beautifully when you all get your hands on it at the end of the year, so we refuse to release bad code to you all.

Anyway, I hope new developers or younger coders out there got something from this. If you take anything away from this blog, remember the two main rules:

  • ALWAYS plan everything out before you start
  • NEVER be afraid to just start over. Even if it's just a function you're writing. If it's done badly, don't keep killing yourself with it!

Follow those two rules and your game will be much better for it!

Speaking of game dev hints, it helps to work with a smashing artist! You've seen a lot of the work from Rachel in the past, and more recently from Natalie, and we have a few new things to show you!

Basically, while you're cruising around Ahkranox you'll find MANY items to collect/sell/use and they all need sexy graphics to go with them, and Natalie has been sloughing away at giant lists of things to find. Here's a sample of what you can expect in the demo!

Some stuff is really pretty!

Some stuff...... Er..... Not so much...

I hope you enjoy those! We certainly do! Anyway, we're off for now, but we'll be back again soon hopefully, with more stuff to show you!

Post comment Comments
Expack
Expack - - 312 comments

Wow...sorry to hear about your setback. That's gotta be hard, realizing you've been going about things in a way you shouldn't have. :(

However, I still think you can show us what you're working on, but DON'T WORRY if it doesn't look 'pretty'! The game is still in alpha/beta - very few games look 'pretty' at this stage in time. You just need to flat-out tell people that. If you're honest about the status of the game, like you're doing now, I think people would understand and accept what they see better than if you weren't as honest.

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

We agree, but we've been honest about it the entire time and we still get so much flame in our direction from people who don't bother to read it. Normally we'd adopt a "screw you" attitude about it, but this game has a real chance of being popular and to foster that it seems we really need a "give 'em what they want" attitude, which kind of sucks, but it's what's needed :(

But now that we're taking these steps, work should be back on track pretty darn quick!

Reply Good karma+3 votes
Expack
Expack - - 312 comments

I suppose my question, then, is what will you and your team do beyond what you're doing now to ensure that people's desires to see nice things won't destroy your progress again?

What I'd do is continue to show video progress and screenshots of artwork and in-game stuff, but with the understanding that sometimes, people really DON'T know what they want, and, thus, you need to show them what you want. For example, people tend to love 'next-gen' (read: shiny and in 3D) graphics, but has that stopped them from playing Minecraft, VVVVVV, or Braid?

I'd be willing the people who looked at the development stuff for those games went and reacted like they are to your stuff eventually gave in and bought the alpha/beta/full game because they realized the developers were showing them what they wanted, but wouldn't have thought they wanted without sufficient exposure.

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

We've kind of adopted the standpoint of "the game will get done if you wait. For now, you're lucky we're showing anything at all" hahaha given the fact that 90% of the readers are really happy to just read up on the new developments of the game, no matter what they look like, we're going to turn our attentions to them, rather than the few who go "meh. not pretty enough"

So if you're interested in the content, and just trust that the graphics will be on their way later, then you're good in our books! :D

Reply Good karma+2 votes
Sph!nx
Sph!nx - - 722 comments

This was a good read. I've been coding for years now and still think I'm a n00b too. Though, I have learned to take it easy. I'm working on my own engine and tools and have made extensive documentation, three fully working prototypes before starting from scratch on the "final" products. After four years I'm still working on the same package without having showed a thing to anyone...

Sometimes I wonder where I find the patience myself...

Reply Good karma Bad karma+2 votes
CumQuaT Author
CumQuaT - - 776 comments

Worth sticking with though! There's something particularly beautiful about a clean, elegantly constructed engine. But then again, we may just be odd ;-)

Reply Good karma+2 votes
DoctorSpanky
DoctorSpanky - - 1,733 comments

Oh god we are getting a demo sweet, btw my doubt is over I'm going to love this.

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

heh awesome to hear :)

Reply Good karma+1 vote
Dbn404
Dbn404 - - 35 comments

A really good read. :)
It sucks when you realize you basically just spend ages programming a virtual plate of spaghetti but I think it happens to the best of us. :D
I worked on Shadowcast for 4 or 5 painstaking months, until I realized it sucked and the coding practices I had used were archaic so I had no other option than to start from scratch with a rewritten design document and rewritten game. ^^;

Ohh and I must have the ruby armband, I don't care if I'm going to have to play a female character, that is brilliant! (As well as all the other graphics!)
My attempts at making in game items suddenly seem a little lackluster. ;)

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Well so far, starting over has made a big difference in the speed and cleanliness of the code!
The ruby armband will be available for both genders ;-) our artist will be happy to know you like it!

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: