Chimera 2: Begin!

Begin!

Today I bite the bullet and learn 3D.

Voxels? Ray tracing? What?

It doesn’t matter.

What matters is a look so amazing that at first you simple can’t take it in and your brain almost finds it difficult to accept. A bit like Little Big Planet. You went “so?” and then you really started to see what was happening before the OMG factor started to sink in.

But first, grasshopper, you must being with the ABC.

Unity? No, not for me. I’m a coder. I cut my teeth on assembler. I will learn OpenGL and I will know what I’m talking about.

It’s frustum, not frustrum.

My current understanding

A representation of a world is created in the computer using geometry, texture and lighting. You then view a portion of this world from what we call the camera position. This view is projected onto a notional 2D plane, which happens to be your screen or a window on it. The depth information that is lost is hinted at because of the perspective transformations applied to all of the geometry used to model the world. In isometric 3D, this perspective is not used. This can give us efficiencies.

The world that is projected onto our 2D view occupies a space called a view frustum. Note, there is no second ‘r’ in frustum. In isometric 3D, the frustum is a rectangular volume. This can offer us efficiencies too. In 3D graphics that preserve perspective, it looks like this

If you’re a bit of a conspiracy fan, you might be reminded of something else

The main thing to note is that the farthest world plane and the camera plane (apologies if this terminology is wrong, remember, I know nothing) are the same size in an isometric 3D view.

Another efficiency I’m going to get is that the draw distance is going to be necessarily small, no matter how much of the screen is covered. This again gives us a lot of efficiency. It also means that the amount of overdraw is going to be tiny, and back-face removal probably unnecessary unless I end up going for lots of layers without alpha.

Onwards!

New Dawn

When I started writing Chimera, I was inspired by the most magical technique of the day, the Filmation Isometric 3D engine created by my hero Chris Stamper. 

You had to have been there. The technique was so far ahead of anything anyone had seen on the ZX Spectrum, that like other staggering advances, it was pretty hard at first glance to take in what was going on. After a while, as the shock was replaced by awe, I set out to recreate the effect. 

I’m not one for saying “no” to challenges. I remember when I was 19, a friend of mine told me to get the Joe Hubbard album and to listen to a particular track. He assured me that once I’d heard it, I’d give up the bass, an instrument I had only just started to play and was picking up some initial proficiency in. He came to visit me a week later. I will never forget the dumbfounded expression on his face as I played the solo back to him. Like Chimera, my rendition was not perfect, or close, but I had proven a point.

I believe we should set high goals. The goals that inspire me are what appear on face value to be absurdly high. The type of boundless goals a child might set.

My first plan with Chimera was to keep the pixel graphics and maybe add a few more skins. I’ve changed my mind. I’m going to go after the most advanced lighting and shading done in an isometric game to date, and I’m not going to be precious about how that’s achieved. If that means voxels, I’ll learn voxels. If that means real-time ray-tracing, I’ll find a way of doing it, but more likely, it will be some cack-handed technique that achieves the results I want.

This weekend, I was planning on learning the basics of modern 3D graphics. I have yet to transform a single matrix in my life, not consciously anyway. I think before I try and break the rules, I should learn some. After all, I was already a somewhat competent assembler programmer when I wrote Chimera, so it would probably be useful if I were to learn the basics of 3D, shading with shaders and whatever the latest global illumination trickery is before I try to change the world.

Don’t tell me it can’t be done, unless you want me to do it.

Chimera 2

A journey of a thousand miles begins with a single step.

Screen Shot 2013 05 20 at 21 56 26

This is of course the Chimera (remastered) code base, but set up with the latest version of Cinder, so getting it recompiled took a couple of hours of fiddling. All good, everything seems OK.

Chimera 2 will be the game I should have made in 1986. Pandora was too soon, I over-reached. I’m going back to my roots and this time, I’m going to get it right.

بسم الله الرحمن الرحيم

Chimera – Mac with Map

Screen Shot 2012 12 02 at 21 22 25

