Chimera 1.2 – Some Build Notes

Screen Shot 2014 08 17 at 17 57 37

Move: WASD keys and cursor keys

Space Bar: Take, use, drop, combine

‘M’ key: Map

Shift key: Activate Teleport view.  Experimental. While holding down the shift key, you get a view of the room you’re facing if you’ve visited it. If you haven’t, you will get a random mess and if you then hit space bar to activate the teleport, you will die. If you are going to land in a room you have previously visited, then so long as you are not going to land in a block, the teleport will be successful. You’ll be able to cover large distances pretty quickly this way. Note, activating the teleport view uses up a lot of energy.

Energy and coolant are constantly running out

More load and movement depletes energy and coolant faster

Radiators and missiles deplete coolant very fast

Loaves of Bread and Mugs of Tea restore energy and coolant respectively

Terminals give some basic hints

 

Debug Mode: Tab key (toggle)

Place 4 missiles to activate self destruct, then find the green room to escape.

You can do lots in debug mode – pressing ‘e’ replenishes coolant, ‘c’ coolant

Also in debug mode, WASD moves you around the map

I won’t give too many other things away on debug mode

 

Combine weird objects to create missiles. The Spanner needs to be combined with a Bolt. The Bolt is hidden near the bottom of the map, behind an electric fence.

 

This build is a lightly modified 1985 game sitting on top of a much more modern engine. If you look in the Configuration folder, you’ll find lots of JSON files. Fiddle with these at your own risk, but you can change an awful lot, including the graphics, rooms, puzzles, etc.

 

This build is somewhat buggy, but I’d really appreciate you reporting everything you see in the comments on this blog. Please also sign up for the newsletter. It’s infrequent and it’s going to be about notifying you about important updates.

Chimera 1.2 Mac Release

Screen Shot 2014 08 16 at 21 00 06

A build of Chimera is attached. It’s my second remaster of the 1985 original. Note, this is not Chimera 2, the reboot. This just reflects some of the work I’ve done on underpinnings that will allow me to dramatically scale up the original game to something that actually has some gameplay in, has much more depth, replay value and yet still be quirky. Chimera 2 will be build on top of the new underpinnings. This is 1985 clothing on top of a much more modern game engine. There is still a lot of work to do.

I’d love your feedback. Please post it in the comments below. 

If you’re at all savvy with the Mac, you can open the package and alter all of the files in the configuration folder if you’re brave, starting with config.json – this will even allow you to change the graphics to the C64 version (without palettes, so it’s a pretty dull look) using the “Images File” tag. Change it to “images_C64.json” or “images_Spectrum.json” depending on your preference. Lots of other variables for you to play with. All that good stuff is in the Assets folder. Play around with it at will. The most fruitful immediate gains will come from playing with the Configuration files.

Chimera 1.2 for Mac can be downloaded here

Biggest obvious change to 1.1 is a teleport feature. Hold down shift and you will see an overlay to the room you’re facing, but only if you’ve visited it. If teleport will get you to the same position in the facing room without hitting a block, then hitting the action key (space) will get you there. The more you visit a room, the clearer it will become in teleport view. You can cross long distances with two or three hops using this. So, hold shift, then space when you’re ready. If you teleport into a block or a room you haven’t visited, you’ll die. 

Another smaller change is that you can drop objects that aren’t energy or coolant.

WASD or cursor keys to move. Enter debug mode by hitting Tab, but try to avoid it if you can.

Space for action (pick up, drop, use, teleport)

You can see a map by pressing ‘M’

Known issues:

  • Missile rooms are a bit messed up. 
  • Collision is glitchy
  • Character sometimes keeps walking regardless of input
  • Doesn’t seem to work on OS X Yosemite (10.10)
  • Possible to drop objects into blocks

So, Chimera 1.2 for Mac can be downloaded here

Please do leave feedback below.

Reasons

Chimera was meant to be an homage to Knight Lore. I had two motives to make Chimera back in December 1984.

  1. I was 18 when Knight Lore came out having recently released my C64 version of Jet Set Willy. I was young so I thought my budding “career” was already over. It was another video game for me, or bust. And when I say bust, I mean bust for life.
  2. Knight Lore was a glimpse into the seemingly impossible. The naïve young me saw it as a challenge. I had to know how it was done – and I had to do it myself. Only a handful of games have had the same effect on me. They include Star Raiders, Ultima Underworld and No Man's Sky. I really cant think of any more right now and if I'm ruthless, it's really only Knight Lore and No Man's Sky. I was inspired. Deeply, indelibly inspired. How often do games come out that not only take their place in the pantheon of greats, not only do they inspire a generation, but they divide time into “before” and “after”.

After I made Chimera on the first four 8-bit platforms, I think I lost my way a bit. I had so many options. I just didn't make the right decisions. I was young. I didn't know what I had until it was gone.

This is perhaps recklessly honest, but I don't want to do “this” the easy way. I want to write the follow-up to Chimera the best way I can. That means C++. Everything from scratch. As close to the metal as I can get these days.

A lot of people, quite rightly and logically have suggested that a man with a day job as demanding as mine should use all the help he can, perhaps using a tool like Unity or GameMaker. I like both of these tools, they're incredibly empowering, I would recommend them to most people, and I will use them for other projects — just not for Chimera.

