Skip to content

Platforms and programming

December 9, 2012

Today I have decided to give you some more insight into my programming skills, which may lead to you understanding why I often want to slam a giant toxic death spike through my brain in frustration.

I started coding years ago with Basic, (when I was 8 or 9) I made a text adventure…you know the drill:

10: Print “you are in a forest, moody goblins and space monsters are all around, do you want to kill the goblins?”:
20: if<y> goto 30 else goto 40:
30: print “you try to kill them, but the goblins killed you” – game over:
40 “Instead of fighting you decided to run away like a big baby”:

Anyway after several very long sessions of programming I tried to save the game to a cassette as usual, however the game code got so large it wouldn’t save on to a C90 anymore. I had no idea how to use compression, or any idea how to save my precious game so I turned of the computer losing my game forever, after which I probably cried for a bit…

Many years later I got the enthusiasm to give it another go, I made a few games using “Blitz basic” on PC (I mentioned feast invaders on this blog before)….then got a job making games for a living. This meant I had so much stuff to learn at work that I stopped programming for quite a few years. Eventually I downloaded XNA, and was confused as hell. One evening (During over-time crunch) A workmate Chris Subagio spent about 2 hours explaining to me how the program flow was structured and a some syntax related bits and pieces…and that was enough to get me going (he is a super-brain)…I still didn’t really do much with it, however somehow I did end up making a demo for an EA pitch…the game was…a quiz game! It was kind of cool for it’s day, but didn’t make too much sense in the market at the time…weird thing is, it probably would work now….One day I will share it on here.

From here on I started making a few games one was called “supercollider” and was a twin stick shooter I was kind of partial to. The last thing I was making was called “Tank Motherfucker” which was to feature my band and I screaming our lungs out, while players blew the shit out of each other with tanks.

When I moved to Singapore I ended up doing almost nothing technical for a few years, instead being more involved in design reviews and pitches than getting my hands dirty. Thankfully with the advent of The Force Unleashed 2 (TFUII), all that changed and I had to get back in there and start making things. Up until that point I had been told to not get too involved in the work, and direct people instead. for me, that made me feel like a cheat – how can you direct if you can’t do? the DS games I worked on at Lucasarts were the first things I ever made where I didn’t really do much hands on work…I did a lot of the designing, and a fair amount of some technical direction on how we should do things, but very little actual “doing”. When I was asked to go to the USA for 2 months to learn the tools for creating levels in TFUII, I got pretty terrified. I hadn’t opened 3D studio Max in what felt like a very long time, or done anything technical in far too long. What if I had forgotten how? I felt like being in a leadership position had resulted in me losing my edge, and no doubt all the designers who had been using Lua (a scripting language) for the past 2 and a half years were about to give me a royal ass kicking, making me lose their respect.

Well thankfully it went pretty well, I got used to the tools and had my first foray into visual scripting, and enjoyed it all. I felt like I got on top of it pretty fast (partly because of the pressure, but more so because I was so happy to actually be making stuff again!). After TFU2 I continued doing technical stuff, working in UDK building and designing, and getting into unreal scripting a fair amount towards the end of my time there. Although, as is the case with me and coding, I had to get an engineer to strip away the layers of “helpful but needlessly complex” Unreal code so I could actually become effective…

Anyway, so then I ended up making indie games. Up until this point my work had always been in a nice friendly framework, with people around me who could cut away all the crap (how do I make it so I can write clean code from scratch, rather than wretling with something crazily obtuse)…

So I realise I have ony ever written game code, I don’t think I suck at it all that much (well many other people would disagree I am sure, but I get the results I want)…it’s the other stuff that I can’t do that drives me beyond crazy. So I tried to get the new iOS6 store going (because it looked easy) this was a challenge for myself as much as anything…obviously I write the code, and it doesn’t compile. I look at the code for hours trying to work out what the hell I am doing wrong. I go to web pages and read documentation containing examples of code that aren’t examples I can understand.  And at the end of it all I feel so demotivated, that I can’t do one damned simple thing that it makes me want to just quit. I often think I am just not cut out for this, even though I can code an entire game within a stable framework pretty easily. iOS 6 appearing told me some commands had been replaced with newer ones…just because…however I couldn’t get the new ones to work.

