Friday, December 31, 2010

New game concept

I recently finished Alan Wake, a game in which the enemies are weakened by light. The player uses a flashlight, flares and flashbangs, and seeks out lights in the environment, turning on generators etc. to help defeat the Taken. But I just remembered an older game, The Darkness. Based on a comic book, the protagonist has several powers that he can only use in the dark, the player must often shoot out light bulbs and turn off light switches etc. to give him an edge over the enemies. In other words, similar concepts approached from different sides.

And then it occurred to me, why not take the same idea and put it in a Left 4 Dead kind of game? One team of players control humans trying to escape or transport cargo or find an artifact or protect civilians or some other mission that has them traveling across or defending an environment, while the other controls the Darklings trying to kill them. All using light-vs-dark mechanics. The environment should have light and dark areas, possibly with changing lighting conditions to make the combat more dynamic.

Darklings are strong and fast and have various powers, but are weak and slow and lose some powers in the light. Humans have weapons and flashlights; if a Darkling can catch them by surprise they have the edge but if a human catches them in the light they are at a disadvantage. Flashlights have less effect than larger environment lights etc. The game could use many players per side, or the Darklings have minor AI-controlled darklings for gameplay similar to Left 4 Dead.

There you go, free awesome idea. You're welcome, games industry.

Sunday, December 26, 2010

Soul Drinker

This is my first real conversion. A Space Marine of the Soul Drinker's chapter. The idea for the conversion came from my brother, then I remembered a bit from the second Soul Drinker's book, The Bleeding Chalice:
"We've had to take two Marines from Squad Luko off-duty entirely - one has claws that can't hold a boltgun and the other is growing a second head."

He / they were made from two AOBR space marines, which is why the right arm is in that slightly awkward position. I used bits from the Black Templars upgrade kit for the sword, pistol, bolter and shoulder pad (I filled most of the chapter symbols off but the parts are still recognizable from the chains). The base was ready-made, I don't remember where I got it from. I magnetized the left arms and shoulder pad to be interchangeable, and there's also magnets in the base. This was my first real use of green stuff, and it left something to be desired, but fortunately most of the crappy bits are hidden from normal view by the boltgun and backpack.

Typical pose. I chose two different helmet designs to make it look less symmetrical and more chaotic.

A shot taken without the camera flash. The arm can be rotated to vary the pose.

Shoulder pad. This was made by filling Black Templars symbols off a shoulder pad and green-stuffing a chalice symbol. The original shoulder pad actually had a skull that I cut off then later decided to try to blend back into the chalice. It didn't work very well, but it's still a little more interesting than just the chalice on it's own.

Backpack. The cables in the middle came from a flagellant from the Witch Hunter's inquisitor kit.

Right view with the bolt pistol arm.


The magnets on the arms and shoulder pad are 2mm diameter. If I was to do it again I would use larger magnets, if I had only relied on the 2mm magnets I don't think it would be strong enough. However I used a larger magnet recessed in the body and covered it with greenstuff except for a socket for the arm magnets. The combination of the stronger magnet and the tight-fitting socket holds the arms reasonably well.

I put a lot of effort into this one, not just in conversion but also in painting. Overall I would say this is my best work yet. The highlighting over the purple is a little too subtle while the highlighting over the black might be a little too obvious. I had some trouble with the gold and ended up using too many layers but in the end it turned out OK. I think I should have thinned the paint a bit more before painting the sword as it doesn't look very smooth, but it's not too bad and the "power-lines" look decent. The purity seals are better than my previous efforts - I managed to paint some pretty fine lines on the seal on the boltgun, I wasn't even able to repeat that for the one on the leg.

I've left him glossy for now as it seems to bring out the colours better and I've been having trouble with my attempts at matt varnishes. You have to apply matt varnish very thinly or it becomes glossy, so I'm planning to get some acrylic medium and use it to thin down some matt varnish so I can apply it more generously and hopefully get more even coverage. I might use it on this guy if the technique works, we will see.

Monday, December 20, 2010

Progress

I've been doing a little work on my engine these past couple of weeks. I wrote two different forwards renderers, but they both have trouble with the same bug in GLSL that I keep running in to; trying to access light data using a uniform variable just kills the whole shader. No error messages, it just doesn't do anything. I'm not really sure what to do about that, friends are suggesting switching to CG instead of GLSL, I might have to look into it.