I want to go as hardcore as I dare. I want to drink deeply from the pool of OpenGL and seek wisdom from the gurus of GLSL. I want to make this game look fantastic and play in a way that affects people. Only then do I want them to say “not only was this game made by one man, but he did it with ridiculous constraints”. If I'm shameless, I want a young, aspiring developer to look at what I've done, and without knowing anything about me at all be inspired to make a game like it, or better.

There is no better way to live and yes, it's the only way I know.

 

Taking a Step

Screenshot 2013 10 28 20 05 19

The version of Chimera I wrote last year was a C++ rewrite. It had a few minor changes, like Knight-Lore style collision with room exits, and a map, but it was essentially the same game. 

As I lay the groundwork for the sequel, some of the assumptions of almost three-decade old game have to be discarded. There was no saving or loading, so I didn’t have to worry about intermediate state. I wrote the remaster with that assumption in mind. So now I’m stripping the guts of the game out to allow saving and loading of arbitrary rooms. For this I’m using XML. I will probably switch to JSON at some point, but XML suits me just fine for now. I’m also redoing the Entity class to allow it to be regenerated from “DNA”. This means I don’t have to save the entire state for the object, much of which is unnecessary anyway.

I previously had the concept of a “RoomObject”, which differed from “Entity” in that it had some redundant extra information and pointed to an Entity object. Its only purpose was to allow non-background block objects to be manipulated more easily. There was no reason this couldn’t be an Entity, so that’s the first big change. No more RoomObject structs, everything is now an Entity. Even a Room is derived from the Entity object. The change has been made, but now no objects are being displayed at all, so that needs to be fixed.

A minor problem that I’m sure will be fixed soon is that the Cinder library I’m using is not displaying text under OS X Mavericks.

I’m smoking Ashton’s Smooth Sailing in a Parker pipe I bought from eBay. I was planning on listening to Led Zeppelin, but I’m going silent this evening.

 

Particles on the GPU and Winning

These last couple of days I’ve decided to dive into what might be the most important technique in games of the future, computing on the GPU. 

Now like you, I like particles. I remember doing a simple 2D particle system back in the Amiga days. It was basically a star field on the Amiga. Not really 3D other than it looked it. (I always preferred faking). I couldn’t draw a lot of particles (stars) before it started chugging. Then years later, in the mid 1990s in fact, I worked on a particle system again on the PC. This came on the back of numerous PC related tasks, one of which was to convert an undocumented, unportable video decoder written in assembler that only worked on a 320×200 screen to one that ran in C on a 640×400 screen. In a weekend. Which I did. Should have seen the look on the assembler programmer’s face when I turned up on Monday (I was the Producer) and demonstrated that. He’d previously said it couldn’t be done. (Seeing a pattern here?)

So anyway, I worked on a particle system on a PC that chugged at a thousand particles, but was OK with 400 or so at a decent clip. I was not happy.

And so today a few thousand particles on a CPU on top of  everything else is good, but it’s not good enough for me. I’m thinking of hundreds of thousands of particles. The only way to achieve that is to do them on the GPU and exploit the enormous parallel compute power. Particles lend themselves to parallelisation of course. 

So I’ve been looking, learning, rewriting, testing, writing shaders, understanding shaders, and I’m getting somewhere.

Computing on the GPU is achieved through a technique called FBO ping-ponging. It sounds tough. It’s not all that tough. The reason you do this is because you cannot read from and write to a texture map at the same time. Why texture maps? We’ll come to that, but suffice to say they’re no longer acting as texture maps.

You use a texture map to store other data, in our case, particle data; like velocity, position, time to live and so on. You then read this data, perform your computations and then write out the modified data to the write-only texture map. You then flip the FBOs and carry on. With my test program, I am initialising from the CPU, but there is no reason why you can’t initialise from the GPU and that’s what I’ll be doing at some point. Ping-ponging textures like this is the only way you can maintain state in what would otherwise be a stateless architecture. Exploiting the heavily parallel nature of modern GPUs is what gives these techniques such extraordinary performance over doing them on the CPU.

I have a lot to learn. Ray-marching, distance fields, ray-tracing, ambient occlusion in real time and other forms of optimised global illumination. It sounds heavy, but it’s just process and like anything else, if someone else has done it, you probably can too.

In the meantime, I am going to spend some more time studying ShaderToy and seeing just how they achieve such incredible effects. I’m planning on having Chimera looking amazing. At the beginning of the week, it was a crazy, foolish dream. Tonight, it is within sight.

One Step Beyond

Never, ever, ever give in. Sometimes, I accept that the day is done. And that the battle continues the next day. It hasn’t been lost, it’s just going to go on another day. Then I carry on. And on. And on. 

I’d made little visible progress tonight and I was about to call it a night. Then I pushed past and had the breakthrough. I now have the original Chimera drawing in 3D. The blocks are placeholder and all the same, the camera needs adjusting, but it’s there. Lighting, shaders, perspective, 3D, C++, 3 days.

Never give up. 

Push through.

Win.

Screen Shot 2013 05 29 at 22 28 27

Screen Shot 2013 05 29 at 22 28 37

Screen Shot 2013 05 29 at 22 28 39