Skip to main content

Posts

Showing posts from February, 2014

Asset Creation: Shields.

I've not had a lot of time to work on the project lately, just 30 minutes here or there when my baby is sleeping so I couldn't move forward with the next stage of coding so I've been doing a little more on asset creation.

Sometimes I try something and it just doesn't work out, for example adding glasses to the character model:
A thief tries out some new smoked glass spectacles, just the thing for a hot summer's day, but near worthless in a dark and dismal dungeon.
They looked good, several versions were available, including sunglasses or regular lenses, but they are just too small. You can't see them on the player model. So although glasses will be available as in game items, they won't be included in the in game player model.

More successful was the new iteration of shield designs:
Can you spot the two identical shields? I'll have to add a transfer to one of them before they get used.
There are three types of shield, light, medium and heavy, and each typ…

Concept: Character stats;- Fortitude, Concentration and Spirit.

I'm moving on to in game character management this month, which includes how the character is displayed visually and also how it is represented in code.

With that in mind I've been going back over the character models and making sure everything is shipshape. I found several objects with missing textures or the wrong textures, as well as several objects which were incorrectly rigged. I also spent some time putting the polishing touches on the characters heads.

When making a character you can choose the head and also the hair to go with it.
The most time consuming part at the moment though is working on the code. As I continue to put the game together I am testing several ideas which could really add something of a twist to the traditional RPG trope. They are mostly things I've used successfully in other games, but those were other genres.

Some of the things I'm excited about is different damage types and different HP types as well as performance degradation when wounded.…

Cleaning up and moving forward.

I did a little housework on the project today, I finally decided to go with the legacy texture mode because I can fake nearly all the things I can do with the advanced render mode, get a better framerate and be sure that almost anyone can run the game, even if they're using windows XP on a 5 year old laptop.

I went through all the currently added monsters and optimized them for the single texture rendering environment. That means they're not going to have any flashy stuff like normal maps, but to be honest, the characters are so small you couldn't see the results anyway.

Here's a shot of some of the monsters, the Undead:






The green guys are specters, they can walk through walls. The zombies and skeletons are parts, I'll be mixing and matching heads, bodies, skeletal limbs and armor to create a whole bunch of different possible undead creations.

As you can see, they look fine, with just a diffuse texture, anything else would be overkill.

Here's what they might lo…

Concept: Footprints.

Today I did some work to try to improve the single texture graphics mode. It's already looking much better, The character shadows follow the nearest light source which makes them look very real.

I did some other experiments which didn't work out, and I also did some work on footprints.

I've done footprints before with a different game and there are two approaches, one is just a basic approximation, adding footprints space the player moves and orienting them towards the last square they came from. The other way needs me to get data from the player's skeleton and can place footprints very realistically but it does make things much more complex and over complexity is something I want to avoid if I can.



I tried it out, walking around the map for about 15 minutes, leaving a trail of little black footprints all over the place. It didn't slow down the game at all. It's a nice effect, though I may make them a little bit more transparent, It shows you quite…

Nearing the end of player movement development.

I'm getting nearer to finishing the current part of development, handling player movement during the movement phase.

There's still a few parts that I'll have to come back to later, but for now the player's characters move as they should. They don't walk through walls, they don't fall in to pits or walk on water.


Here you can see a small party of adventurers.
Left clicking on an empty tile of the map will send the selected Character there if the path is valid. Left clicking on another Character will select that Character.

If the distance exceeds your normal movement range your character will run, if it exceeds it by double the amount you won't be given the option of moving there.

Improvements are needed, such as showing which character is selected. Being able to select characters by portrait if they are not on the screen (or using the in-game map).

For the next part of development I'm going to be saving a dungeon to disk and working from that dungeon each ti…

Early demo file.

The player model and equipment is a little old.
I'll probably be redoing them later with higher poly count and better textures, but for now they serve well enough for testing.




I'm releasing an early demo file for testing.
You'll need a fairly modern graphics card if you want to get the full experience, non-existent graphics cards or very old ones will give strange results.

You can pick up the demo from here.

Here's the instructions I posted on the Blender Artists thread where I usually go for feedback and game engine related support:

I've been doing a lot of work on this and I could do with some feedback.
You can move the character around the map by using the left mouse button and clicking on a tile within her run distance (about 15 squares).
Pressing space will freeze the game and bring up the mini-map. I've not added the keys for going back to the main game yet, so you'll have to esc to exit. It's just to see the map and give feedback.

Right clicking…

Bresenham line for LOS.

