Wednesday, August 31, 2011

Stand clear, doors closing...



  • The scale change actually broke all of the door code. Got this happening again, fixing several bugs along the way
  • Door, decals, lights and switches can be linked together. So toggling a switch can change an actor's model, trigger events, etc. For example, the terminal in the screenshot changes the decals on the floor, the tick/cross light, changes the light from red to green, plays a sound and opens the door...then does the opposite when the switch is toggled again.
  • Added a fudge factor to the shadowing code. This fixed a lot of issues with the shadows.
  • Changed the level select screen to be a list of levels, rather than the 3D island map. The island map is much nicer, but would take a fair bit of effort to change, make look good, etc.
  • Many under-the-hood and editor improvements.

Wednesday, August 17, 2011

This is a triumph...

A quick update with a couple of pics of the first map. Its a Portal parody. My original idea was to have the whole first act (1/3 of the game) as training levels and it would be one big Portal parody...but when I went to make the maps, well, let's just say Portal is rather bland and I decided it was overkill to have that many training levels...best to just have one and get on with the story!

I have planned out an interesting escape story of act I. Each map will parody classic games (without cloning them) ... I was always looking for a way to inject some humor. I think its a great way to tell my story.

Anyway, I will keep the other maps under my hat ...until the maps are made anyway. Enough of me rambling, in to the pics...

DEMII in her Relaxation Vault

Multiple Shadows!!!

A matter of scale

Wow! Has it been a month, already?

Anyway, just as a quick update of my progress, I have made some major changes...

1) New map editor written in C#/XNA. This is speeding things up. Its amazing how much more you can produce when you don't have a slow, clunky editor killing your creative buzz.

2) Shadows! After putting it off for ages, I decided to attempt adding shadows to my HLSL shader code. After 2 days of coding, I finally got it happening...and it was worth the effort!
Basically, the technique I am using is called Shadow Mapping. It is fairly straight forward: Draw the view from the lights' point of view, but only store the depths and store this in a shadow map. Then, draw from the camera's point of view, testing each pixel against the depths in the shadow map. If the light is farther away than the entry in the shadow map for that pixel, then something is closer and it is therefore in shadow.
Of course, this is drawing an extra frame per light. It has reduced my framerate down from 60fps to 25fps for just 10 lights. Not bad for unoptimised code. I have a few tricks up my sleeve to get the framerate back up.

3) I have changed the scale of the game, relative to the player. Previously, I was working on a tile of about 1 metre square. Only one thing can occupy each square (well, 2 things: a block and an actor). It meant that all detail had to be in the model, and I found myself making thin and thick walls, etc. After playing Sega's Spiral Knights, I can see that it is much better to reduce that scale. So, the character models are bigger, filling the square...and the block models are smaller, half the size. Of course, this makes the maps smaller, but I may introduce several maps per map (if that makes sense), such as elevators that take you to the next map. Would also be good for hiding secret areas, etc.

4) I have added a scale attribute to blocks, so I can have the same block as a 1x1 or a 2x2 (or any size really). Will make the game lighter: why draw 4 blocks when I can draw a 2x2.

5) The point of view has changed to be higher. This is so you can see more of what's going on, and to stop the camera being blocked by walls as it will be well above them....it also negates the need to draw ceilings.

Sorry that there are no screenshots for this update because I am working on the final solid version of the first map. The changes have lead me to redesign sections of the game engine (which is a good thing). Some things need a rethink (such as the now 1x4 doorways), and I want to polish things up before releasing screenshots. So, maybe in a day or so....