Petey
|
|
« on: January 22, 2016, 09:45:36 AM » |
|
Overview Kingdoms and Castles is a medieval city building game where you construct castles to protect your peasants from a living and dangerous world. Dramatic stories will play out in your kingdom based on decisions you’ve made. Do the viking raiders make off with your villagers? Or are they stopped, full of arrows, at the castle gates. Does a dragon torch your granary, your people dying of starvation in the winter, or are you able to turn the beast back. Your success as a ruler depends on your city and castle planning.
|
|
« Last Edit: August 11, 2016, 01:56:10 PM by Petey »
|
Logged
|
|
|
|
Petey
|
|
« Reply #1 on: January 23, 2016, 11:42:13 AM » |
|
Logged some work we did previously. Not much too look at yet but I set up some roads, with all the pieces required so that they link appropriately (straights, elbows, t-joints and 4-way crosses). You build them tile by tile to expand your territory. My friend set up the river tech, so we can have some variation in the maps.
|
|
|
Logged
|
|
|
|
Petey
|
|
« Reply #2 on: January 25, 2016, 09:46:19 AM » |
|
I noticed our colors were looking pretty drab, so I took a screenshot and did a lot of hue, saturation, and color balance experiements in gimp. I played with lights and darks (should roads be dark and the ground lighter?) and also whether we should skew warm colors vs. cooler colors: Which lead us to the next color pass in game (also note the new church): Interesting thing about the game mechanics in this project is we're 'sounding it out' as we go. I've been modeling the buildings in Quibcle, putting them in the game, then deciding what they should do and how they should work. I started with houses, which 'generate' up to 3 people. Then I made the fields, which generate crops. Then the people might as well eat the crops. That lead to a happiness calculation (0-100) where people are happy so long as they can eat. So far we have: - Roads (cost 1 wood): all buildings must be built near a road - Houses(cost 5 wood): holds up to 3 people. - Fields(cost 10 wood): grow crops and require 2 people. - Stone cutter(cost 15 wood): produces stone, requires 5 people And now we've got the church (which you can see in the above screenshot) and it employs two people. Once you population passes 50 people a 'church requirement' is factored into the peasants happiness. Right now they want one church per 100 people or else they start getting unhappy. The church system accounts for 25% of their total happiness (food being the other 75%).
|
|
|
Logged
|
|
|
|
HopFrog
|
|
« Reply #3 on: January 25, 2016, 10:01:22 AM » |
|
Gosh, I absolutely love the aesthetic on this one! Reminds me a whole lot to Stonehearth. Can't wait to see a little more!
|
|
« Last Edit: January 25, 2016, 10:10:57 AM by HopFrog »
|
Logged
|
|
|
|
Greipur
|
|
« Reply #4 on: January 25, 2016, 10:06:15 AM » |
|
Hi Petey. Just wanted to stop by and give you some feedback on finding a good colour composition for your game. If you want your game to "pop" I would recommend that you spend a lot of time on lighting and shadows, that's basically what you need to make a low poly game look enticing imo. Define the light source(s), what point of the day is the game taking place? How strong/weak? And above all, colour the shadows. Shadows picks up the colour of the sky, black or grey shadows (which I think yours are?) are normally only seen in-doors, if at all. Maybe this is stuff you already know but if you want more in-depth knowledge I can really recommend James Gurney's Color and Light and Richard Yot's Light for Visual Artists.
|
|
|
Logged
|
|
|
|
Petey
|
|
« Reply #5 on: January 25, 2016, 08:21:05 PM » |
|
Hi Petey. Just wanted to stop by and give you some feedback on finding a good colour composition for your game. If you want your game to "pop" I would recommend that you spend a lot of time on lighting and shadows, that's basically what you need to make a low poly game look enticing imo. Define the light source(s), what point of the day is the game taking place? How strong/weak? And above all, colour the shadows. Shadows picks up the colour of the sky, black or grey shadows (which I think yours are?) are normally only seen in-doors, if at all. Maybe this is stuff you already know but if you want more in-depth knowledge I can really recommend James Gurney's Color and Light and Richard Yot's Light for Visual Artists. That's good advice. Your right our shadows are probably a bit gray. I'll have look into figuring out colored shadows in Unity and get a bit of blue in there. I had read Color and Light a while ago, it's pretty good. I haven't heard of Light for Visual Artists though, I'll have to check that out. Always hungry for more art knowledge!
|
|
|
Logged
|
|
|
|
Greipur
|
|
« Reply #6 on: January 26, 2016, 02:18:54 AM » |
|
To change the colour of the shadows you need to tweak the Ambient Color, you find it from Window>Lighting (in Unity 5, it was located differently in 4). Yeah, Color and Light is really nice. Although I'm more inspired by Gurney's work than Yot's I do think that Light is a more exhaustive look at lighting in general, it's not focused on painting either (although of course you can take most knowledge from painting to games). They complement each other nicely imo.
|
|
« Last Edit: January 26, 2016, 10:52:16 AM by Greipur »
|
Logged
|
|
|
|
Petey
|
|
« Reply #7 on: March 02, 2016, 09:24:48 AM » |
|
To change the colour of the shadows you need to tweak the Ambient Color, you find it from Window>Lighting (in Unity 5, it was located differently in 4). Yeah, Color and Light is really nice. Although I'm more inspired by Gurney's work than Yot's I do think that Light is a more exhaustive look at lighting in general, it's not focused on painting either (although of course you can take most knowledge from painting to games). They complement each other nicely imo. Ah, so that's how you do it. Our ambient source was set to 'Skybox' which may or may not have been incorporating blue into the shadows (it's just the default skybox). When I changed it to color, I can definitely make the shadows blue, but everything got over brightened. I'll have to play around with that some more and see if I can get something looking nice. In the mean time, I modeled a granary to store your peasants food: It's based on actual granaries, which it turns out were built elevated off the ground on mushroom shaped stones to help deal with moisture and rats. And played the game up to 100 people, tuning is pretty rough (as you can see I'm out of food and my peasants are starving) but it's feeling a little like an actual game!
|
|
|
Logged
|
|
|
|
Petey
|
|
« Reply #8 on: March 07, 2016, 08:58:33 PM » |
|
Added a season cycle, which helps mark the passage of time. It also provided a natural place to add some gameplay: crops don't grow and food can't be harvested in winter, so you have to make sure to grow enough food to last. Setting up the snow was pretty fun. Because the terrain is a custom generated mesh, we had to write a special shader to fade in the snow on the ground efficiently. It's pretty simple, we just blend in the snow color on top of the normal texture color in the pixel shader, like so: float4 c = tex2D (_MainTex, IN.uv_MainTex); float4 finalColor = c * (1 - _SnowAlpha) + (_SnowColor * _SnowAlpha); For the trees, we actually have a snow cube for each one that scales in and out. Had to write a custom tree manager because calling unity's Update() on them as a monobehavior was too slow. Lastly we pulled the fog distances in during winter, which makes it feel extra cold And the results look like this:
|
|
|
Logged
|
|
|
|
Davi Vasc
|
|
« Reply #9 on: March 09, 2016, 09:57:47 AM » |
|
Looks very charming. Nice work
|
|
|
Logged
|
|
|
|
Petey
|
|
« Reply #10 on: March 18, 2016, 09:16:03 AM » |
|
Spent some time on a tree growth algorithm. After a few failed systems, we eventually came up something close to a cellular automata type system: First, populate the map with an initial pattern of trees. We use some thresholded perlin noise to place starting trees: val = Mathf.PerlinNoise(x / GridWidth * frequency, z / GridHeight * frequency); //just played with frequency until it looked good if(val > 0.5f) { //growth between 1 and 4 trees on the cell } Then every tree system tick (which runs about every 30 seconds), we evaluate each cell. - If a cell is empty, build a percentage chance to grow a new tree that increases for each neighboring tree. So cells surrounded on all sides by forest are very likely to become new forest. Otherwise the forest spreads more slowly. - If a cell has trees already, the more trees it has, the higher chance it has to grow new trees. Dense forest regrows quickly, while light forest takes longer. - Cap out tree growth at 4 trees per cell. - No new growth during winter This gives us just about all the knobs for tuning gameplay we'll need. Still needs some work though because it can completely cover the map (which then makes having trees as resources meaningless), but the growth pattern looks pretty cool:
|
|
|
Logged
|
|
|
|
Petey
|
|
« Reply #11 on: August 11, 2016, 01:54:39 PM » |
|
Alright, have some time to work on this project again, but first gonna run through my backlog of updates. Experimented with forest fires and fire spreading. Initially started with logic where each fire tile looks for an adjacent tile and randomly decides to spread. This however proved to be too aggressive and generated so much fire it slowed the game down: Eventually settled on different 'spread chances' for tile type. Forest tiles have a high chance to catch fire, when all the trees are burned they turn into meadow tiles, which have a smaller chance. That we we get a nice effect where fire sweeps the forest and leave a few straggling flames. Also made it so fires are less likely to spread when it's snowing or raining.
|
|
|
Logged
|
|
|
|
Greipur
|
|
« Reply #12 on: August 12, 2016, 06:24:42 AM » |
|
Always interesting to see games utilising elemental forces that spread, for example water in Minecraft or fires in Stronghold 1. Makes for interesting decisions, at least in management games. Looking forward to see more about this.
|
|
|
Logged
|
|
|
|
Pixel Noise
|
|
« Reply #13 on: October 04, 2016, 08:26:08 AM » |
|
I love the art and overall style - the transition into and out of the snow is great. Looking forward to seeing more
|
|
|
Logged
|
|
|
|
|