I spent some time today optimizing and modularizing the script I've been using to prepare it for having more than one player character. I also moved the mini map to an overlay scene.
Finally I started doing some tests on LOS.

Originally I had thought of using raycasting LOS, as this is a 3d game, I may as well take advantage of the power of a modern PC right? But after some consideration I'll be using the Bresenham line drawing algorithm to check for line of sight in the game and I've also been thinking of how I can use it in path finding. It is rather a nice algorithm and the worst part about it I can see is that it sometimes draws rather ugly lines when they veer near to the vertical or horizontal.

Here's an example of the LOS in game:


It's just an illustration of course so in the final game there won't be any indicators, the slime will just not be visible to the player. the beauty of using this implementation is that I don't have to do any ray-castin…

In game map. To be or not to be.

From the start I wondered if I wanted to have an in game map, either a mini map or a separate screen that you could switch to to see the map.



One of the things I liked about the old games was there no in game map, if you wanted to map the game you had to do it by hand. So for a while I was sure I didn't want an in game map.

As time has gone on I'm leaning more towards the idea of making the game flexible.
Do you want an in game map? Yes, well you can activate it from the options menu before starting your game. Do you want permadeath? Well, it's available.

Most of the things I want to add, I'm not sure others will like. I know I will, but I'm not only making this game for me. So I'm going to add some options to turn off or on certain game play elements at the start when you generate your dungeon.

Here are some things that I've been cooking up for the rule set that may be optional:

Food and water consumption.Weapon and armor wear and tear.*Traps and teleporter…

First steps in to the dungeon.

Today marks an important step in development.
It's the first time you can see a character in game moving around.

This screenshot should give you some idea of how the game will look when it's done:


The slime monsters are in the game right now animated, but don't have any AI.
they are just there so I can test their impact on the rasterizer.

I'm going to say a bit now about monsters and combat.

Because of the drain on computer resources (and for other reasons I'm going to talk about) you're not going to see dozens of enemies on screen all at once. Monsters are going to be pretty rare in the game, but when you do encounter them you'll need to do more than just charge up to them and hack them to pieces.

Most combat in the real world, especially the medieval world which fantasy draws it's inspiration from was not fought to the death, but until one side withdrew from the field, generally after suffering a large number of casualties or because of being outnu…

Moving "@" around the map with the arrow keys.

Yes, that's the stage I'm at now.

However, I do have a functioning level generator going, as well as most of the art assets I'm going to need for the game, so I think I'm in a really good position to move forward.

I can't decide whether to make the movement arrows affected by light. It looks better I think when they fade out on dark levels, I don't want too many bright UI elements in the game, I'm going for that 90's dull and dark look.

There are different arrow icons depending on whether the movement would require walking or running by the player. If you run you can't do any other actions such as drinking a potion, but you can do combat.

I've also made some stand in icons for pick up, fight, read and other actions, until I can get someone to do some 2d design work for the game.

Here's a video of today's progress:



If you are interested in technical details, I can say that the mouse position is detected on the floor, and then a route is c…

Optimizing "A Star" Pathfinding

Today I was working on the A* pathfinding script for the player.

I hit upon an idea for speeding up the calculations. I used a simple script I'd earlier written as a rectangle border select for selecting multiple units in another game and used it to draw a rectangle around  the player and the target. The graph that's generated for the A* pathfinder is limited to this rectangle (plus a 10 square border, about the size of a single room). This greatly reduces the size of the graph needed for path finding (from 200x200 squares to around 30x30) and reduces the resources needed to calculate the path.

this is good because Blender Game Engine uses Python, and even a well written A* implementation is not that fast in Python.

Still, I'm getting a logic tic rate of between 3-7ms which is very good. I'll have to wait to see how other blender users report their speeds, but so far I'm hopeful about having real time pathfinding displayed for the player during their movement phase…

Concept: Monster Spawns.

Today I had some ideas on what to do about monster and room management spawns.

I want to add random objects, monsters and props such as tables to the map, but I want them to be placed in a way that makes sense and has some kind of internal narrative.

I don't want you to enter a room and see:
an empty book casea skeletonan elfa potion of speeda ruga telescopea green slimesome writing on the walla puddle of rats blood  What I want is that you enter a room and see:
"Some guards standing around a table, on the table is a lunch buffet of green cheese and mushroom sandwiches. In the corner two guards are sleeping on bedrolls. A guard captain is sitting at a card table playing cards." The above situation would be the result of three themed spawns:
A table with appropriate contents and some appropriate monsters standing around it.Sleeping monsters on bedrolls (perhaps with optional equipment spawns nearby)A card table with one or more themed monsters.  The spawns would be packed…