Meanwhile I've also made some changes to my asset management code and put some more work into my Blender plugin. I cleaned it a little and added a material file exporter, I'm hoping that soon I'll be able to export most or all of the files used by a typical object in one go - currently I have to manually export each file. I'm starting to fill the screen a little vertically, I'm still undecided on whether to keep everything on one screen or use a lot of pop-ups for options:


In related news I'm looking forwards to the new Sony gaming phone; the Zeus Z1 they are calling it right now, though the theory is it will be called the playstation phone or something to that effect. Finally, true gaming controls in a phone - plus it has a touch screen so it can handle all the "casual" games currently out. I hope to be able to port my engine to it, perhaps that will give me a more tangible goal.

Wednesday, December 1, 2010

Holidays

So I'm finally on holiday! At last, time to relax, do some painting. Just finished my first Tallarn, which is actually the first time I tried to paint human skin, and a human face. Dry-brushing just didn't cut it for the face, I had to resort to actual manual highlighting (until now I've only highlighted edges), it wasn't a resounding success but it came out better than I expected. I left the arms dry-brushed out of laziness, and also to help compare the two in the finished article. The eyes also are not great (they look better in this picture than in real life because of the angle). The spray paint I used for an undercoat let me down, as a result the wash over the clothes pooled together in places because it wouldn't stick to the paint underneath (also my choice of colours for the wash were not perfect).

This was also my first attempt at using pre-cut clear bases. I used two 6mm x 0.5mm magnets under his feet, but they aren't strong enough, next time I'll have to use 6mm x 1mm, hopefully that will do it. They are a little obtrusive, but when you put it on a table from a few feet away they're barely noticeable.


I've also been trying to write lists for my Space Marines, Daemon Hunters, and Witch Hunters. It's actually quite a balancing act; I'm not looking for a competitive build as much as one that lets me use all my favorite units at the same time (hopefully in useful ways of course) - in other words it's driven by the models rather than the rules. However, one cannot help but notice certain opportunities - for example, the "six Dreadnought" build or the "all Space Marine Bikes" build. My favourite so far is the "Immolator Spam" build. So here's my take:


HQ:
Palatine (Bolt Pistol, Chainsword, Frags), 5 Celestians, Immolator - 168 pts.
Palatine (Bolt Pistol, Chainsword), 5 Celestians, Immolator - 167 pts.

TROOPS:
5 Storm Troopers - 50 pts.
5 Storm Troopers - 50 pts.

ELITES:
5 Celestians (2 Melta Guns), Immolator - 150 pts.
5 Celestians (2 Melta Guns), Immolator - 150 pts.
5 Celestians (2 Melta Guns), Immolator - 150 pts.

FAST ATTACK:
5 Dominions (2 Melta Guns), Immolator - 140 pts.
5 Dominions (2 Melta Guns), Immolator - 140 pts.
5 Dominions (2 Melta Guns), Immolator - 140 pts.

HEAVY SUPPORT:
Immolator - 65 pts.
Immolator - 65 pts.
Immolator - 65 pts.

TOTAL: 1500 pts.


11 Immolators and 7 Faith Points by my calculations, and everyone starts in an Immolator (plus one extra). Not the kind of list I'd use, but I find it amusing to contemplate. Immolators can move 12" and still fire their heavy flamers so it doesn't take long to start burning infantry, and also there's six units with two meltas each, so a fair bit of anti-tank. And with the small unit sizes things like The Passion and Spirit of the Martyr should be fairly reliable. Having said that, there's very little assault power, too many kill-points, and only two units of very weak troops wont work too well for holding objectives. Trading a couple of meltas will buy Cannoness (es?) instead of Palatines, which gets you two more faith points, or you can give the Storm Troopers Meltas or Plasma Guns instead. At higher points levels you could buy more troops and/or trade Storm Troopers for Sororitas, which would help a lot. You can probably also buy some Rhinos or Chimeras for even more vehicle saturation. Now, how about that "Nine Penitent Engines" build...

Saturday, November 13, 2010

Blender plugin

I spent some time getting normal maps working, which is a little harder than it sounds, but after that I got a little busy and didn't do very much at all. And then today I did some work on my Blender export script. Just a couple of small changes really, but I would say the plugin is as complete as it can be right now. The animation exporter is not final, but I need to improve animation in the engine before I can finish the script. I will also probably add edges to the mesh exporter, but I don't use them yet in the engine so it can wait.

I'd post some pictures of normal mapping in my engine but I'd rather leave it until later.

Thursday, October 21, 2010

Wet Ork

So a few weeks ago I was experimenting with clear epoxy for transparent bases. I painted thiws Ork to try and make it look like he's wading through water, using modelling snow for foam. Unfortunately I was careless and overdid the snow, I don't think the end result looks very good. If I ever try again I'll try to be more subtle.

Monday, October 4, 2010

GLSL

I've finally started to read up on GLSL. It's nicer than I expected, I wish I had looked into this years ago. It's surprisingly easy to do some pretty cool effects - at least in a simple standalone test program. I am starting to realise, however, that fully integrating shaders into a game is quite a lot of work. And unfortunately I'm having trouble comitting much effort into my engine these days.

Anyway, here's a screenshot of a simple shader to compare basic lighting in the fixed pipeline with shaders. (The sphere on the right uses a shader, in case it wasn't obvious).

