2011/08/15

Grasslands Tileset List

The grasslands is one of those tile sets where 256 tiles aren’t anywhere near enough to fit all the tiles that could belong here. So I’m going to focus on the most-usable tiles and leave some room for customization. Listed by 16-tile groups.

  • 0: reserved for collision
  • 1: 16 grass tiles
  • 2: 16 water tiles
  • 3: 16 path tiles
  • 4: 16 cliff tiles
  • 5: 8 cliff tiles, 8 bank tiles
  • 6: 16 bank tiles
  • 7: 16 bridge tiles
  • 8: 8 containers, 8 village objects
  • 9: 16 weeds and shrubs
  • a: 16 rocks and formations
  • b: 16 trees
  • c: 16 top-of-cliff grass tiles
  • d: 8 wood fence
  • e: buildings
  • f: exits

2011/08/09


Slow Times!

Flare has taken the back burner while real life stuff has been out of control. It happens.

This week I plan to pick back up on this grassland tile set. My next big concern is making sure the tile shapes are usable. I plan on having high cliffs and low water; but, Flare’s maps are currently flat. So all the split levels will be faked, essentially. Tiles should be easy to place and work with the existing grid.

What I plan to do is make a proof-of-concept set of tiles and then see how they play out in Tiled. If the basic shapes work, it’ll be easier to move on to textures. I’d rather do that than put a lot of work into the textures, only to find out the shapes don’t fit together.

[–Update–]

I was really hoping to be able to fake split-level areas: terraced elevations that look like different heights but are actually flat and faked with forced perspective. But it looks like it’s too tricky to deal with. What I’d gain by forcing this, I’d lose by making the tile set much harder to create and work with.

Actually the tile set art will still be friendly to such an engine, but it just isn’t quite working here. I’d need to add n layer support and drawing tiles in vertical order first. It just isn’t necessary at this point, but would be a nice thing to consider for a future version of Flare.

So I’ll have to do basically the same thing I did in the Cave tile set. In the Tiled version of the tileset image I had to flatten the water areas to work in Tiled.

[–Update–]

Raw cliff test. Not too bad, maybe the rock layers are a bit too defined. I can make some changes so that they smooth more in some places.

Test Cliff in Grasslands

2011/08/01


Experimenting with Grasslands

I made some grass and water tiles before, but I don’t care for the way they turned out. Using particles for grass seems gives me a very noisy grass, and it’s difficult to deal with the translucency on the edges. I’m going to try to make new grass that relies more on good textures.

I want to add small cliffs. Some will just run along a grassy area to give the illusion of a split-level floor. Some will lead down to water. I’m trying to draw inspiration from the Cliffs of Moher — look at the texture on those vertical cliff faces. I’d like to accomplish something like that if possible.

Because of the way tiles work in Flare, the cliffs won’t be extremely tall. This might lead to a terraced look in some areas. Maybe that’s a good, interesting thing. We’ll see how it turns out.

I’ll be trying different techniques. I want the result to be relatively low-poly and perhaps useful in 3D games. I might need to use some combination of sculpting, 3D outlining, and good textures to get it working correctly. I also need them to tile seamlessly. Going to be tricky, but I think I have the work flow figured out. It will be similar to what I did with the cave walls, but with more manual modeling instead of using random Fractal subdivision.

[–Update–]

Trying out some textures and basic shapes for the cliffs. This is only one tile repeated. Just experimenting to see if this gets me anywhere near where I’m trying to go. I’ve zoomed these in at 200% so the detail is easier to see.

I dunno. Maybe. The angle of the light kind of washes away the details on the right side. It could look good given more variety.

[–Update–]

I’ve found an easier way to get this variety on the cliffs, with a better-looking result.

Before I was trying to subdivide and extrude chunks of rock. This time, I vertically subdivided the section into 10 parts and shifted the curves of each horizontal rock layer. It’s a lot faster than the previous method. I ended up with more faces but it’s still not a lot (this example is 117 quads/234 tris per section).

For kicks I might tone down the poly count to 64 quads, to be extra 3D-game friendly.

