Baby Steps

11:39 AM

Baby Steps

I just added this:

void Basic3DApp::draw()
{
    // clear out the window with black
    gl::clear( Color( 0, 0, 0 ) );
    gl::rotate( Vec3f(0,1,0) );
    gl::drawCube(
             Vec3f(getWindowWidth()/2,getWindowHeight()/2,0),
             Vec3f(100,100,100) );
}

Now the cube is rotating in 3D space.

I have a solid cube rotating about the Y axis. This I achieved before lunchtime on my first day of experimenting with 3D in C++

Ch-Ch-Ch-Changes

Chimera Screen Shot 2012 10 28 at 23 43 09

Chimera Screen Shot 2012 10 29 at 00 00 35

As you can see from the above, that’s pretty much most of the game right there.

I have objects, static and animated. I have food and water, which in a nod to sanity are relabelled coolant and energy, though I will still be using bread and a mug to signify those. The graphics are the Spectrum ones, extracted from a bitmap recovered from the original by sokurah – I used Flying Meat’s Acorn to combine the masks and the original image into a single transparent PNG, quadrupled in both axes to give a 128×128 sprite.

Animation works better than the original in two ways. First, it continues for the player even when he hits a wall, so it’s independent of movement and second, movement is now free of the “one block at a time” limitation of the original.

The other thing I’ve put in is the Ultimate method of pushing towards an opening for collision. You can use blocks to guide you around the map now and it feels a lot more natural.

The display is also compressed, and I’ll probably keep it that way, using the edges to display information (but it will be more pretty than in the shot above)

The adventure handling used to be a huge “if/then” block of Z80 or 6502. Now it’s all text, making it easier to put that together.

I’ve got combinations working, so if you combine the spanner with the bolt, you get the missile.

I’m not going to do an exact remake, it’s already an approximation, so there will be a different text feedback system, probably a more “modern retro” style if that makes any sense at all. I will include the original sound for the scream and title, but I will also rework those. My voice after all, is still my voice. There will be more sound, a bit more chip music of sorts too. The biggest change will be in how the game ends, and there will be many terminals, which will feature lots more story, including artefacts from the original development of the game, including the full sprite editor listing – the Z80 I wrote in early 1985 to get the whole project going in the first place.

The one thing I’m struggling with at the moment is whether to allow dropping of objects. You could drop missiles before (well, you had to, it was part of the game) but I’m wondering if I should allow dropping of objects. The current version allows that, but there’s a bug that prevents those objects from being picked up again, no biggie.

Let me know what you think.

Why No Updates?

You’ve not had too many updated from me recently.

