Just wanted to follow up on world maps with grass.
Well looks like the hard part's done, we have a map. Pretty sure the rest of the game is just details.
Saturday, July 26, 2014
Friday, July 25, 2014
Tower-Flippers! Wednesdays at 7 on HGTV!
I was talking to Nate about the "scale" of most of the art for Legacy. Namely, how thick are the outlines and how detailed do things get? We both kinda like the "smaller" scale that I tend to go with on most pieces like this. I let the outlines stay relatively thick, as if you're looking at a picture that someone drew instead of marveling at a Skyrim-scale behemoth of detail.
Play to your strengths, they say.
World Map
I took a few days to sketch this out. These are generating programmatically in about 45ms, give or take.
Here's what it looks like zoomed most of the way out:
And here's a close up on the starting town for this instance:
Oh I still gotta add grassland, dang. But yeah it's looking almost usable. The layer images in the upper left of these shots is kinda cute: based on the presence of lakes I'm deciding how wet it is, and based on the presence of mountains I'm deciding how cold it is. Those two factors control what trees can spawn there. Dunno if they'll influence other in-game things yet. But they could.
Almost... usable...
Here's what it looks like zoomed most of the way out:
And here's a close up on the starting town for this instance:
Oh I still gotta add grassland, dang. But yeah it's looking almost usable. The layer images in the upper left of these shots is kinda cute: based on the presence of lakes I'm deciding how wet it is, and based on the presence of mountains I'm deciding how cold it is. Those two factors control what trees can spawn there. Dunno if they'll influence other in-game things yet. But they could.
Almost... usable...
Thursday, July 24, 2014
Monday, July 21, 2014
Responding to Feedback
We gathered a ton of feedback on Saturday from at our informal indie game dev meetup. So here's what I've done:
* attack is now always visible even if there's nothing nearby or you're out of time.
* added a status text area that shows the camera controls.
* you no-longer attack by clicking the attack ability, now you always click on the unit you want to attack.
* no longer get ability feedback when it's not your turn.
* when an action is possible, we predict the results of that action and show you in a tooltip. So you can see how likely your attack is to hit and how much damage it will do, and whether it will kill the dude.
Prediction tooltips:
And with that.. we may pivot and take a look at the campaign again, because the other major feedback that we got is that people want a story or overarching structure, in order for the game to make sense. I think having a rudimentary campaign in place will be really helpful for driving mission combat forward as well, because it will motivate unit upgrades, gear, new monsters, and new scenarios. And I'm excited to have something that resembles the whole game that we have in our heads.
The first iteration of the campaign is likely to be pretty simple, just a framework to see some continuity between missions. Then comes resource allocation, world map, and then the possibilities really open up.
O.O
* attack is now always visible even if there's nothing nearby or you're out of time.
* added a status text area that shows the camera controls.
* you no-longer attack by clicking the attack ability, now you always click on the unit you want to attack.
* no longer get ability feedback when it's not your turn.
* when an action is possible, we predict the results of that action and show you in a tooltip. So you can see how likely your attack is to hit and how much damage it will do, and whether it will kill the dude.
Prediction tooltips:
And attack ranges:
And with that.. we may pivot and take a look at the campaign again, because the other major feedback that we got is that people want a story or overarching structure, in order for the game to make sense. I think having a rudimentary campaign in place will be really helpful for driving mission combat forward as well, because it will motivate unit upgrades, gear, new monsters, and new scenarios. And I'm excited to have something that resembles the whole game that we have in our heads.
The first iteration of the campaign is likely to be pretty simple, just a framework to see some continuity between missions. Then comes resource allocation, world map, and then the possibilities really open up.
O.O
Saturday, July 19, 2014
Placeholder Sounds
I've integrated the placeholder sounds and Candy's music (on the title page only for now), so now the game makes noise.
I also tweaked the combat, vastly reducing the variance in the attack roll, and fixed a few bugs in the process. The combat is feeling more predictable now, but that AI is still kindof a chicken. Need to do something about that heh.
By the way, we are not working on Mac at the moment, due to some complexities with openGL, Mac, and LibGDX*.
*TECHNICAL NOTE: The long and short is that developing on a PC is easy mode. The drivers are all super forgiving and as compatible as possible. So when you take that code anywhere else you suddenly realize how many mistakes you're making that have been silently ignored up til now. On top of that, there is a legit bug in libGDX not actually creating a 3.2 core context. That makes it impossible for me to move forward with Mac compatibility without either: A, fixing a lot of core compat issues with libGDX itself, or B, reverting all my shaders to be compatible with OpenGL 2.1. So I guess I might have to do the latter, if it comes down to it. Hopefully it doesn't, I'd rather move forward targeting 3.2 as my min spec. We shall see.
I also tweaked the combat, vastly reducing the variance in the attack roll, and fixed a few bugs in the process. The combat is feeling more predictable now, but that AI is still kindof a chicken. Need to do something about that heh.
By the way, we are not working on Mac at the moment, due to some complexities with openGL, Mac, and LibGDX*.
*TECHNICAL NOTE: The long and short is that developing on a PC is easy mode. The drivers are all super forgiving and as compatible as possible. So when you take that code anywhere else you suddenly realize how many mistakes you're making that have been silently ignored up til now. On top of that, there is a legit bug in libGDX not actually creating a 3.2 core context. That makes it impossible for me to move forward with Mac compatibility without either: A, fixing a lot of core compat issues with libGDX itself, or B, reverting all my shaders to be compatible with OpenGL 2.1. So I guess I might have to do the latter, if it comes down to it. Hopefully it doesn't, I'd rather move forward targeting 3.2 as my min spec. We shall see.
Thursday, July 17, 2014
Playtestable
I've got a version of Legacy in dropbox that should be playable. If you have access feel free to check it out and send me your notes. It's java so you'll need the latest java installed, but it should work on PC/Mac/Linux*. If you don't have access but would like to help playtest, let me know. I will likely give you access, though certain restrictions may apply. I want to organize regular online playtests once we have a little more gameplay up and running. I'll send out an email / social media blast to gauge interest.
Warning if you try it - it's not all that user-friendly or fun yet. In the parlance of the game industry, we're still in pre-alpha.** Oh also and there's no victory detection for the mission. If you kill the boar, give yourself a cookie. If you all die, do a pushup.
* Tested with a sample size of 1. Thanks James!
** The terms 'alpha' and 'beta' assume that you have some kind of schedule and really some idea of what you're building.. Here we have the luxury of exploring our options and changing direction quickly, so those terms mean less. But really - it's
Warning if you try it - it's not all that user-friendly or fun yet. In the parlance of the game industry, we're still in pre-alpha.** Oh also and there's no victory detection for the mission. If you kill the boar, give yourself a cookie. If you all die, do a pushup.
* Tested with a sample size of 1. Thanks James!
** The terms 'alpha' and 'beta' assume that you have some kind of schedule and really some idea of what you're building.. Here we have the luxury of exploring our options and changing direction quickly, so those terms mean less. But really - it's
Wednesday, July 16, 2014
Towards Fun
I spent a lot of time today rewriting the way that Legacy handles regions, after I found some pretty bad issues yesterday in the course of working on AI. The new system is fast and flexible and I think it will hold water for a while. In the process of fixing that up I squashed a lot of bugs that were messing up the AI and the game generally, so now I have (what appears to be) a game that runs with no broken assumptions.
At the end of the day today I spent some time tuning AI, for performance and quality. After all the performance work I'm able to easily explore 40k scenarios per move, where before I was setting that number to 1.5k to 3k. I finally feel like the algorithm isn't starving to death. The big quality changes were that I lowered the "exploration factor" and increased the bias and the aggressiveness, by making the scoring system care much more about the enemy's health than its own. There are still some funny scenarios though, where it gets into standoffs, and I think right now it relies too much on the "roll out" to do the damage, so it spends time running away instead of biting heroes. I think I can tune that out.
Well anyway the game almost feels like a game, but not yet a very fun one. The surround mechanic is alright. I can't tell if it's going to get tedious or not. Right now it's the only way the heroes can do any real damage to the boar, which means I spend most of my time trying to set up a turn where I surround the boar, without letting him bite me. If the boar were more aggressive that would likely feel better, since yeah I might get bit but I wouldn't have to chase him around the map with a rolled up newspaper.
The main mechanical problem I see is that attacks are wildly unpredictable. I'm using an attack roll similar to Fate, and I think what I'm seeing is that Fate has a ton of mechanics around modifying the result after the roll, by tagging this or that. Legacy doesn't have those right now, and what that leaves you with is the raw dice, which are pretty brutally random.
The other thing that feels bad is that the heroes don't have quite enough tools. They need either an overwatch, or some heroics, stunts, saving throws, healing surges, fatigue potions, some kind of extra rule-breaking mojo. Some way to break up the "I walk up to you and end my turn and you hit me" gameplay.
So, if you can't tell by my tone of voice, this is extremely exciting! I'll be thinking about the combat formula, and about what kind of abilities I can add in to round out basic melee. It's like a game!
At the end of the day today I spent some time tuning AI, for performance and quality. After all the performance work I'm able to easily explore 40k scenarios per move, where before I was setting that number to 1.5k to 3k. I finally feel like the algorithm isn't starving to death. The big quality changes were that I lowered the "exploration factor" and increased the bias and the aggressiveness, by making the scoring system care much more about the enemy's health than its own. There are still some funny scenarios though, where it gets into standoffs, and I think right now it relies too much on the "roll out" to do the damage, so it spends time running away instead of biting heroes. I think I can tune that out.
Well anyway the game almost feels like a game, but not yet a very fun one. The surround mechanic is alright. I can't tell if it's going to get tedious or not. Right now it's the only way the heroes can do any real damage to the boar, which means I spend most of my time trying to set up a turn where I surround the boar, without letting him bite me. If the boar were more aggressive that would likely feel better, since yeah I might get bit but I wouldn't have to chase him around the map with a rolled up newspaper.
The main mechanical problem I see is that attacks are wildly unpredictable. I'm using an attack roll similar to Fate, and I think what I'm seeing is that Fate has a ton of mechanics around modifying the result after the roll, by tagging this or that. Legacy doesn't have those right now, and what that leaves you with is the raw dice, which are pretty brutally random.
The other thing that feels bad is that the heroes don't have quite enough tools. They need either an overwatch, or some heroics, stunts, saving throws, healing surges, fatigue potions, some kind of extra rule-breaking mojo. Some way to break up the "I walk up to you and end my turn and you hit me" gameplay.
So, if you can't tell by my tone of voice, this is extremely exciting! I'll be thinking about the combat formula, and about what kind of abilities I can add in to round out basic melee. It's like a game!
Tuesday, July 15, 2014
Black Castle Ruins, live
Finally, I finished a live version of the first music demo:
And that is why I say no to samples.
I'm actually not sure how I feel about the timpani anymore, but I figured I'd leave it in. I have versions exported both ways, actually, and put the one without timp on my personal soundcloud. When I first wrote the piece I felt like it needed something to push it forward, but when you have a real person playing instead of just the samples, the tension is there on its own. On the other hand, I often neglect percussion, which rarely seems to be a popular choice, so I'm probably missing the point.
I wrote second short piece weeks ago that I meant to record at the same time as this one, but it was too much to do all at once. I've been recording with some small regularity lately, though, so at least setup and settings don't seem like as big of an undertaking anymore.
The next one will be a campfire/party sort of piece - the kind of thing you get together and play for entertainment with other village people who feel like socializing, drinking, and maybe dancing. Incredibly different from what I just posted. After that I think I have enough understanding of the workings of the game to take a stab at some sort of atmosphere or looping piece that could theoretically work in an actual gameplay scenario. Then I guess we'll see if anything starts to settle in and indicate a good real direction to go, or make more crazy things and just see what happens (nose-flute playing boars? eh? eh?).
And that is why I say no to samples.
I'm actually not sure how I feel about the timpani anymore, but I figured I'd leave it in. I have versions exported both ways, actually, and put the one without timp on my personal soundcloud. When I first wrote the piece I felt like it needed something to push it forward, but when you have a real person playing instead of just the samples, the tension is there on its own. On the other hand, I often neglect percussion, which rarely seems to be a popular choice, so I'm probably missing the point.
I wrote second short piece weeks ago that I meant to record at the same time as this one, but it was too much to do all at once. I've been recording with some small regularity lately, though, so at least setup and settings don't seem like as big of an undertaking anymore.
The next one will be a campfire/party sort of piece - the kind of thing you get together and play for entertainment with other village people who feel like socializing, drinking, and maybe dancing. Incredibly different from what I just posted. After that I think I have enough understanding of the workings of the game to take a stab at some sort of atmosphere or looping piece that could theoretically work in an actual gameplay scenario. Then I guess we'll see if anything starts to settle in and indicate a good real direction to go, or make more crazy things and just see what happens (nose-flute playing boars? eh? eh?).
AI is Hard
I've got the the MCTS algorithm working, at least nominally. It makes choices and it puts up a fight, for sure. Right now I think it's less than satisfying to play against, and I'm trying to figure out why.
The main symptom is that it runs away, and I have to chase it all over. It is actually a moderately effective strategy, but not one that feels fun. The next symptom is that it sometimes isn't aggressive enough. This could just be a bug.. I need to get more insight into how it's working to be able to say for sure.
It's been a lot of work to get this up and running so I don't want to immediately scrap it for a goal and heuristic based approach, but so far I'm disappointed with the performance, even after a few optimization rounds, and I feel like I could get equivalent behavior much cheaper with an expert/goal system.
Hmmmm...
The main symptom is that it runs away, and I have to chase it all over. It is actually a moderately effective strategy, but not one that feels fun. The next symptom is that it sometimes isn't aggressive enough. This could just be a bug.. I need to get more insight into how it's working to be able to say for sure.
It's been a lot of work to get this up and running so I don't want to immediately scrap it for a goal and heuristic based approach, but so far I'm disappointed with the performance, even after a few optimization rounds, and I feel like I could get equivalent behavior much cheaper with an expert/goal system.
Hmmmm...
Sunday, July 13, 2014
Look Ahead Rabbit Hole
So for a turn based game with indeterminacy, incomplete information, a high branching number, you have a few choices for AI. My fallback has always been "eh make a heuristic and call it good," but I've been reading, and I want to take a stab at doing some actual prediction and min-maxing.
For that, Monte-Carlo Tree Search appears to be the framework of choice. It has used successfully for games like Go that have heavily resisted other computerized techniques. The basic idea is that you pick a move, go a little way down, and then randomly simulate the rest of the game after having made that move. If you win more than you lose, make a note of it. Now pick a new move to test, and strike a balance between exploiting the most promising moves and exploring new moves. Each time, push your simulation a little further into the future, making it more accurate. When you're out of time, pick the best move so far. (Most visits, probably.)
So, that sounds like a good match for Legacy AI: pick a bunch of potential moves, test them out for 2-3 turns in the future, pick the best*. And since you're biased to explore the most promising moves, you make better decisions without having to thoroughly explore the entire possibility tree. One big advantage of this approach is that it requires no expert knowledge of the game domain (though it can benefit from expert-driven heuristics) in order to pick good moves. So as balance progresses, abilities are added and removed and numbers get tuned, the AI should be able to plod along more or less fine. When the game design is fairly stable, then you come back and write some heuristics to make it converge faster.
The rabbit hole is that in order to implement this, I need to be able to simulate the future in a fast and lightweight way. So, I think this means that I need changes that I apply to the game state to be reversible. Yesterday and today I've been ripping out my ChangeHandler and OutcomeProcessor classes to separate the pieces that calculate change from the pieces that actually apply the change. It's been a tricky refactor but I can tell it's making the code better overall. What used to be one big tangled mess is now just 3 unsightly contraptions. Progress.
* I have the feeling "pick the best" is going to be its own rabbit hole; scoring an outcome is not as simple in an asymmetrical game like legacy, because there's not really a binary win/lose condition for the AI, or at least, the AI is not likely to "win" by killing all the heroes and I don't particularly want it to. But in order for the algorithm to work properly some outcomes need to be preferred, so I'll have to figure out how to score playthroughs in a way that causes the MCTS to select "realistic" AI play. Should be fun.
For that, Monte-Carlo Tree Search appears to be the framework of choice. It has used successfully for games like Go that have heavily resisted other computerized techniques. The basic idea is that you pick a move, go a little way down, and then randomly simulate the rest of the game after having made that move. If you win more than you lose, make a note of it. Now pick a new move to test, and strike a balance between exploiting the most promising moves and exploring new moves. Each time, push your simulation a little further into the future, making it more accurate. When you're out of time, pick the best move so far. (Most visits, probably.)
So, that sounds like a good match for Legacy AI: pick a bunch of potential moves, test them out for 2-3 turns in the future, pick the best*. And since you're biased to explore the most promising moves, you make better decisions without having to thoroughly explore the entire possibility tree. One big advantage of this approach is that it requires no expert knowledge of the game domain (though it can benefit from expert-driven heuristics) in order to pick good moves. So as balance progresses, abilities are added and removed and numbers get tuned, the AI should be able to plod along more or less fine. When the game design is fairly stable, then you come back and write some heuristics to make it converge faster.
The rabbit hole is that in order to implement this, I need to be able to simulate the future in a fast and lightweight way. So, I think this means that I need changes that I apply to the game state to be reversible. Yesterday and today I've been ripping out my ChangeHandler and OutcomeProcessor classes to separate the pieces that calculate change from the pieces that actually apply the change. It's been a tricky refactor but I can tell it's making the code better overall. What used to be one big tangled mess is now just 3 unsightly contraptions. Progress.
* I have the feeling "pick the best" is going to be its own rabbit hole; scoring an outcome is not as simple in an asymmetrical game like legacy, because there's not really a binary win/lose condition for the AI, or at least, the AI is not likely to "win" by killing all the heroes and I don't particularly want it to. But in order for the algorithm to work properly some outcomes need to be preferred, so I'll have to figure out how to score playthroughs in a way that causes the MCTS to select "realistic" AI play. Should be fun.
Friday, July 11, 2014
Legacy Logo Progress
I took an evening and banged out a logo concept that will work fine for now.
We're mostly using the one wit the tower and the green vines, though the one with just the tower works better on busier pieces of art.
Dudes on a Cliff
Filed under "possible backdrop for main menu."
Nate's like, "Except we should have your own characters programmatically populate the cliff!"
And I'm like, "Man, that's why you're the idea guy!"
Thursday, July 10, 2014
Booting up AI
Yesterday I bought this book and read it. It was a good read. I feel almost ready to design some AI now. There's a bit more theory I'd like to refresh on, mostly around min-max searches, which were not really covered since the focus was on real-time decision making, but overall I feel ready to start laying down some ideas. Legacy is going to be impossible to analyze in closed form, due to the branching factors, not to mention randomness, so a chess-like min-max approach isn't really applicable, but I think short term goals like "get in range," "deal damage", "avoid being surrounded" are pretty appropriate.
My overall goal for the mission AI, well, I keep waffling. On one hand it would be best to have creatures that acted like creatures, and on the other hand it would nice to have an opponent that played like a human. It's a PvE or PvP kind of question. Funny, when GMing a tabletop game, I landed squarely in the PvE camp, but playing Descent for a couple of years has altered my outlook.
Descent actually handles the problem in a few ways. The threat mechanic and cards give the overlord to feel powerful in a very mechanically constrained way, and restrictions on monster movement and spawning, combined with the incentive to slow down the player, and naturally expendable monsters, tend to make the monsters feel pretty much like you want them to in a fantasy game: dumb but dangerous.
I guess we'll see where Legacy ends up! I guess my goal is going to be to make the AI as good as I can, but to give it goals and abilities that lead it away from "turtling" and towards an aggressive, "mindless evil" kind of feeling. What that means in practice, I think, is giving it goals like "deal as much damage this turn as you can." and prioritizing that above "survive to next turn."
My overall goal for the mission AI, well, I keep waffling. On one hand it would be best to have creatures that acted like creatures, and on the other hand it would nice to have an opponent that played like a human. It's a PvE or PvP kind of question. Funny, when GMing a tabletop game, I landed squarely in the PvE camp, but playing Descent for a couple of years has altered my outlook.
Descent actually handles the problem in a few ways. The threat mechanic and cards give the overlord to feel powerful in a very mechanically constrained way, and restrictions on monster movement and spawning, combined with the incentive to slow down the player, and naturally expendable monsters, tend to make the monsters feel pretty much like you want them to in a fantasy game: dumb but dangerous.
I guess we'll see where Legacy ends up! I guess my goal is going to be to make the AI as good as I can, but to give it goals and abilities that lead it away from "turtling" and towards an aggressive, "mindless evil" kind of feeling. What that means in practice, I think, is giving it goals like "deal as much damage this turn as you can." and prioritizing that above "survive to next turn."
Tuesday, July 8, 2014
Mouse Lock and FXAA
I solved a riddle today.
This one you need to see at 100% to appreciate. NVIDIA has this tech they call FXAA, which is fairly cool. It does Anti-aliasing on the cheap, and it is apparently turned on by default on my laptop, which means that it has been affecting Legacy this whole time.The thing about it is, when you apply anti-aliasing to text and ui elements, you get blurry text and ui elements. I finally figured this out today because I sat down and made a mouse cursor, in order to implement mouse lock so I can have edge-panning, which I think will be much more intuitive for most people.
So I made this cursor,
Which is ok maybe a little silly but that's not the point. When I first loaded it in, I noticed it looked blurred, it was not pixel perfect. Turns out it was FXAA. When I turn it off, all of the UI elements suddenly look much better, and of-course all of the in-world elements look a lot worse. But that is something I'm going to have to deal with anyway because app-level FXAA is not available on every card, so I won't be able to rely on it.
I should be able to use it on just the in-world stuff by linking in the shader NVIDIA provides, which ought to be a nice performance boost over straight MSAA, which was what I originally thought I was going to have to do. And mostly I'm happy to finally have crisp clear text.
Ahem and edge panning is in. It feels.. I don't know. I need to play around with the controls more I think. It's usable though and good enough to move on. When I know what to tweak I'll probably revisit it. I'm playing with stats a bit too and iterating on the "Hunt" scenario.
The goal is for 3 farmers to barely but reliably be able to defeat a Boar monster. Right now it's just a little too tough, and I think I need to add in a defensive buff, ala "hunker down" or "dodge," that the farmers can use in order to more safely surround the boar. I want the boar to feel dangerous, and I want the farmers to have enough tactical tools that the puzzle has a solution every time.
Monday, July 7, 2014
Who's Turn
Participants are listed at the top of the screen. The center top area where the end turn button is now changes based on whose turn it is, and the chat log also informs you when your turn starts.
Multiplayerness and Surround Mechanic
Multiplayer is coming into focus. We now have chat (front and back), a lobby (front and back,) automatically updating the game list, reporting connection errors in the chat log, giving a list of who's online..
We also have a "surround" mechanic that James helped me paper prototype. Surround gives -N on defense, where N is 7-Gap, where gap is counted thusly: Take the 8 squares surrounding your figure and look for the longest continuous span that is free of enemy figures. So in the example above, gap would be 3 and surround would give each of those figures +4 on attack. Well it gives the boar -4 on defense which works out to the same thing.
The other mechanic that's in, but not terribly visible from a static shot, is Threatened squares. All those orange outlines represent regions (also new tech over the last few days) that the figures threaten. Moving out of a threatened square costs extra movement. So in combination the idea is that these two mechanics add a lot of texture to combat in the environment: all of a sudden walls are important, because if you're standing next to one you can't be as badly surrounded, but also you can be pinned against one because it is difficult to move past enemy figures.
Right now there's no AI, and the multiplayer mission ui is unhelpful. My goal today is to get the multiplayer ui in shape for playtesting, which means turn notifications and combat log improvements so it's more clear what's going on. From there, I need to plan out how I'd like AI to work, and also I need to polish the combat and the Hunt scenario for playtesting.
Subscribe to:
Posts (Atom)
