I said I’d update the game, and one of the things a few of you asked for was a map screen. Press ‘m’ to bring up or dismiss the map.

Here’s the cool thing – the game is actually fully playable in the map screen.

Grab the latest Mac build here: chimera-mac-1.1.zip

I’m still working on that bug in the PC version. I’ve tried a few things, so might have an update soon. Apologies for the delay.

Chimera Mac – Remastered

Screen Shot 2012 11 25 at 19 04 00

Chimera 1.0 for the Mac and PC, almost 28 years after I wrote the original, is now available. It’s free to play. This is what modern folk call a Minimum Viable Product. It’s not a very good game, I know that, but it forms the basis for something a lot better, which will contain all the ideas I had for the sequel back in the day, plus some recent ones. You’ll like that I think. Next year.

It’s cursor keys and space bar to play. Look at older posts for debug keys if you want to mess around with it. 

I will of course update this from time to time. I have plans for more audio, skins from the other 8-bit versions and maybe some bonus stuff too. My biggest hurdle writing this again was to stick to the mission. It’s so tempting to tweak something here and add something there. I avoided that for the most part, making the bare minimum of changes, like being able to move as little as you want instead of a block at a time, like the collision system pushing you around blocks, like the improved “event handler” and more context specific terminal help text. 

Underpinning all this is the result of learning some modern C++ (I was one of the first people in the industry to learn it and to teach my team the basics of object oriented programming back in the late 1980s and early to mid 1990s, so the basics were already there). This education will stand me in good stead for future versions that will really be a lot more interesting than this retro experiment.

It has not been easy doing this, but like anything worthwhile, it wasn’t supposed to be.

I have lots of plans, 1.0 is just the beginning of my adventure, aged 46, going on 47.

Download and give me your feedback on Twitter @shahidkamal (please see links below)

Update: PC version available, quit bug fixed in both versions, links below:

Mac version: chimera-mac.zip

PC version: chimera-pc.zip

Chimera Beta (sort of)

Screen Shot 2012 11 18 at 20 39 08

Latest build of Chimera now available for Mac. Will shortly be available for PC.

Most of the sound and feedback text is now in. Instructions follow:

  • WASD or cursor keys move the player
  • Space bar for action to pick up static objects, or combine them with another static object in front of you, or to consume bread or water, or drop a missile in a blue missile room, or access the terminals (which currently don’t tell you much)
  • Arm four missiles to start the self-destruct. You then have 60 seconds to exit via the green room
  • Moving uses energy up faster. If you’re carrying something, energy gets used up even faster. If you’re pushing against a block, that uses up energy. It’s more efficient to move without bumping into blocks
  • Radiators drain your coolant, the closer you are to a radiator, the faster your coolant drains
  • Missiles drain your coolant, as does proximity to an armed missile
  • When you die, hitting the L key (lower case ‘l’) will reLoad the game

Debug mode can be entered by pressing the ‘/’ key. I recommend playing without debug, but here are the keys anyway:

  • WASD moves you a room at a time around the map, cursor keys still move player as usual
  • ‘e’ replenishes your energy, ‘c’ replenishes your coolant
  • ‘r’ resets you to the first room
  • ‘m’ gives you a missile
  • ‘t’ gives you the torch
  • ‘k’ clears your inventory
  • ‘p’ places a missile, or rather, just increases your placed missile count
What’s left?
Music
Help text on terminals
Bug-fixes, tuning and a little polish.

Get the Mac build here: chimera-mac-0.5.zip (This version should work on OS X 10.6 Snow Leopard and above)

Get the PC build here: (coming soon, currently a bit buggy.)

Update on PC build:

I’m hitting some issues with the PC version, primarily audio related. Theoretically, a recompile should work. In practice, I get crashes on audio playback and it might be because my version of the Cinder library is not up to date. I’ll have to look into that. Bear with me, it’s going to be a few days. The Mac version is smoother for some reason, even on slower machines. I’ll look into that.