Tuesday, September 7, 2010

Transparent bases

This ork is my first experiment with a transparent base, which I feel is less obtrusive on the tabletop. Personally I feel that single figures with well modelled bases can look amazing on display, and units with matched modelled bases can look fantastic on display if they're in a matched movement tray, but on the tabletop modelled bases just look strange and out of place to me, I prefer unadorned black bases (which to an extent we can accept as being a "shadow"). However I think a good transparent base could look even better, so I'm experimenting with making my own.

This one wasn't too bad. I embedded the model in the transparent epoxy, which I'm not sure about - the next model will be pinned to the top normally so I can compare. The matt spray-on varnish "whitened" the surface a little, so I coated half of the base with a layer of gloss varnish to see the difference. As you can see here, it helped.

Also, there's four small button magnets embedded in base (I currently add magnets to the bases of all my models for transport), they look a little out of place but it's not too bad. There's actually a pair of magnets in his feet as well but this is tricky to do and weakens the model - a second ork I made with magnets only in the feet broke at the ankles. Though the attraction to metal was weaker, it still didn't move around (much) when placed it on a tin and shook it up, so I might try again, but not all model have feet / legs big enough for good sized magnets.

Here's a normal "plain-Jane" based ork for comparison:

Wednesday, September 1, 2010

Realism in games

There's many unrealistic elements of video games that we happily ignore, either because we know it's too difficult (or just not worth the effort) to make it more realistic, or we know that making it more realistic would not make it better, often it makes it worse.

But to an extent that's subjective - some people like realistic but complicated games, at least in certain genres. Take flight simulators for example. I think it's abaout gameplay first, but if an effective gameplay mechanic is also realistic, that can help immersion and enjoyment. Take for example the way current shooters often limit the number of weapons you can carry while older games generally allowed you to walk, run and jump while carrying many times your body weight in firearms. Limiting your carrying capacity wasn't done just because it was more realistic; it was and is done because it forces you to make strategic decisions about which weapons to carry. In some games this is an advantage.

So whenever we look at something unrealistic in a game, we have to consider if it needs to be improved or whether we should just maintain suspension of disbelief. However, today I had an idea that just might work.

In most shooters, when you reload a half-empty clip you don't lose the ammo that you dump (even though you clearly see it drop). This makes sense. But consider: if you tap the reload button in the middle of a firefight you drop the clip and reload as quickly as you can, losing the rest of the clip (though it falls to the floor and can be picked up later). If you hold the reload button you are treated to a more longer animation in which the character removes the clip, visible stowing it away thus keeping the ammo, before replacing it. This combines realism with an added layer of tactical decision making in-game. I think, for a modern-day shooter like Counterstrike, this could work. I'm planning to try it in my game anyway.

Of course it still doesn't explain how the ammo is consolidated from the half-empty clips into full ones, but hey; it's just a game. Right?


Also, I'm starting to suspect that I talk too much.

Tuesday, August 24, 2010

Animation more sorted

That thing I said yesterday about the exporter only exporting a single pose at a time? Solved. Actually took much less work than I expected, and now I can export an entire animated action in a single file. Might have to tweak it later after I tweak how the engine handles animation of course, but that's the nature of the work. It's an iterative process.

