Skip to main content

Posts

Showing posts from July, 2014

The n00b.

I added some limbs to the fur cloaks and made a wolf cloak. Now you can be Fred the Dread from the N00b comic . If you've never read the n00b I recommend checking it out. It's an awesome commentary on RPGs and MMORPGs. I sometimes think about going back and redoing the player character models and textures. it's a problem that when you work on a project for a long time that older stuff starts to look bad. Anyway, I think I'd better just keep going with the development, and slate character upgrades for a future version of the game. if I spend anymore time revisiting stuff I've already done then it'll stretch development out even more, and then something else will have to be redone.

Animal Skin Cloaks.

I was reading Conn Iggulden's Genghis Khan series this month and had decided to include animal skin cloaks for the Barbarian character archetype. I had forgotten all about it when I saw the trailer for the new Hercules movie with "The Rock" sporting a rather nice lion skin. I decided I needed to make a set right away before I forgot again. Lucky for me I already have a bunch of beastmen so it was a piece of cake to cut down a beastman mesh and re-rig it as a cloak. They are so primitive, and feral. It really gives a lot of character to a model right away. Animal skins may well give a morale bonus or a partial immunity to fear. There's a great bit in the book where Genghis' eldest son fights a tiger and afterwards has the skin made in to a saddle blanket: The two generals rode together down the slope to the valley, comfortable in each other’s presence.     “I have been giving thought to a name for my tuman,” Jochi said.     Jebe looked at him, raising hi

Making prefabs.

Now the prefab builder is finally finished I can begin making prefabs. It's kind of fun, I get to dream up puzzles, traps, little bits of narrative for the game to make it come alive. it'll be more fun once the level builder is working and I can begin navigating around my creations in game. I added some final finishing touches to the way prefabs are handled while saving. Now a border of wall tiles is added to the floor tiles, but the rest of the unfilled area is dig able. That means the tunneler will be able to join prefabs together more closely without leaving a big border around each prefab. Also the prefab is cut down to an array that includes only the area containing walkable tiles. Any empty tiles are trimmed. So a 4x4 prefab will only take up a 4x4 array, not a 20x20 array. Also empty lower levels are cut out and replaced with a [None] array if the prefab is a single level one without stairs. I've included some data with the prefabs in the dictionary to show if i

Saving prefabs.

One valid 2 level prefab ready to be added to the collection. The prefab builder is done. Had a run in with shallow copy problems at one point. It's something I knew about from a previous project, but completely forgot about this time around. I'll have to check the code for the main game to make sure I've not let the same problem creep in there. Sometimes I forget things just as fast as I learn them! Right now you can save prefabs (as long as they are valid) in to a local dictionary, and then browse through them to edit or just check them out. Once you're happy with what you've got you can save them to an external file. I haven't written any code for loading prefabs from the external store yet, but I guess I had better. If I somehow save a prefab which has an error (the key for a locked door is one the wrong side of the door for example) I'll need to be able to find and delete it from the main store of prefabs. It would probably also be a good idea to

Encounters and events.

A special example of a narrative prefab.  I did some more work on the prefab editor today, I think it's pretty much finished. The latest addition is special events and encounters. These allow me to create narrative sections of the dungeon, for example traps and puzzles. For now puzzles are simple things like find the lever that opens a portcullis gate (a type of door that can't be opened by hand but which does not block vision), or use a hidden door to avoid traps, or find a hidden door to get to a hidden room (which you can see through the bars of a portcullis) or just a simple find the key type puzzle. Can you work out the puzzle above? It has two possible solutions. A narrative prefab like that might take up a big chunk of a level, and wouldn't be that common. Most prefabs will be quite simple and self contained. I can also place guards at a level exit, or even a boss encounter in a treasure room. The events will still be procedurally generated, so that the boss

Second generation tileset planning.

I've already talked a bit about how I'm handling the layout of the new tileset, with offset tiles and overlays and different objects for walls and floors etc... In this post I want to talk a bit about how I make the textures, and what I've learned from the first (partially successful) generation of tilesets. Experiments with using different lighting for tiles and characters. If I wanted I could continue to make the game using the old style of tilesets, they're not that bad, but they just don't satisfy me. I know they could be much better and I've learned a lot in the last 2 years that I'd like to include in a revision of the tilesets. Some of the things I want to consider when making the new tilesets are: Don't make doorways "covered", the doorway area should be open to the sky, otherwise it's difficult to arrange your characters in a doorway, somewhere where combat is very likely to take place. In the MKI tilesets I made the door

New tile types.

I've been working on adding some new tile types, and redesigning some old ones. I've moved stairs up and down from door type tiles to overlay tiles. As I explained in an earlier post, overlay tiles types can be placed on exiting tile types, inheriting some of the qualities of that tile. A more detailed prefab. With descriptions. Some of the tile types have been successful, while others I'm not happy with.  I wanted to add rounded corners to some rooms, but the result, because of the way the code works, just doesn't satisfy. I'll be dropping them for now, perhaps including them as the base wall type in another tileset. On the other hand, details and decorations are just what I was hoping for. Details can be added to either the floor or a pit. They don't affect movement, and can be used to represent non blocking visual details, such as small pieces of trash, rugs, blood splashes, slime trails, spider's webs etc... on floors. On pits they can be

4 walls and a floor.

 4 walls and a floor. Those are the basic options when creating a room in a game. Of course, one or more of those walls could have a door. And some rooms might have pits, stairs, secret doors or other features. A room is made up of any number of tiles laid edge to edge. What is important is how those tiles are combined to create the room. We might construct our room taking in to account each neighbor, including diagonals. This is just making a rod for our own back though, and results in lots of tiles and much more work. I've tried it in the past and the result is not any better that what I'm going to describe here, more work seldom results in better results, we need to find the optimal solution. With that in mind we only really want to look at the tiles in the cardinal directions. In that case a tile is made up of 1 square with 4 neighbors, that makes 5 components... Cardinal Tiles  ...but with a clever bit of offsetting we can make one of the neighbors the orig

