Sexy MF says things related to game programming on Linux, and tells you why you shouldn’t learn C!

OK, first things first – you should go to , and search out Exolon in the “Infoseek” search engine that they have there, and play it. Why? Well, as it turns out, it’s author, Raffaele Cecco took somewhat of a similar journey to mine in his programming life – he graduated from the world of Z80 assembly language on the Spectrum to Javascript (though I have seen his name on the credits of a DOS game from sometime in the middle, one in fact, that I downloaded from much later), and has written an excellent book on the subject called “Supercharged Javascript Graphics”. I highly recommend you check this book out. In it, amongst other things, he develops a complete Space Invaders-ish game, replete with the entire source – an excellent educational adventure for you, the reader. Now, if you have played retro games on emulators, you may not have let matters rest there of course, and even besides that – you may also be familiar with the commercial console and PC games of today. And you might just have the urge to make the kind of things that you see your friends playing, and see in game parlours and so on, by using, say for example, things like PlayCanvas. Now, I myself have never tried PlayCanvas, but in true hacker spirit, I would like to warn you against this. There is nothing wrong with starting simple, and working your way up, so that you know every inch of what your program is doing, start to finish. However, the first Doom, for example, was released in 1993, so if you have to start from there and rise up through to the ranks of the game programming elite of today, well, I guess, life is not that long. However, using some type of readymade “game maker” program which spits out code for you is really, meant for small children, not YOU, the eleet hacker! This is something I’ve devoted some thought to, and well, really, there’s no easy answer to this – you’ll need to strike a balance between being a True Hacker, and…….. well, wowing the young audience of today, and commercial success. To make things easier for you, there is the the fact that mobile games exist, which, depending on hardware model can be fairly simplistic, at times not much more sophisticated than a Spectrum game. To start off this exciting journey of yours, let me recommend this next book, which is one of my most favourite programming books of all time – Michael Abrash’s Graphics Programming Blackbook. Michael worked with John Carmack on Quake, then worked at Valve, and today is at Facebook working on Oculus Rift – type stuff, and in fact was kind enough to reply to an email I sent him after tracking him down on the web some time back, matter of fact, we had a little chat. In the book (which has a foreward written by Mr. Carmack himself), Michael details graphics development starting from pixels to lines to polygons right through to the techniques used by the Quake engine, and makes a sometimes heavy subject easy by peppering the text with anecdotes taken from his own life (you’ll love the story about Bert!). It’s a DOS era book, and a lot of the material is obsolete by now (how to abuse your VGA card is dealt with in excruciating detail), and is simply inapplicable to you since Linux, as a protected mode OS, will restrict you from doing a lot of the the things mentioned there. However, if you’re insane, and want to get hold of an old 486 or P-I from somewhere, and install DOS and some programming tools to try out some of the stuff talked about, well, I guess you’ll be the one writing this column next! Just to point out, you’ll need about a Class 11 level maths background, if you’re younger than that, well, Khan Academy’s your friend! Don’t let me stop you! To make matters unbelievably wonderful, the entire book is available for FREE! Not as a pirated edition, but because Michael actually believes in sharing his knowlege, for the good of the community. Sounds amazing, right? Go here: .

Now, at this point, I have a humble confession to make. I don’t know C! Specifically pointers. I never got into it at a young age, because after life with my Sinclair ZX Spectrum had come to a halt, I didn’t have access to a PC with a C compiler so that I could follow things in a natural progression (and my parents wanted me to get off the computer and focus on my schoolwork – probably the main reason I did so badly there!). I do remember reading about them at the time (in a book I got for my birthday at the time, in fact), but since I couldn’t actually try it out anywhere, they never became part of my bloodstream! This is the main reason I couldn’t actually try out anything from the Abrash book, since the whole thing assumes you’re adept at C! This has been a huge stumbling block in my programming education, since every single book on data structures or graphics programming, or what have you (not to mention websites like this one), assumes you know C. Now, today, where it’s actually taught in school (wasn’t the case back then), let me give you my opinion – I’m glad I never learnt pointers! There’s nothing wrong with understanding indirection, but when you’re trying to think of and implement a particular algorithm, trying to think of what the 0s and 1s are doing inside the computer is just hugely counter intuitive. This is not how human beings think. C was made so that an operating system could be written in it – that is the crux of how pointers came into being, and for some reason that hacker language caught on to become the most prevalent language in the whole world! Of course, it also led a young kid called Linus Torvalds to use it to do it all over again starting in 1991 (incidentally Linus, before the PC, worked on the QL, another member of the Sinclair family, a sort of a “big cousin” to the Spectrum), thanks to which you’re reading this website today, so I guess it wasn’t altogether a bad thing. But I, for one am glad that we’ve moved on to things like Javascript, in today’s day and age, and it makes me happy that we don’t have to worry about what’s zapping in and out of RAM when trying to write a game. Just at that point where those in charge of the Indian education system want their charges to know about nothing else but the syntax of weird things with asterisks in them (it seems, the more asterisks, the better), as if that was important. Trust the fools! Incidentally, I did get hold of a Youtube video about pointers sometime back, and followed it through, and yes, I did finally get what they are (where was that animation back in 1992?), but I guess it’s too late now – Javascript occupies much more of my mind now than C ever will, and I can’t say that makes me unhappy in any way. All along, I knew what [ and ] do in Assembly in any case! I just wish there were more folks like me, who will now have the happy task of porting, in their own minds, all the code in the Abrash book, to whatever their favourite language is, so that in the case of Javascript, wonder of wonders – their browser can show them the joy of a rotating cube! That’s why the exhortations of this article. By the way, I suggest you Youtube for “banana bread” some time – good stuff! This is clearly the future, and you need to get a handle on it.

OK, so….. one more thing needs clearing up before I leave though – now there’s Wayland which you may and have heard of, and which changes things considerably, although it’s next to impossible to find out exactly what it is, and what its innards consist of (for those who don’t know, it’s a new display server technology – and by the way, the latest version of the Enlightenment Window Manger now works with it!). Of course, if you’re a browser programmer, this doesn’t matter to you anyway, beyond what you can’t help – if your Javascript browser games run slower on Wayland than on X, well, there’s no way to fix that, unless you know C and are prepared to dig deep into it’s code – let me point you in a direction far, far away from that, pun intended! Let’s spend the rest of our time discussing actual game ideas – God knows I’ve had a couple myself, I’d love to hear yours – send them to the editor, and maybe we can come to some sort of consensus amongst our readers about who would like to take a shot at implementing their favourite ones…..? Cheers, guys!


This  Article has been sent by an private contributor.