Monday, August 23, 2010

Animation sorted

I recently started to spend time on my engine again, and have finally solved the issues with importing geometry and animations from Blender. There were some problems before that I had not noticed because I had not tested enough, but things seem to be running quite well now. I've also cleaned up the code a bit, and improved the export scripts, making them more user-friendly. The animation export script currently only exports single rig poses though, so the next step will be to export an entire "movement" in one go. After that I think I'll look at graphics again, try to throw in some fancy effects.

Current progress:

Bind pose

Posed bones. It may not be obvious, but this is supposed to happen.

Wednesday, June 2, 2010

Quick update - Rolling Bones and Crimson Fists

So I've made some progress in my game engine. I've gotten the animation to a point that I can live with for the time being, though I will be changing some elements later. The problem now is getting the data. I considered trying to use existing formats, but for now I'm sticking to my own as I cannot find an existing format (supported by Blender) that I like. Instead I'm writing tools for exporting from Blender. I've written an exporter for my mesh format, though it doesn't export edges or vertex weights yet (coming soon!). I've written an exporter for the rig, but I don't understand what Blender is doing with it's matrices - the bones seem to be rolling or something, and my rigs are not exporting correctly. Anyway, I'm shelving my engine for a short time while I concentrate on Java, which I need for work. Hopefully I'll be able to pick it up again soon.

In the mean time, here a couple of Crimson Fists. I had some trouble with the transfers, but otherwise I'm happy with how they turned out. Their armor is much lighter than normal for Crimson Fists, but I prefer it as it looks better under normal room lighting. I settled on Crimson fists because I like blue for Space Marines, but Ultramarines are pretty much the standard, so I wanted something different (some people always have to be different...). I considered making my own chapter, but I couldn't think of anything special and I like the Crimson Fists colour scheme and backstory.

Tuesday, March 30, 2010

Lights! Camera! WAAAAGGGHHHH!