It all comes down to syntax…when I talk to programmers who are trying to teach non-programmers how to code, I always try and remind them just how alien a language it is for us mortals. Here is an example or two….

I have ten apples and I get given one more…how should I code it?

int apples = 10; (int means integer, so I am saying a number that will be referred to as apples, = 10)

apples = apples + 1; (makes sense right?)

A programmer will simply write

int apples = 10;
apples ++;

the term “++” means add 1 to the variable before it, just as — means subtract 1…So I looked at this code in other peoples programs many times having no idea what it did…yes I could have pulled it about and figured it out, but when 90% of the code is unreadable, changing something usually stops the thing working all together.

what about “apples += 10” same as ++ but instead of adding one you are adding the value of 10 to the preceding variable.

other stupid examples:

a “Bool”-ean is a thing that can be true of false, for example

bool PlayerIsAlive = true;
if (PlayerIsAlive== trye)
{
PlayerIsAlive = false;
}

however you don’t have to write that you can do it like this:

if(PlayerIsAlive)
{
PlayerIsAlive = !PlayerIsAlive;
}

yes it saves time, but it’s really hard to read if you don’t know the syntax…

The examples I am giving are very very basic compared to the stuff I see in the code I am faced wih every time I try to do something native…(maybe they are not, it’s just the stuff I understand now seems basic, and the stuff I don’t understand must be hard…because, I don’t understand it!). Anyway it all just confuses the crap out of me!

So where am I going with all this, my games have sort of frozen in the release pipe since iOS 6 came out and gave me 2 errors that I can’t fix…with one of them I could simple have not used the new functionality of iOS6, but the other meant the game wouldn’t compile anymore…no doubt someone with a brain can figure it out, but I just sat there looking at the error rocking back and forth on my hands like a lunatic. So how do I stop myself throwing myself of the balcony onto the concrete below? Thankfully I have friends! I now have received the help of several people who have helped me overcome these hurdles so I can get back to doing what I do best, which is just making games. If someone sets up an in-app purchase for me, then I can reuse it over and over again for all my games changing the necessary pieces here and there….but if I try myself even with a fully working example I can’t get it to work (usually there is some little ++ or something surrounding the code that I don’t understand).

So with this I have decided to be less harsh on myself about trying to learn every last thing and instead team up with whoever is willing, so I can just get the crap on with making games…hopefully learning a thing or two along the way, but trying to be less stressed about it.

Thanks to a lecturer at Digipen helping me figure out what to do I got monogame for Playstation Mobile to build and run one of my games, it was one of those experiences where I knew what I had to do, but couldn’t quite get it to work properly, he had no idea what was going on, but he was able to get around the compile errors and together we got it working. Now my friend Ian James from the UK is hammering away at the PSMobile code (fixing the stuff that wasn’t implemented in monogame so my game will have all the things it needs)…Anyway I am pleased to report that while I don’t have iOS up and running again yet, PSM is on the move – I bought a Vita one week ago today, and now it does this :

Vita

That’s “Space Lift Danger Panic!” Everything fully works, the only issue is that it runs at an average of 20FPS…

Other than making games on it, I have also been playing soundshapes which is just astoudingly good.

Advertisements

From → Uncategorized

One Comment
  1. Gavin permalink

    Not sure if it’s the same in gaming code, where there might be speed issues, but in my line I think there’s often something to be said for going with more readable code, even if it means typing a few extra characters. For example languages often still allow x = x + 1 as well as x++, so go ahead & use it. Makes it easier for whoever comes along later & has to modify the code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: