Thursday, 15 August 2013

Folk Tale Dev Blog 10

By Simon Dean, Project Lead

In an effort to share even more with the Folk Tale community, we're moving from monthly to fortnightly blogs. We've also started to use Google Hangouts internally which has the option to live stream on YouTube. I've previously mentioned in the Steam Forums that I'd like to facilitate Community-Developer hangout sessions, and as part of that I want to share the team's desktops so you can see how Folk Tale is developed. In terms of time frames we hope to start those sessions in November.

Location Editor

One of the most important and fun systems we want to test in the Tower-Defense mini-game is City Walls. In Sandbox you will be able to construct wooden palisades to protect your tier 1 village, and as the game progresses and you gain in power and wealth, stone walls. For the mini-game we're going to focus on stone walls, and throw wave after wave of goblin forces at you.

City Walls


Having built your walls, defensive weapons and traps, the goblins will fling everything that they have at you in waves of progressive difficulty. Eventually you will be overrun, so the challenge is very much to survive for as long as possible.

As you can see in the screenshots below, your walls are going to take a pounding from the Goblin Trebuchet. Your gatehouse will be tested by Goblin Battering Rams, so be sure to mount those turrets with Ballista and Repeating Crossbows.  Building a few of your own Trebuchet behind your walls should help take out the Goblins own Trebuchets and Ogres, and putting City Guard/Militia up on the battlements will help take out the goblin infantry who'll be scaling your walls ( covered in dev blog 9 ).

City Walls: Damaged



City Walls: Damaged




Further enhancements within the Location Editor include the addition of a randomization feature to provide a starting point to design your locations.  Prop Painting with variable brush size is working in a limited form for trees which we'll include in a future video, and Aron has integrated the tile-based navmesh pathfinding system which is very cool, but very technical. Everything is starting to come together.

Character Customization

Adding variety to the appearance of characters was a big request from the RPG fans in the Community. Having previously covered why it's not possible to add the full visual customization found in RPG games ( see the Sandbox Vision Presentation, it's mostly a memory issue ), we've continued our R&D work into what we can do to inject a little more variety.

There were a number of factors to consider when designing our character customization system.

a) Memory efficiency - we need to reuse as many textures and pieces of geometry as possible, and keep textures as small as possible. The fewer assets required to do the job, the better.

b) GPU Draw Calls - A draw call is made to your graphics card each time a material and/or geometry needs to be drawn on screen. If a character has one material ( which comprises of one or more textures and a shader ) that will result in one draw call. Shadow casting adds another draw call, as do any point lights in a scene.  It's important to keep draw calls as low as possible.

Being able to swap hair, face, body and props at runtime presents a number of challenges. Each hair style is a piece of geometry, each head shape is a piece of geometry, and each body style is two pieces of geometry ( one for clothing, and one for any exposed skin ).  Without optimization, that results in quite a few draw calls ( ignoring point lights for now ):

  hair ( 1 geom draw call + 1 for shadows )
+ head ( 1 geom draw call + 1 for shadows )
+ body clothing ( 1 geom draw call + 1 for shadows )

+ body skin ( 1 geom draw call + 1 for shadows )
= 8 draw calls.

Now multiply that by say 100 characters = 800 draw calls just for characters.

Normally RPG games solve this by packing all of the textures for the character into a unique texture atlas for that character, merge all the geometry into one at runtime, and render it with a single material. That reduces 8 draw calls to 2 ( geom + shadows ), but comes with the cost that each character requiring it's own unique texture. A 2048x2048 DXT5 RGBA texture without mipmaps consumes 4MB of memory. Multiplied by say 10 characters on screen at any one time = 40MB in character textures. That sounds reasonable, until you realize that Folk Tale has maybe 100+ characters on screen at any one time, rocketing that total up to 400MB+. Taking the RPG approach simply isn't an option. MMO's solve this problem by instancing public areas to cap the maximum number of potential players on screen at any one time. Again, that isn't an issue for a single player citybuilder game.

For Folk Tale, we're forced to sacrifice a few draw calls to achieve some improvements in memory efficiency. We made the decision that character classes will wear the same outfits to help players quickly identify a character's role ( e.g. Hunter, City Guard ) just by looking at them. That immediately saves us a lot of texture memory. Next, we atlased hair and skin into one texture so that we can combine the hair, head, and body skin geometry into one. Skin, eyes and teeth are left as color RGB, while hair is grayscale. This is because within skin, there are important hue variations that tinting alone cannot capture. Hair doesn't have that hue variation. This however presents a problem because tinting a flesh color limits the color range available. For this reason we added the ability to desaturate the original skin tone in the shader, allowing us to achieve all possible skin colors, from Hulk green to dark elf purple/gray. Packed into the alpha channel of the skin/hair atlas is a mask that determines how much influence tinting will have. Eyes and teeth are masked as black as they never change color, skin is masked as white, hair is masked as white but with ribbons masked as black, and lips are masked as medium gray, because we want them to be only partially influenced by tinting.  Finally, we paint vertex color channels in the geometry to determine whether skin or hair tinting should be applied.

Character Configuration ( Click To View Full Size )


What all this technical mumbo-jumbo means is that we are able to merge together the hair, head, and body skin geometry into a single piece of geometry, halving the draw call count from 8 to just 4. Multiplied by our 100 characters and we just saved ourselves 400 draw calls.

The next step is to create the face and hair variations.


Siege Machines and Traps

Having presented the concept art for a number of siege machines and traps in Dev Blog 9, the Art Team have finished modelling and animating the Human Repeating Crossbow, Goblin Trebuchet, Goblin Battering Ram, Goo Trap and Flame Trap. The Spike Trap is done but I'm just not happy with it so I think we'll take that one back to concept.



Concept Art

Concept art development continues, with pre-production visualization of the Butcher and Hunter, Butcher's Shop, Fisherman's Hut and Hunting Lodge all completed in the last fortnight. Concept art remains raw and functional rather than beautiful and polished. Being indie we don't want to spend time and funding prettying up concept art when that's better spent elsewhere.

Character Concept: Male and Female Butchers


Character Concept: Male and Female Hunters





Building Concept: Butcher's Shop



Building Concept: Fisherman's Hut



Building Concept: Hunter's Lodge

33 comments:

  1. Nice post guys. Really good to see all the thoughts going in.

    like these shops getting an upgrade, would you also be having houses get an upgrade ? One of the elements of Caesar 3 that i absolutely loved was getting the houses upgraded from a shanty to a palace ! I dont expect that level of upgrades here, but some form of upgrade would be lovely.

    ReplyDelete
    Replies
    1. Cottage upgrades are indeed planned.

      Delete
    2. Just a suggestion you should try and incorporate a type of zone e.g. if you have certain amount of tier 2 housing in a certain area it increase the amount of xp of the workers in the certain radius of the zone, making players think about placing of structures. Wayne

      Delete
  2. It's just looking more and more amazing as time goes on! Animations look superb.. love how the battering ram, sways with the weight afterwards.

    Dont rush it guys, keep to this amazing quality of work - and very soon we will have the 'BEST' RPG/Strategy/call it what you will - fantasy game ever.

    ReplyDelete
  3. What about that Linux version? I can't wait to play it!

    ReplyDelete
    Replies
    1. This is the best place to keep up with Linux related Folk Tale News:
      http://steamcommunity.com/app/224440/discussions/7/864971287485579661/

      Delete
  4. Looks awesome and it seems to be rounding up nicely.
    I think the castle walls being destroyed looks superb!
    One thing I'd add to the character models is maybe a butchers knife that the butchers could all carry and hunter could have bows on their back.
    Looks great though and I cant wait to try it out!

    ReplyDelete
    Replies
    1. The Hunters use crossbows and will carry one on their backs. Butchers will use a cleaver - looks cooler than a knife.

      Delete
  5. Loved that.

    Yet the battering ram is swaying somewhat excessively in recoil, in my humble opinion.

    And the hunter and huntress seem greatly annoyed by their choice of job.

    BTW, were there any huntresses apart from Artemis after all? I thought you guys decided to set a real-world asset of occupations. Males do the hunting, fighting and hard work, girls are occupied by home-stuff and all. Was that changed?

    ReplyDelete
    Replies
    1. Chances are once the battering ram is active in the game we'll need to make tweaks to the animation.

      It has always been our intention to have both male and female versions of every character class. There's a pinned topic in the Steam Discussion hub.

      Delete
  6. Brilliant so far! I am very happy to have backed this game!
    Will soldiers be able to mount the walls? And say fire arrows of? Or oil traps on the walls etc!

    ReplyDelete
    Replies
    1. Walls are fully navigable so you can have troops walk on them and patrol. Pouring oil/tar from the walls is something we'll be considering a bit later on.

      Delete
  7. Any ideia for when this mini-game is going to be released??

    Keep up the nice work!

    ReplyDelete
    Replies
    1. As soon as it's ready. Sorry, can't be more specific than that.

      Delete
  8. I truly want to congratulate you guys for being so incredibly detailed in your reporting on progress and what will be showing up in the near future. I've been involved in many, many beta programs but never have I seen a level of interactivity from game devs as I do with your company. I just wish the "I feel like I paid $20 dollars for nothing!" crowd would bother to read these things.

    Once again, awesome work!

    ReplyDelete
  9. Very nice update again. but there is something wrong with the battering ram. It looks like it gets stuck when it sways back.

    ReplyDelete
  10. Love they way its going! I see you have a common theme with the building upgrades so 1 look at it and know what stage its at. I love that, i don't know how many times iv played games where i don's know if a buildings maxed or not. Looking great keep it up.

    ReplyDelete
  11. Looks good... getting me more and more excited for the wall defence game

    ReplyDelete
  12. I'm very happy to be following this project. Top notch game creation and I applaud your involvement with the gamers. What if more of the 'big business' corporations did a little of that, rather than wait until they have a finished product to hear the problems? Very efficient. Please don't worry too much about graphics... what I've seen so far is fine - and your explanation of the trade-offs and solutions are very reasonable. Bravos to all, I am recommending this game to all my friends.

    ReplyDelete
  13. I droр а leaѵе a response each time Ι like a post on a site or I have
    somеthing to contributе to the discussion.
    It is triggeгed by the paѕѕion displayed in the post I
    looked at. Αnd on this article "Folk Tale Dev Blog 10".

    I was excitеd enough to post a leave a
    responsеа response :-) I ԁo have а couρle of questions for you if you usually ԁo nоt mind.
    Could it bе ϳust me оr ԁo
    a few of the remarks сοme across like left by brain deаd people?
    :-P And, if you are posting on additіonal online social sites, I would liκe tο follow anything fгeѕh yοu have to post.
    Cοuld уou lіst eνеrу οne of all yοur
    community siteѕ like уour Fаcebook page, tωіtter feed,
    or linkedin profile?

    Feel frеe to suгf tо my website image suppression

    ReplyDelete
    Replies
    1. You can follow us on facebook.com/folktalegame and twitter.com/gamesfoundry

      Delete
  14. Hey, I am really loving the work so far, happy to have supported you guys. As an animator I really love that sense of exaggeration, the way the wheels come off the ground with the Ram, great sense of follow-through and even anticipation before the swing! Really hope you stick to that style.

    The shops are very well thought out, you can tell exactly what they from a distance, good job. Will we be getting some nice transmission between tiers? how do you plan on making the sudden change? Animation?...a puff of smoke?

    Keep up the good work.

    ReplyDelete
    Replies
    1. Wooden scaffolding and puffs of dust.

      Delete
  15. Butchers hut concept seems a little off, i understand the hunters lodge and fishermans hut using what they have to make it distinguishable but the butchers hut looks like a 2013 fake advertising billboard.
    Maybe a large meat mincer on the side may be better, then the butchers can put the carcass in and man the handle.

    ReplyDelete
    Replies
    1. The main objective is make buildings quickly distinguishable at a distance. If you've played games like Skyrim the first time you play it you have absolutely no idea what each building is because they look too similar. The big cleaver is exactly what you describe: one of those OTT advertising billboards. Like a big lobster outside a seafood restaurant.

      We'll build it like this, and see what the response is from the community.

      Delete
  16. Looks good, ill have to talk your art guy to design my next house for me.

    ReplyDelete
  17. Hola: e visto este juego en stean y me a llamado mucho la atencion. me gustaria preguntar si puedo darle publicidad en mi canal de youtube porque me a gustado mucho y quiero apoyar de alguna forma positiva, para mi seria un gran honor.Saludos

    ReplyDelete
    Replies
    1. Yes you can post videos and live streams of Folk Tale.

      Delete
  18. Great work guys... Please continue, i cant wait to play again!!

    ReplyDelete
  19. Any rough idea of when the next update will be?

    ReplyDelete
    Replies
    1. Patch 0.1.6.0 should be out this week. Next blog is at the end of the month.

      Delete
  20. Kavista

    I love the concept are of the buildings. I've seen other games where it's hard to find the building your looking for. These look very well thought out and all have a theme.

    Will there be character customization with the weapons you put on them or just looks?

    Do you have any details on dungeons yet? I know sandbox is priority. :)

    Thanks for the awesome work and giving us an update!

    ReplyDelete
    Replies
    1. The plan is to show the weapons you equip on the characters.

      No details on dungeons as yet. That's the third major update after the Editor preview and the Tower Defense mini-game designed to test sandbox siege mechanics.

      Delete