After that bout of `flu a few weeks back, I’ve had a couple of episodes of stomach trouble, the most recent starting Wednesday and easing off today. I’ll spare you the details.

I have snatched the odd bit of progress here and there, mostly in planning and outlining. For example, I’m thinking about and making notes on the best form of class hierarchy for display objects, which makes me think about a lot of other areas too, including Interface classes to keep the main body of the code detached from the hardware details, and event systems, singleton patterns, and a bunch of other things I’d not really been familiar with given my long absence from coding.

I’m glad to say it hasn’t been completely overwhelming, but given my recurring health issues, I have to be satisfied with small gains.

Thanks for those of you still bearing with me, there will be visible progress soon, insha’Allah.

 

Developer Diary: Tuesday 28th September 2010

Chimera Supervision

I had a pretty grim day at work today, so it was vital that I didn’t let that affect me in the evening. It did. It slowed me down and made it harder for me to really focus. I didn’t let it put a halt to proceedings, I know that’s fatal.

So I cleaned up the code as best I could. I put cross-hairs up so I could get everything aligned. Can’t believe I didn’t do that before. Now everything is drawing where I want it to draw.

I think I need to do collision detection tomorrow.

Now, I promised I’d talk about design, so here it is.

The Good Stuff

There are three essential themes to this game:

1) Conservation of Energy

2) Materialism vs Energy

3) Constant feedback

“But it’s a maze puzzle game!” I hear you say. And so it was. You also know the subheading for this game. And I do indeed aim to get it right, this time.

Energy Conservation

Energy conservation is an important theme in any game, so that’s not new. What I want to do in this game though, is make it very explicit that everything you do costs energy, except when you’re in the Energy state. (I’ll explain that shortly). Moving forwards costs energy. Rotation costs energy. Retreat costs energy. Climbing costs lots of energy.

You will get opportunities to replenish your energy when the game is in the Energy state.

Materialism vs Energy

I want there to be a constant interplay between the two states or phases of the game. On the one hand, when the blocks are solid and material (as are you), energy use is expensive, but material effects are higher. For example, if you trigger an explosion, it will cost you some energy, but it will also destroy blocks and therefore have a big material effect.

When the ship is in the Energy state on the other hand, you too are Energy and you can freely move into and out of form and merge with the objects of the game. You can then “possess” the objects (some of which will actually be characters, like robots) and do what you will with them. Be careful though, because although you don’t use energy in this state (in fact you recuperate), if the phase turns to material, you are destroyed if you are merged with another object.

Constant Feedback

I want the game to always make it very clear when you are doing well and when you’re doing badly. The game has an intrinsic rhythm of play, indicated by some kind of visual indicator (undetermined) and audio (probably the heartbeat from the C64 version or similar). If you play to the rhythm of the game, the scoring multipliers are massive. I want scores every time you spend any energy, every time there is a composite side effect, and negative scores every time something hurts you. On the other hand, in the Energy phase, things are a lot more chilled, and there is no scoring, only contemplation, recuperation, reconfiguration and reimagining.

What do you think of this?

(Oh, yes, I did a version of Chimera for the ill-fated SuperVision handheld in 1991 or thereabouts. Powerful, nice 6502, but bulky. And no, I didn’t have anything to do with that cover. Why do they all think it was a robot? It screamed! Robots don’t scream!)

 

 

 

 

Wannabe Developer Diary 23-09-2010

xml-data-loading.png

I had to overcome some serious hurdles today. The biggest was my state of mind. Exhausted after a short bike ride and irritated at the new neighbours who are on the roof constantly and don’t care who they disturb, even at this hour, I sat down in front of the machine finally at around 8ish. I didn’t make any headway until 9 when I decided that I wasn’t going to play Call of Duty, I wasn’t going to mope, and despite feeling nauseous, I wasn’t going to take the easy option.

I knuckled down and I got stuck into the room loading XML code.

I had to learn quite a few little things today, and in aiming for full room-display using my Blocks class, I almost overshot. I should have been happy at getting the basic roomdata.xml file parsed correctly. That was a big achievement. I wanted more. So I went for Block storing (didn’t quite pull off the STL list, bodged it with the usual C array code nonsense) and then Block display.

As you can see from the extra blocks, some pink, some blue as well as grey, I’m now loading, parsing and displaying roomdata correctly. This is a breakthrough that I expected would take a few days. I’m very happy.

It’s late, I’ve been unwell all evening, I’m exhausted, but I’m exhilarated. That’s a lot of progress in one evening.

Progress – 9:40pm

Screen shot 2010-09-01 at 21.41.19.png

This is funny. I need some graphics for the player sprite. I don’t have the patience for drawing, but what I do have is an Internet connection.

So I googled screenshots of my 25 year old game and found a couple of screenshots with the player character in them. All I have to do is extract them, scale them up a bit, do a reflection for the up and down sprites and I’m good to go!

Other news, scaling works pretty well too, so I’ll have to have some of that in the game, probably for the score effects. I want to have the score behave like a pinball machine. Lots of noise and feedback.

Oh and lots of generated sound, old school charm, has to be done. It won’t be a SID chip, but it will be good.

chimera-sprite-xp.png

Developer Diary

Firebird weren’t initially that keen on an Amstrad version of Chimera, but I told them I could do it in a week and waited to hear back. Colin Fuidge was in touch shortly after and asked “Remember you said you could do Chimera on the Amstrad in a week?”

“Errr, yeah…”

“Well I’ve got C&VG lined up to do a diary feature on it. When can you get started?”

And that afternoon I went to Tottenham Court Road to buy an Amstrad CPC6128

amstrad_cpc_6128.jpg

And I had to start learning how to program the thing. I was also using the CPM Assembler (if memory serves) because DevPac wasn’t quite ready for it. Still, it had a built-in floppy disk and that was fantastic after the hell of the Spectrum and C64, because it was actually quick. Helpful to have speed when you make lots of mistakes learning.

The Amstrad’s screen was better than the Spectrum’s, much cleaner, but not quite as vivid for some reason, despite not suffering from attribute clash. I had the choice of going for 160 pixels across in 16 colour, or 4 colours at 320 pixels across. I went for the latter, which allowed me to re-use the graphics from the C64 version with some re-mapping. Unfortunately, the screen was twice the size of the Spectrum, so I had to use what I later discovered to be a similar technique to the one that Chris Stamper had used in his Filmation system. That gave me a bit of speed back and it ended up being faster than the Spectrum version for the most part.

As for the developer diary, well, it’s been preserved by the awesome Rich Hewison at The Bird Sanctuary. If you want to know if I achieved my target from quite literally a standing start, you’ll have to read the diary. I must warn you, the guy who wrote it sounds very immature.

A quarter of a century on I am half way through my week off and I’ve only just managed to get some code working. In the old days, you wrote a couple of lines of assembler and you had something on the screen. The openFrameworks library gave me a glimpse of something not a million miles from that scenario. Obviously it’s a complete illusion, I’m about as far away from the metal as I need to be and that’s no bad thing.

Last night after packing up, I spent an hour or so looking at the ofxBox2D add-on. Do I need physics for this? Is it overkill? Probably. I’ll leave it for now and focus on trying to get the Room Editor a bit more functional.