Alpha testing is so close that I can taste it! Tastes like chicken, by the way. I was actually hoping to have the game ready for closed alpha testing already, but issues that I needed/wanted to address kept popping up. In this video, I talk about two of the gameplay issues I’ve dealt with.
The first issue was how strict the game is in regards to guards hearing your footsteps. Before, they would always react to hearing your footsteps, but I’ve now made it a bit more lenient so that they won’t react to your footsteps if there are other NPCs near you, since the footsteps might as well have come from them. The game was just too unforgiving.
The second issue was aimed shooting. The whole gimmick of a screen popping up where you would see a first-person view of your target and had to aim manually just didn’t feel right when actually playing the game. It felt too involved and ruined the flow of the game. So I’ve simplified how all that works.
I also added a way for me to track play statistics for alpha testing. The game will keep track of various stats, such as total play time, deaths, kills, your stealth rating and so on, and write it to a plain txt file. Testers will then be able to just paste the contents of that txt file into a post on the forums, or upload the txt file itself, and I’ll be able to get a good overview of how hard certain parts of the game were in general.
For the game to be completely ready for alpha testing, though, I still need to fix some bugs and crashes. And then compile and test the Linux and Mac OS X versions of the game… and also setting up a forum for alpha testers where they can offer feedback and report bugs as well as download the test version of the game. My current idea is that if you want to be an alpha tester, just make a post in a forum thread I’ll set up for that purpose (and register for the forums first, if you aren’t already). I’ll then grant you “Tester” status on the forums, which will also give you access to a hidden forum post with the download link.
I mostly did bug-fixing in the past two weeks, which isn’t all that interesting for a development video. So I instead show some of the new assets I’ve made. I also touch a bit upon how the 2D isometric rendering functions in Hidden Asset.
Longer video than usual as I’m trying out a new format. In this video I implement low melee attacks/kicking. If you have any questions, comments or suggestions for stuff you’d like for me to cover in future videos, please let me know!
– Fixed bug when changing movement type while shooting/aiming.
– Fixed bug that would make the player character disappear if movement set to sneak as the very first thing after game load/start.
– Fixed minor issue with double-clicking to run.
– Added melee combat.
– Added two additonal test maps (and a variation of the Hensley International map for when the assassination job has been completed).
– Added overworld map that’s accessed when walking to the edge of a map.
– Added ‘Restart this location’ functionality.
– Redid the entire save game system to save information about multiple maps.
– The game now asks for confirmation before overwriting an existing savegame.
– Fixed issue with light sources on a tile with a coffee table.
– Fixed minor graphical bug at some wall joints.
– Created the player character’s look and implemented the system for having characters with unique appearances.
– Made the animation and sprites for sneaking.
– Removed the planned separate sneaking movement mode (which was supposed to be more silent, while crouching would just hide you behind cover).
– Removed Combat Mode and just made it so that characters you need to talk to can’t be attacked.
– Added Tactical Mode in place of Combat Mode, which highlights stuff that can be interacted with, shows the restriction level of areas (green, yellow, red) and displays a color-coded field-of-view cone for NPCs (and a white field-of-view circle for the player).
– Fixed bug with saving open doors.
– Fixed issue that made NPCs react to seeing you with a weapon in another building.
– Fixed bug that made it impossible to do an aimed shot while crouching.
– Fixed minor issue with the opening and closing of some doors not affecting tile lighting.
– Fixed some issues with elevators that could severly mess up the pathfinding of NPCs.
– Fixed player and background noise levels getting stuck if sound files are missing for some reason.
– Fixed bug that would cause the player to still be alive after dying if he was following a character when killed (i.e. the player had clicked on a character and the player character was walking up to that character).
– Fixed issue that would make a character face in a different direction than he was moving when getting out of another character’s way.
– Fixed bug that would make a character choose an edge tile to walk to when getting out of another character’s way.
– Made level visibility also apply to other buildings.
– Added power lines overlay when hovering over fuse boxes (and other stuff that’s connected to something else via power lines).
– When clicking on a world object or using an item on it, the player character will now automatically walk up to it if it’s out of reach (but not if the player character is in one building and the object in another).
– You can now shoot at characters in an elevator, and they can shoot at you.
– Made sure the current objective screen is removed if you walk into an elevator and the elevator buttons are displayed or walk up to talk to a character.
– Added an arrow for when hovering over an edge tile to show that going there will make you leave the map.
– Integrated the current objective and restart location buttons better with the interface.
– Made placement of character dialogue take into account whether or not the character is in a moving elevator.
– Changed the name of the Electric Surge and Lock Override devices to Remote Power Surge and Remote Door Lock.
– Added functionality to the scripting language so that actions can be set to only occur after a dialogue has ended and the player has closed the dialogue screen (such as the receptionist only going to investigate the car alarm when the player closes the dialogue window).
– Some changes to the test map.
– Fixed bug that would potentially crash the game when drawing the selection outline around a shooting character whose line of sight is broken.
– Fixed an error in the level design that made it possible to shoot the CEO from the adjacent building without doing anything else (it wasn’t supposed to be that easy!).
There’s still a bit of AI work left to do before the test level is fully playable. As is evident in the video, shooting at close range is still a bit wonky, for example. Kinda reminds me of that Naked Gun scene. I also need to add some more features to the scripting language to have characters in the level react the way I want to certain events.
Light sources can now be added/edited in the map editor
Light sources can also be “baked” into the map to avoid having to calculate shadow casting for static light sources
Added the Remote Trigger
Integrated some more of the scripting language so that light sources and elevators can be toggled off/on
Added a briefcase with money to your inventory showing how much cash you’ve got
Work continues on the female character sprites for getting shot and killed, and I’m almost done with the doubling of male character aiming and shooting sprites. I also just today managed to improve the lighting engine to allow for more smooth lighting (partially inspired by the great work done by the Project Zomboid guys), but that’s still work-in-progress, which is why I’m not showing it in this video. I’ll put some screenshots up when it’s worth showing.
And then there’s the big elephant in the room: AI. It’s quite a daunting task, since so much of the game will be about manipulating NPCs, and I’ve only briefly jotted down some ideas. I recently finished Batman: Arkham Asylum (can’t wait to get my hands on Arkham City!), and the reactions of the NPCs in that game is somewhat of an inspiration – especially how the thugs would freak out the more of them you picked off. But I’ll probably write a separate blog post on AI at some point, so I won’t go more into that now.
Tied player actions to noise and suspicion generation
Particle effects to show characters growing suspicious
Added pauses to character dialogue
Resolution can now be changed in-game
Added small thumbnail images for saved games
I’ve also almost finished work on doubling the directions for the male aiming and shooting animations (from 8 to 16 directions). After that, I’ll make the missing sprites for female characters (aiming, shooting, hit, and fall/die). There’s also still a bunch of minor things, bug fixes, optimizations and tune-ups.
When all that’s done, I think I’ll begin working on the AI, since that’s the biggest component missing before I can really start playing around with actual gameplay — and not just building the surrounding framework. I’m really looking forward to create a simple mission where you have to sneak past patrolling guards or get in a firefight. That’s when all this stuff will hopefully come together and be an actual game! After that, a release of the first pre-alpha version shouldn’t be far behind. Stay tuned!
Changed color of Combat Mode border from red to green
Added z-layers and multiple floors in buildings
Added elevators to move between layers
There are still some minor bug fixes and optimizations I need to do before I’ll consider the rendering engine done for now. Two of those bugs actually show up in the video — I didn’t notice them until I’d started editing the video.
I’ll be working on making more environment assets next to fill in those empty floors of the building. I’ll probably also be working some more on new GUI elements, such as a minimap in the upper left corner showing the various area types and the location of your target. For now, I’ve got three area types in mind that will be indicated with green, yellow and red and affect how suspicious characters will be when spotting you. Green areas are public areas where other characters’ suspicion level is just the default. Yellow areas are non-public, but also not restricted areas, for example the lobby of an office building. The suspicion level here will be double. Finally, red areas are restricted areas that you’re not supposed to have access to, so the suspicion level of other characters here will be 4x the default.
The point of most missions in the game is to be as stealthy as possible. Your stealth rating for a mission will decrease when characters spot you, or you otherwise draw attention to yourself. So I’ll also be making a Stealth bar for the GUI that shows your current Stealth level, as well as a Health bar and a Noise bar. The latter shows the level of noise you’re generating as well as the environment noise — so that you can set off environment noise such as fire alarms and car alarms to drown out your own noise.
I wanted to post this three days ago, but my webhost’s servers got knocked out following massive downpour here in Copenhagen (two months’ worth of rain in two hours!), so the website’s been down for three days. Now it’s back up, however, so here’s a new development video for Hostile Takeover…
Left-clicking on an NPC will make the player follow him/her
When doing an aimed shot, the more the target is in shadow, the harder he/she will be to see and the more the crosshairs will shake
Added button that toggles Combat Mode on/off
When in Combat Mode, right-clicking will do an attack (fire a weapon if the target is far away or do a melee attack if the target is on an adjacent tile)
When Combat Mode is off, right-clicking does the default action for whatever you clicked on (talk to a character, open/close a door, search through a drawer, and so on…)
Started adding scripting support, which means that dialogues are now working
Added the interface for character dialogue
I think I’ll start working a bit more on environments now. I’ll probably start by adding functionality for doors, windows and line-of-sight. I may also do some of the environment art/objects that I know I’ll need for the game’s first mission — I’m getting a bit tired of looking at the crappy temp stuff.
In the video, you’ll probably notice that the sprite for the character I’m talking to (your contact for the first mission) doesn’t really match his portrait. So I’ll either make full unique sprites for him at some point, or just add his clothing sprites to the default pool of character sprites. I do plan to have unique character sprites for some main characters anyway, though, so they don’t all have the same age and body type as the default sprites.
This is the new stuff you’ll see in the above video:
The inventory bar is working
Item labels (appearing when holding down Shift) automatically spread out so they don’t overlap
Holding down the right mouse button instead of just clicking on a target will allow you to do an aimed shot
Characters can be shot in the head, torso, right and left arms and legs
There’s a one-shot kill area on the head and torso to simulate shots to the brain and heart
Redid the expanding blood pools
Added blood splatter to the ground when a character is hit
Also added a blood squib to show which body part was hit
I’m still working on the female hit and dying animations as well as the doubling of directions for the male aiming and firing animations. When doing the automatic shooting, the chance to miss and body part hit is currently just randomly selected, so I’ll still have to add some algorithms for that which take distance and level of light into consideration. I’ll also be adding effects of damage to arms and legs (harder to aim and walking/running slower). When a character gets shot in the arm, there should also be a chance of the character dropping items in hand. Also, there’s currently no line-of-sight check, so you can shoot at characters behind walls.
I’ve been playing around with making character portraits for dialogues. My current plan is that you can only engage in actual dialogue (i.e. the dialogue screen pops up) with secondary and main characters. Extras that fill the environment, hostile guards and similar characters will just brush you off with a quick remark written above their head. Otherwise I’d have to make hundreds of character portraits — and possibly figure out how to make random character portraits if some of the NPCs are randomly generated. I think it’ll also make it more intuitive which characters are actually important to the plot or mission at hand if you can’t just talk to everybody.
I also managed to implement recording functionality. This’ll record the mouse cursor position and keypresses each frame to a text file. It also records the initial seed for randomization. Using this seed and the recorded cursor positions and keypresses, I can get a playback of a play session. Being able to watch a recording of a tester’s session will really come in handy!
Here’s a quick list of the new stuff in the above video:
Guns and rifles can be fired at characters.
Characters can be killed by shooting at them.
Dead characters will drop carried items to the ground.
Dropped items can be picked up.
I’ve finally finished doing the most essential animations and sprites required for shooting and killing characters. I haven’t done any of the animations for female characters yet, which is why I’m only shooting guys in the video. Also, as talked about in a previous blog entry, I’ll have to double the number of directions for the shooting animations, as it very often seems like your character isn’t aiming at the target at all. So that’ll be increased from 8 to 16 directions. I also need to do animations for when characters get hit from behind and fall over forwards. And then of course all the shooting and getting hit and killed animations for the female characters. I might also redo the pools of blood — I’m not quite sure I like them. And I’ll definitely be adding a spray of blood to indicate hits and small splatters of blood on the floor around the hit character.
As you can see in the video, items are picked up from the ground by holding down Shift and then clicking on the appropriate item label. Why not just be able to click on the item sprite itself, you might ask? Well, sometimes the item sprites are pretty small (like the 9mm Pistol) and I don’t want players having a hard time picking stuff up. Also, when holding down Shift, only items that are within your range get the label, so you immediately know what you can and can’t pick up. And, also also, if there’s a stack of items or it’s very dark, seeing the actual item sprites on the ground can be difficult. I believe Diablo 2 had a similar system — at least, that’s where I think I got the idea.
I’m also starting to think about the inventory system. I want to keep it as simple as possible and I’m currently not too fond of having a separate screen for handling your inventory, as I want to keep as much of the game as possible focused on the world map. So, my current idea is to move the icons for the items in your hands to the bottom corners of the screen and have a ‘ribbon’ between these with the items in your inventory. You’ll be able to scroll through the items on this ribbon and drag and drop between your inventory and hands/ground.
And, finally, I’m working on first-person aiming. When you’ve selected a weapon in your hand, right-clicking on a character will have you automatically fire the weapon. Whether or not you hit is then calculated based on distance and the visibility of the tile the target is standing on (so characters in shadow will be harder to hit). But if you hold down the right mouse button instead of simply clicking, a meter will fill up on the mouse cursor. If you manage to keep the cursor over the target until the meter is full, a first-person targeting screen will pop up. This shows the silhouette of the target (in real-time, so it’ll move if the target is moving, and the size of the silhouette is based on your distance to the target) and you can then aim and fire your weapon manually. I’ve got the basics already implemented, but it’s not quite in a state to show yet. Look for it in upcoming videos!
That’s all for now. I’m very pleased with the results so far, everything is just taking a bit longer to implement than I had originally anticipated. But I’m moving steadily towards my first milestone: Releasing a version for download with the most basic gameplay elements in place (you can shoot at NPCs and they can shoot back at you).
At last, the first development video of 2011. The new additions took much longer to implement than I had anticipated, but they were also the parts of the isometric engine that I had most feared programming, so it’s a relief that they’re now done and working as I had hoped.
Walls have been added, so I can now start thinking about buildings and other constructions.
When the player is behind a wall, it will become partly transparent to show the hidden area.
Walls will block light sources, so shadowcasting has been implemented.
Getting the wall sections to link up properly and implementing the transparency/x-ray effect was difficult, but not as difficult as I had feared. Shadowcasting was the opposite. My method is based on the recursive shadowcasting algorithm described here, but there were two major things that had to be changed for that algorithm to work in my engine… and those changes took about three weeks to get working.
First of all, the recursive shadowcasting algorithm is designed for a grid where an entire tile will cast a shadow – it’s often used in non-graphical roguelikes, for example, where a wall is represented by a ‘#’ that occupies a full tile. But in my engine, walls are thin and between the tiles. So the calculations for the shadows had to be redone.
The other major change is that I wanted the shadows to have a soft edge instead of the hard edge between shadow and non-shadow that the default algorithm results in. This meant that I had to keep track of how close a tile is to either a beginning or ending shadow edge and then calculate how much the shadow should affect the tile based on the tile’s proximity to the edge. There are still some minor kinks that need to be ironed out (in rare circumstances tiles that are completely in shadow will be lit), but they shouldn’t be a problem.
The extra time I had to spend on getting this working meant that progress on the shooting animations has been pretty much nil. I’m now back to making sprites for these animations, but some preliminary tests have shown that the 8 directions all the current animations are based on won’t be enough for the shooting animations. When shooting at a character that isn’t at an angle close to any of the 8 directions, it looks really odd – like the player character is shooting miles past the target. I will therefore be doubling the number of directions for the shooting animations from 8 to 16. This should be enough to ensure that it doesn’t look all too odd. But it also means I’ve just doubled the number of sprites required… and the amount of time it’ll take to make them. I’m making the original 8 directions first, though, so it shouldn’t be too long before I can make a video with some shooting going on.
Characters can now carry items (only weapons for now).
The player’s items in the left and right hand are displayed as icons in the top left and right corners of the screen, and the “active” item can be selected by clicking these icons. Right clicking with the mouse will use the currently selected item, so to fire a weapon, you will select it as your active item and right click on the character to shoot at.
Dynamic and colored lighting has been added, allowing for a whole bunch of nice lighting effects.
The searchlight effect in the video has made me think about sneaking in the game. My current idea is that enemy characters will have a harder time spotting you if you’re on a darker tile, so it’ll be a good idea to stay in the shadows when trying to sneak up on an unsuspecting victim or sniping a target from a distance.
The sneaking aspect of the game has also made me reconsider the turn-based combat I had originally planned for the game (and am using in Ascii Sector). Sneaking up on a target and trying to stay hidden in shadows will be a lot more interesting and intense if the entire game is real-time. So as I’m currently working on the gun and rifle shooting animations, I’ll first try to implement the combat in real-time and see how that works. If it’s not up to snuff, I can then always go turn-based, since the real-time combat won’t require much work as the engine is already real-time.
– Female clothing is done, so the female characters have been added to the game.
– I’ve added a “center map on player” function for when you’ve scrolled far away from your character (currently activated with a hotkey, as I haven’t begun work on the GUI yet).
– The game map can now be rotated in four directions, which I figure is going to be useful when walls and buildings get added to see obscured characters and plan your assassinations (again, currently activated with hotkeys).
Next up, I’ve started adding weapons. This is basically just making weapon sprites that fit into the existing walk and run animations so the characters will be carrying the weapons with them.
I also want to add colored lighting to the engine. It currently supports static light sources that are generated when the map is loaded, but I want light sources to be able to appear and disappear during play and have different colors. This’ll for example come in handy for when you blow something up that creates a fire. I’ll then be able to add an orange/yellow light source with a dynamic intensity at the middle of the fire that will light up the surroundings. Or I could have light sources that constantly change colors for use in a disco (maybe you have to kill some CEO sipping a few drinks there?).
I’ve also implemented character selection with a green outline for the currently selected character. This will of course be used for selecting a character to attack, talk to, examine, and so on. I’ve begun work on the female characters next and am currently creating the clothing sprites for them.
It’s been a bit more than a week since I posted the last video that showed off just one direction of the walk animation. This doesn’t mean that it only took that time to create the required sprites though, as I’d cheated a little and was already well into making the remaining sprites when I posted the last video. If I add up the time used, I think it’s probably taken about 14 days of full time sprite making to create these sprites (~2050 separate sprites in total), which isn’t too bad and makes me feel that the system I’ve set up is definitely viable. I can imagine that the final six months or so of working on the full game will be all about cranking out these kinds of sprites to allow for even greater variety in character appearances.
I’ve already started work on the sprites for the running animation (the neutral position is done) and am also looking at animation and body templates for female characters. A pity it’s just 3D models and not real models – would certainly have made the task slightly more interesting… Ahem…
Shooting and impact animations are also somewhat in the pipeline – as are weapons – but I want the walk and run animations to be done and implemented in the engine for both male and female characters before I move on to that.
In the last video update, we had multiple NPCs randomly walking around, which was a big step towards the initial engine for the demo. They all looked the same though, like a bunch of clones, twins or ‘Malkoviches’. The latest work on the engine remedies that by creating the look of the characters by semi-randomly combining and coloring different body parts.
As you can see, none of the characters look exactly the same. Some of them look a bit similar, though, but that’s just because this test only has 2 types of shirts, 2 pants, 2 shoes, 2 hair styles and 6 hats to choose from (the guard uniforms aren’t combined with the other clothing types, so I’m not counting the uniform pants, shirts and shoes in this). Imagine the level of variety that can be produced with 10 types of each clothing part instead of just 2!
It does take quite some time to prepare all the various sprites for this – each character frame consists of about 15 sprites and there are 10 frames in this animation and a bunch of different sprites for each body part, so if you do the math, it really adds up – but I think the results are definitely worth it. I’ve also optimized my work flow in creating these sprites, so I can knock them out pretty quickly now.
I’m currently working on creating the sprites for the other seven directions (well, actually just 4, as three of them are just existing sprites mirrored), as well as for the running animation and the neutral position. This’ll probably take considerable time, so it might be awhile before the next video update – unless I do some work on other parts of the engine that are worth sharing. We’ll see.
There are now a bunch of NPCs running around besides the player’s character. They all still look the same, though, as I haven’t started working on different looks for characters, so I needed something to tell my character from the others, which led me to adding the destination tile marker, and then the tile over marker. The character AI is still very simple; they’ll just select a random destination tile and find a path to it. If their path gets blocked by another character, they’ll just stop, which is why you’ll see them eventually ending up in big groups. The current AI is just for testing purposes to actually have the characters move, so it will of course be improved considerably for the finished game.
Another new addition in this video is dialogue being displayed above the NPCs. Again, the dialogue in the video is just for testing purposes. Can anybody guess which movie the dialogue is referring to? :)
I’ll be working on having the characters all look somewhat different next. I’ve devised a system where the engine can randomly mix different clothing sprites and give them different colors. Characters’ skin can also be colored differently, as can their hair. So instead of making 10 different looking character sprites, I’ve split a character sprite up into different parts that can be combined and colored in a multitude of different ways. This should provide considerable variety in how characters look – if I make enough clothes/hair/hat sprites, no two characters should look completely alike.
I’ve been playing around with doing some lighting effects for the isometric Hostile Takeover engine. Your character has a shadow now, and I can designate an overall degree of lighting as well as spots of permanently lighted areas:
One of the things I loved in X-COM were the night missions. There’s just so much mood and atmosphere in those night scenes – beyond the simple dread in X-COM of an alien hiding in the dark right around the next corner. I’m not sure how this will be used in Hostile Takeover, though. I may have missions taking place outside, or I may just have missions that take place in an office building at night. A mission where you have to assassinate a couple of CEOs having a secret meeting at night would be pretty cool too. But I’m getting ahead of myself now…
Of other new stuff in the above video is map scrolling and some furniture I threw in to test draw order, so that sprites can be placed in front of and behind other sprites. Everything seems to be working fine, so I’ll move on to working on having multiple NPCs walk around as well.
Whenever you begin work on a new game, the first question is always: Where do I start? I’ve decided to start with you. Well, with the character you’ll be controlling in the game. So here’s the very first Hostile Takeover development video:
As you can probably tell, it’s all very basic and only the very first baby steps towards a fully featured isometric engine. When clicking on a tile, your character will find a path there and walk towards it. Double-clicking will set him running. He’s currently running around in his underwear, as this is just a basic test of having an isometric sprite animation, but he will of course get properly dressed at some point.