Upstairs / Downstairs.

I've decided to make my prefabs multilevel. Later this should allow me to add pit traps and other great stuff. It also makes it easier to line up stairs so that you can exit them on the same co-ordinates where you entered them. The prefab editor is pretty much finished, it just needs some code for loading up prefabs from a saved dictionary, so that they can be checked or edited. The entries will need to be forwards compatible, so I'll be loading each tile and then translating the indexes to a new array, that way if I add extra indexes or extra info (like traps or puzzles) I'll be able to update existing prefabs to work with the new standard. Click for a video.

Validation checks.

I did some coding today on the prefab builder. I want to get most of the possible functions in before I go and build a load of test prefabs. If not I'll have to go back and rebuild them, or build a bunch of new ones. Since I'm hoping that later people will help to expand the game by making new prefabs I want to make sure the prefabs are valid before saving them. This one is not valid. Need to add a message to state that fact eventually... Right now I've only included a couple of checks, there are more I should add. Such things as checking if a prefab has any encounter areas set, if it has a valid walkable path from the entry hook to the exit hook (pretty essential to avoid game breaking prefabs), if it has any invalid door or stair placements and other things like that. The check for stairs came to me when I was thinking of how to deal with stair containing prefabs vs non-stair containing ones. How can I choose the right kind in the right situation? Why should th

Summer.

It's getting really hot here. I live in South Korea and the summer is almost tropical. Last year my video card burned out, hopefully it's not going to happen again. :) Anyway, I've been working on some new monsters to take advantage of the new Giant Rat agent archetype. I've tried to keep the absolute number of archetypes to a minimum, as many monsters as possible share armatures and animations to help save development time. The Giant Rat has spawned 7 different monsters. One of my favorites is the Cockatrice: A dangerous monster from the lower levels. Click for a video of the other monsters. One of the places most associated with the original tale of the cockatrice, Wherewell near Andover, is just a few miles from my hometown in England. When I read about it I was quite homesick, I remember the many warm (but not tropical) summers I spent riding out to that small town where the cockatrice was said to have lived in a well. I used to swim in the stream with

Ratus Giantus.

Because it's just not a real RPG unless there are giant rats. The above picture represents about 30 minutes work. The armature is made (It'll be reused by several "ratlike" creatures) and the basic mesh is made. The giant rat is going to be pretty small actually, so there's not a lot of detail. About 400 triangles. I've yet to rig the mesh so it works with the armature, and I'll also have to make the animations before it can be considered done. Once the mesh is rigged I'll make some visual variants, like mole rat, brown rat, giant weasel, giant rabbit maybe... If I rig the mesh first I won't have to do it again for every extra mesh I make, I can just duplicate the mesh and then edit it (add some big ears, fatten up the body etc...) finally I'll have to rig any parts that got added and check it works without any errors when animated. I like to rotate my efforts to different areas of the project every few days. If I work only on coding it&#

Level Editor

You might ask why a game with random levels needs a level editor... Well, roguelikes are not completely random. Most roguelikes use predefined rooms in their level generation algorithm. Usually these are rectangles, but they might also be another shape, such as an oval or a rectangular donut or a cross. I'm going to be doing the same, so that I don't have only rectangular or square rooms. But as well as simple primitives (square, rectangle, torus) I'm going to include quite a lot of themed rooms and even themed areas. These might include mazes or an array of dungeon cells or an underground fortress, or a subterranean village or whatever. For that I need a quick and easy way of creating these prefabricated areas and saving them to disk ready to be called up by the game. Introducing the prefab editor V0.4: You can place rooms, corridors, stairs up and down, secret doors and encounter areas (the numbers on the map above). The encounter areas are my favorite bit

Tileset methods.

If you're making a game in 3d there are a number of ways to handle tilesets and tiles. The easiest but least flexible is to handle each single tile as a tile and just place them with no regard for the adjacent tiles. Walls in this case are made of 1x1 pillars of wall material. This is great, but it doesn't allow for very varied tile sets. It also leads to very repetitive, bland looking dungeons. You could make things a little more random by using multiple kinds of wall and floor tiles, randomly placed, or use an algorithm when placing them. Here's a look at Eye of the beholder on the gameboy advance which uses that method, though it's actually 2d isometric, not 3d: Very blocky tiles. Another method is to use tiles which are bigger than 1x1. In the case of my first attempts, I used a 10x10 tileset. This allows some very interesting shaped rooms such as circles and some kinds of irregular tiles such as caves. We could call these prefabs or kits. My first

Animation bottleneck and map rewrites.

I recently found a bottleneck that was causing some slowdown in the game. I've been using a single flexible rig for humanoids which incorporates 2 arms, 2 legs (with extra back cantered versions), a tail, two possible head locations, hair, antennas, a cape, weapons hooks including animated bow, a helmet hook so helmets can be removed during a cut scene or special animation if needed as well as wings. This is a very flexible rig, but it has a problem. Multiple inverse kinematics solvers, multiple copy rotation and location constraints and lots of redundant bones when used for most types of agent. For example bird men have wings and back cantered legs and use the lower head bones, but they don't use hair or capes. One the other hand humans use hair and capes, but not wings or tails. The humanoid armature. With all those extra bones and constraints to calculate, animation time was double what it should be. Once you start adding a lot of enemies to the scene (more than 4)