I have been spending most of my free time on Warhammer, mainly reading and painting (I've found a few people mildly interested in playing, but no-one seems to have the time). I've made a start on some custom models, which I think will be pretty unique, and I'll tell you why.

First let me tell you about something I don't understand, but that's interesting nonetheless: plasma balls are scary. Take a power testing screwdriver and hold it near a plasma ball. It doesn't even need to touch it to light up. What's more, if you open the screwdriver and remove the bulb, then just hold it near the plasma ball it will light up - that's all it takes. Hell, if you put it close enough or touching the plasma ball you won't even need to touch the bulb (though touching the bulb seems to provide an earth and allow a better current flow). If you place a small piece of metal such as a coin (I found the metal spring from an old pair of headphones works well) on the surface of the plasma bulb and connect it via a cable to the bulb, it will light up at a distance (if you touch the bulb it will be even brighter).

Holding the screwdriver close to the plasma ball is enough to light it (don't ask why the sides of the plasma ball have been cut off).

The bulb from inside the screwdriver also lights when held near.

The bulb on it's own. It isn't actually touching the plasma ball, but it does need to be very close.

Just holding your hand close is enough to brighten it.

Connecting the bulb to the plasma ball using a simple cable and the spring from an old pair of headphones.

"Stealing" the current: the bulb no longer lights up.


Now the really important thing about all this is that you have a relatively small bulb that lights up when connected to it's power source by a SINGLE cable. Why is this important? Because it means we can install the bulb in a model and we don't need to connect the model with two cables. If done right we only need to place it on a metal surface that is connected to the plasma ball, allowing us to pick it up move it around freely without any annoying cables, and it will still light up! I've already installed some bulbs in a couple of models:

A Grey Knight Terminator (with a failed undercoat).

When connected to the plasma ball by a single cable (through his leg), it lights up!

A Dreadnought (that will eventually be a Grey Knight Dreadnought) with 5 bulbs.

It's connected to the plasma ball ball by a single cable through the leg.

The metal nut is there so you can touch it to brighten the bulbs further.

The view from behind.


Now there is one more thing you can do here (and probably more that I haven't thought of yet), though it's not as impressive and actually far less reliable. When you place a piece of metal on the plasma ball, sparks (or an arc I suppose) will jump to skin or metal held very close - if you're not careful you can end up with an extremely small yet momentarily quite painful burn on your fingers. Allowing an arc to jump to your fingers for about half a second will produce a tiny visible burn (and the small of burnt flesh) without causing any pain, but longer than that and it could hurt. I once burnt a mark into my fingernail by accident, that was rather painfull and the mark was visible until it grew out.

You can get a "captive spark" to jump on a model, but it's tricky to do and the spark is very small, and you need to touch the model to complete the circuit or else it just won't jump. Also you cannot mix sparks and bulbs on a single model, not with any degree of reliability anyway, as my Dreadnought taught me - the messy holes in his Multi Melta are from a failed attempt to get a spark to jump between the barrels. I actually got the spark to jump on occasion, but the bulbs wouldn't light unless the spark jumped. If I wired it up differently the bulbs would work better but the spark never would. Instead I got a spark on the end of a Grey Knight Brother Captain's incinerator. It's reasonably reliable, but the problem is that I think the spark might actually be slowly burning away the metal. It might just be something else or just random luck, but the spark is less reliable now than when I first set it up. Time will tell I suppose.

Grey Knight Brother Captain.

The spark is small yet visible.

This was a hard picture to take, but it shows off the spark a little better.


I will place more detailed descriptions of how I installed the bulbs later, probably after I actually paint the models. I'm putting off the painting until my skills improve a little, as I really want these to look good. As you can see I'm having some trouble with the undercoat layer on metal models, so I still have some things to figure out. By the way, a plasma ball will also light a neon bulb in the same way (the basis of my old home-made lightsaber), but as the smallest neon bulb I have is about the height of a Dreadnought and as thick as his arm, I don't see it as being good for anything other than scenery, and I'm not there yet (besides, since scenery is quite fixed in place the "one cable advantage" is less pronounced). Also, using an oven lighter (the kind that just makes sparks) will also light the bulbs, but they will flicker and you really need two cables then. Good for showing off the models when transporting them I guess. In theory with some work you could use the bit that makes the spark on cheap lighters, but... no.

Wednesday, March 3, 2010

Of course...

I was mistaken yesterday when I thought I had solved all the problems. Of course. Because my mesh was not written (by hand) correctly to begin with, I didn't realise that when it looked right, it was actually wrong. I fixed the problem, but now something else is not quite right: there's some strange offset showing up when I rotate a bone around a joint. I'm still trying to figure out where that came from, I guess I have to re-think everything again.

Tuesday, March 2, 2010

Life is strange sometimes

I appologise in advance for a whole lot of boring detail you don't want to read, but I want to get off my chest.

I spent a good bit of time trying to get the animation system to deform meshes correctly, but I just couldn't quite get it to work and I couldn't figure out why. So I stopped working on it for a good long while. Now when I get into something, I really get into it - for a while. It may take months, but eventually I cool down and my enthusiasm dies. From the moment I came up with my current game dev plans I knew that once my obsession cooled I would stop working on the game, so I worked as hard as I could while the idea was still fresh, hoping that the progress I was making would sustain me. And it did, for a while. But eventually work, video games and Warhammer just pushed the project to the back of my mind.

So I've barely touched the code over a month. I wrote a bit a couple of weeks back, but then I undid all my changes and reverted to what was then month-old code. But it still gave me a better idea of how to solve the problem, and every once in a while I would spare a little thought to the issues I was having. And then today I finally sat down and in under two hours I re-wrote a good deal of the animation code and fixed all the problems. Under two hours. Days of coding in circles, six weeks of avoiding the problem, then two hours to fix it. In a way it's amazing when it happens, but on the other hand it makes you wonder what you were doing wrong the rest of the time.

Anyway, my mistake was that I was not applying bone length correctly, this wasn't a problem sometimes but it screwed up the inverse bind matrix, which made the problem hard to spot. I also removed the bone offset (this can be replaced by intermediate bones, it may be less efficient in some cases but typically the offset is not used so this is slightly more efficient for most rigs), but now that I've figured out the way the bone length is applied I beleive I can easily put the offset back in later if I decide I want it back.

So here's a couple of quick, and rather unspectacular, screenshots. Now I think I need to replace the linear interpolation of the matrices with a spherical linear interpolation, perhaps replace some of the 4x4 matrices with 3x3 for efficiency, then finish implementing the system in the actual animation pipeline. Then of course figure out how to get actual model bone and animation data out of blender and into my engine (either write custom exporters in Blender, which requires learning python, or writing an importer or converting from some other format - which I actually expect to be just as hard of not more so), which of course I can't do until I figure out animation and skinning in Blender... ugh, this is going to take forever, and those Warhammer armies aren't going to paint themselves either.


Sunday, January 17, 2010

I can't believe this hasn't been done yet!

OK, so I was thinking about an old episode of the Justice League cartoon, where Superman and Wonder Woman are trying to recover an ancient artifact that is part of the key to Hades because... you know what? Never mind. The point is, the artifact is protected by a curse that makes each one see the other as a demon, so they start fighting. There's a similar idea in an old episode of the Street Fighter animated series (I believe it predates the Justice League episode) where Ryu and Ken enter a cave which makes each see the other as a living statue, and of course they fight each other. For a better idea of what I mean, check out the Contract - the Cretcher cyborg is a perfect example.

So then I thought: bloody hell, why can't you do that in a game? Basically, a split-screen game where each player sees the same terrain and other players in a completely different way. Picture: you're running down a steel corridor in a high-tech cyborg part production factory, and you run into a combat cyborg with a chainsaw for a hand. You raise your machine-gun and take aim... meanwhile, your friend is exploring an ancient and cursed castle, when he rounds a corner and comes face to face with a hideous demon, all fire and brimstone. As the creature takes a deep breath and prepares to spew demonic fire at his face, he raises his sword and prepares to attack... cool enough online, but even better in split screen where you can see yourself through your opponent's eyes.

I believe there is something a little similar in Demon's Souls, where online players appear as ghosts or something (never played it), but you still see the same landscape. Of course games like Area 51 and Haze, which had special vision modes, allowed people to get different views, but that's not quite the same as entirely different realities that overlap.

Clearly this is related to my existing plan for the "spirit world" in which you see different things overlapping, but in this case the focus is not on you seeing different views, but rather on different people seeing the same thing in different ways (I'm sure there's a metaphor for life in there somewhere...).

I'm actually thinking a third person game would work better for this, so in split screen you can step alongside your friend and see the same scene (including your characters) and see the differences. Using headsets or when online you could even hear different sounds - imagine you talk to your friend online and the sound of you voice is modified to make you sound like a robot, while he sounds like a monster or ghost. Every player could decide separately what they are - robot, samurai, space marine, knight, cop etc. and the whole world and everything in it reflects that reality, perhaps you would never know what they were seeing. This could have game play implications if characters of different "realities" had different stats and abilities - for example, a knight or samurai has a 1-hit-kill melee attack but only very slow firing projectile weapons, so the decision about whether to close in or firefight from a distance is critical. Alternately, you could see everything as it would be in your reality except human players, who would appear to you as they see themselves, creating some interesting visual scenarios. For example picture a co-op game where you're a space marine battling aliens alongside a samurai.

Now I realise that there are serious issues with the idea, namely loading two completely separate sets of textures and models for everything (even animations and perhaps even sounds) will damn near double the memory requirements, so everything will have to be downsized to compensate for that. But the fact is there's plenty of stylized games which don't push system limits yet are still enjoyable and visually pleasing. Portal wasn't graphically amazing, but the graphics were perfectly suitable for the setting and it was a great game. When playing online there won't be any problem at all of course.

So the question now is, is it worth trying to actually do something with this idea? Of course I can't be too ambitious, but if it seems feasable later on in the project I would like to try.

Monday, January 11, 2010

Bones! Jim!

I've been spending a bit of time on a skeletal animation system. I've written the core of the bone, rig, and animation classes, so now I can animate a rig. The next step is to bind vertices so that I can animate actual models, followed by writing tools to export the data from a modelling package (or load or convert from an existing format, whichever I decide is easier).

The problem is thus; the way I planned to animate the vertices will not work because of the data format. Either I change the format with much effort and lose any hope of getting the engine to work on the PSP (admittedly a rather distant hope at this point), or I use an unpleasant and inefficient work-around. So for now I'm putting it off, hopefully I'll get the chance to do some reading and maybe I'll spot something that I'm missing.