2011/07/27

SDL_ttf dependency added

I don’t take adding dependencies lightly. In my mind, every new dependency is another barrier to building, another possible limitation on various platforms.

However, SDL_ttf is likely supported to the same extent that SDL_image and SDL_mixer are. And, this lets us do Unicode language support. If Flare is to be taken seriously and used by gamers all over the world, it needs to at least handle translations.

2011/07/21

Follow-up Thought to Bug Tale #1

One reason this bug was hard to see was the delayed trigger — something happens in one part of the code (potion use restores health), but the immediate effect actually doesn’t take place until way later in the code (remove potion from inventory).

Ideally, don’t do this! Have everything resolve together if possible. Why isn’t it possible? Does the code need to be refactored?

In this particular situation, I think it’s a matter of avoiding circular dependencies in C++ files. But there’s probably a solution that gets around that and performs all the necessary steps together.

2011/07/20

Bug Tale #1

Today I merged many significant patches added by various contributors. It was time to get back into the swing of things and try out the new code. I was especially excited to try pennomi’s new “monster pack” code, where monsters in combat would notify nearby monsters to enter combat. Finally, large groups of monsters couldn’t always be picked off one by one.

I’m merrily testing with a new character. I get through the alpha quest line, enjoy a romp in the caves, and make my way to the Lost Mines. I pull a large group and have to use a health potion to stay up. But the potion doesn’t go away. I clear out the enemies and try drinking again. I’m getting the full effect of the potion, but the potion is still in my inventory. I check my inventory and try using the potion from there — and finally it’s gone.

A bug!

But no code relating to potion use has changed, not in a long while. So what’s happening?

I restart the game. I test, and potions work fine. But I’m full health; let’s see what happens if I take damage. I find the nearest friendly Skeletal Warrior That Shoots Icicle Spells and take damage. Viola, my potion is stuck again!

I set debuggers to look at power use, for when I use my potion. I play again and the breakpoint is hitting every frame. Oh right, once the skeleton sees me he’s dropping his warning beacon; his beacon uses the same Power system as my potions. I tweak my breakpoints and test more.

Maybe it only happens when my health isn’t full? No, that’s not true. I take damage from the skeleton, drink my health back to full, and the potions are still there. Maybe it’s being in combat? I kill the skeleton, and my potions still persist. I test so much that I find this out: if I stand near the map entrance my potions work fine; if I go further in towards the skeleton they stop working. I can move back and forth a few tiles and watch my potions break and fix! Surely this can’t be related to map position. I trace all sorts of variables but nothing turns up.

Time for a break.

A minute into my break and the answer is obvious. The potions aren’t working when the skeleton sees me.

When the skeleton can see me, he’s creating a warning beacon every frame. When I move towards the exit he can’t see me anymore, and he’s not doing his warnings anymore.

When I drink a potion, there’s a “used_item” field that is set in the PowerManager. Another part of the code, later in the frame, looks for used items and removes them from the player’s inventory. Well, the enemy beacon spell doesn’t require an item, so it was resetting used_items to “no item used”. In a single frame the hero’s actions are processed first, then enemy actions, then afterwards is the cleanup code that checks for used items.

Previously, it was very rare for a hero and an enemy to use a power on the exact same frame. Even when it did happen, the consequences almost never mattered. With this new code, though, enemies are dropping beacons constantly. So this bug’s been in my code for months and only manifested now: enemy powers were resetting the hero’s powers “used_item” field. Thus making my potions endless if I was in sight of an enemy.

These are the weird bugs that can haunt a project for months. And apparently, keep programmers up until 3am. Feels good to solve ’em though.

2011/07/18

Catching up on GitHub

I took a few days away from GitHub and Flare to write part of a book chapter, give a talk, and handle other strange affairs. I plan on doing some catching up tonight.

Visual Story

I’m working with Flare concept artist Justin Nichol on hammering out the visual story of Flare’s first game. We took the map progression I posted about recently and wove it into a basic story. Justin is working on various environmental concept pieces which will guide the building of new tile sets.

I plan to post more about the story soon.