Icon ASCII : A Love Letter


Icon My Neural Network isn't working! What should I do?


Icon Phase-Functioned Neural Networks for Character Control


Icon 17 Line Markov Chain


Icon 14 Character Random Number Generator


Icon Simple Two Joint IK


Icon Generating Icons with Pixel Sorting


Icon Neural Network Ambient Occlusion


Icon Three Short Stories about the East Coast Main Line


Icon The New Alphabet


Icon "The Color Munifni Exists"


Icon A Deep Learning Framework For Character Motion Synthesis and Editing


Icon The Halting Problem and The Moral Arbitrator


Icon The Witness


Icon Four Seasons Crisp Omelette


Icon At the Bottom of the Elevator


Icon Tracing Functions in Python


Icon Still Things and Moving Things


Icon water.cpp


Icon Making Poetry in Piet


Icon Learning Motion Manifolds with Convolutional Autoencoders


Icon Learning an Inverse Rig Mapping for Character Animation


Icon Infinity Doesn't Exist


Icon Polyconf


Icon Raleigh


Icon The Skagerrak


Icon Printing a Stack Trace with MinGW


Icon The Border Pines


Icon You could have invented Parser Combinators


Icon Ready for the Fight


Icon Earthbound


Icon Turing Drawings


Icon Lost Child Announcement


Icon Shelter


Icon Data Science, how hard can it be?


Icon Denki Furo


Icon In Defence of the Unitype


Icon Maya Velocity Node


Icon Sandy Denny


Icon What type of Machine is the C Preprocessor?


Icon Which AI is more human?


Icon Gone Home


Icon Thoughts on Japan


Icon Can Computers Think?


Icon Counting Sheep & Infinity


Icon How Nature Builds Computers


Icon Painkillers


Icon Correct Box Sphere Intersection


Icon Avoiding Shader Conditionals


Icon Writing Portable OpenGL


Icon The Only Cable Car in Ireland


Icon Is the C Preprocessor Turing Complete?


Icon The aesthetics of code


Icon Issues with SDL on iOS and Android


Icon How I learned to stop worrying and love statistics


Icon PyMark


Icon AutoC Tools


Icon Scripting xNormal with Python


Icon Six Myths About Ray Tracing


Icon The Web Giants Will Fall


Icon PyAutoC


Icon The Pirate Song


Icon Dear Esther


Icon Unsharp Anti Aliasing


Icon The First Boy


Icon Parallel programming isn't hard, optimisation is.


Icon Skyrim


Icon Recognizing a language is solving a problem


Icon Could an animal learn to program?




Icon Pure Depth SSAO


Icon Synchronized in Python


Icon 3d Printing


Icon Real Time Graphics is Virtual Reality


Icon Painting Style Renderer


Icon A very hard problem


Icon Indie Development vs Modding


Icon Corange


Icon 3ds Max PLY Exporter


Icon A Case for the Technical Artist


Icon Enums


Icon Scorpions have won evolution


Icon Dirt and Ashes


Icon Lazy Python


Icon Subdivision Modelling


Icon The Owl


Icon Mouse Traps


Icon Updated Art Reel


Icon Tech Reel


Icon Graphics Aren't the Enemy


Icon On Being A Games Artist


Icon The Bluebird


Icon Everything2


Icon Duck Engine


Icon Boarding Preview


Icon Sailing Preview


Icon Exodus Village Flyover


Icon Art Reel




Icon One Cat Just Leads To Another


Created on May 29, 2011, 2:17 p.m.

Making your own game engine is always something people tell you never to bother with - still, it seems a to be an allure which most graphics programmers can't avoid.

In the past I've worked at a fairly low level - even using an existing framework or engine you still need to know about the basics for many techniques. I knew the steps needed for getting a teapot on screen.

So I went ahead and took the dive - created what is called Corange. For anyone interested the WIP source code can be found on github. It uses SDL and OpenGL and I've been largely developing it in windows using MinGW.

I also decided to decided to develop it in pure C. This was almost the point of the experience - I wanted a project to get my C skills up to a more acceptable standard. In the end, there didn't turn out to be that much stuff in C which was new to me. Most of what I learnt was about objects, linking, libraries, gcc, gdb and all the things involved with actually making a C project. I've used C++ before and to put it lightly I'm not a fan. Perhaps I should have not picked an industry that uses it almost exclusively. Either way there were lots of things I liked about C.

  • Memory Management is fun! I like thinking about stuff on this kind of low level - it helps you appreciate all that is done for you on high level languages, but it also give you a much more distinct view at memory usage. The only thing I missed were some nicities like destructors and constructors, which I could have used in some of my more generic container types. Still - it wasn't too much of a pain. In the end I used function pointers and handlers to give the appearance of generics, which ended up working fairly well, and giving a nice interface on things like asset management.
  • C forces you to keep it simple. I've said before how much I think keeping it simple is the key to good abstraction - rather than strong typing and code beaurocracy. Because doing complicated things in C can be hard, it encourages you to look for simple, effective solutions. No more throwing Dictionaries, Arraylists and extra Classes at a problem - it makes you examine the data flow, which often leads to a better solution.
  • Values are values. Everything is data. No longer do I have to worry about what things "are" - structs are values - pointers point to memory. The nice thing this leads to is that I can also hack in some of the dynamic and functional programming constructs which I love.

There were also some things I don't like.

  • Strings in C are evil. Filled with so many pitfalls in trying to use them. And I had to use them a lot - for any file formats I was parsing. The other thing that haunts me - and I know the reasons why this is easier said than done to implement in C - is that strings should be values. This is just a semantic so strong in my head that I stuggle to see the world in any other way. Even if strings were forced to be immutable and a bastardised functional programming approach had to be used to implement them - I would still prefer this.
  • Namespaces - If your language standard includes a preprocessor definition at the beginning of every header file then you've basically fucked up. As with strings, I understand why it had to be done in this way, but it seems crazy. Luckily I didn't come into any namespace issues, but I was careful to avoid them, and there are some horrible things going on in some well used libraries with regards to namespaces. For a language which is so beautiful, this doesn't seem right.

So Corange is in pure C - feel free to take anything you'd like, even if it is just the vector libraries. It can be considered BSD until I come up with something else. As far as "neat features" goes it doesn't have that many. Asset management is pretty nice and easy, done using filetype handlers. It can render using custom GLSL shaders and also it does font rendering.

Contains a basic (probably buggy and untested) .obj importer and working .dds importer. I'll probably extend it some more - when I have things to be playing with like some stuff for my thesis project.

github twitter rss