TIGSource Forums

Community => DevLogs => Topic started by: protactinium on May 17, 2017, 08:00:42 AM



Title: The Village
Post by: protactinium on May 17, 2017, 08:00:42 AM
[Gameplay]
Become the chieftain of Your village!

Start with 1 worker and build your village!

(https://pbs.twimg.com/media/DA8fndOXgAA7o_F.jpg:large)

HOW TO PLAY:

Using Your mouse click on buildings and other tiles to place workers
Number under the worker icon (1/1) shows current and maximum workers
Building with a worker is [ACTIVE] - this means that you gather resources from it
Buildings generate resources all the time, but put them in their own stockpiles. When You place workers - then You can gather from stockpile.
Workers consume food 0,1 per second.
Farms produce food - 0,35 per second. Workers gather food from farms at speed 1 per second
Forest start with almost full stockpile, but they produce at very low speed 0,05 per second. Once You cut them down, you should build a sawmill
Sawmill produce wood fast, the gather speed is 1,2 per second
House gives space for more workers (1 per house). Additionally houses produce a little amount of gold from taxes.
All gold producing building CONSUME FOOD for gathering
Market give a lot of gold but in exchange for FOOD! (Production 1 per second. Gather 1,5 per second)
If you run out of food you will start loosing workers (1 per second).

Older images:
(https://pbs.twimg.com/media/C_-hCEmUwAIl-7r.jpg:large)



(https://media.giphy.com/media/l4FGGk2RtlqEvirC0/giphy.gif)


[Backstory]
Recently I have stumbled upon a book  "From Animals into Gods: A Brief History of Humankind" by Yuval Noah Harari. It is a story of human evolution - how we first settled down in villages, started farming - and the reasons behind it.
At the same time I have decided to take up making solo games again - there was a gamejam organized by DavitMasia on itch.io in the topic of "1 Bit Clicker". It should be a clicker or idle game.
I decided to develop it and submitted my game called 1 Bit Village. You can play it here: https://protactinium.itch.io/1-bit-village (https://protactinium.itch.io/1-bit-village)
After the jam I decided that I liked it, and want to develop further. It has been developed in Unreal Engine - but I decided that I like Unity much more.... So I rewrote the game into Unity over next 2 weeks.
Now I am starting to add more features to the game...


[Description]
The Village is a sim village builder. Player has to make conscious decisions between sending workers to different buildings as the village economy can easily be mismanaged.
The game utilizes worker placement mechanic known from boardgames.



(https://pbs.twimg.com/media/C_o6awsXUAAIV16.jpg)



Also I have a question to You:
Which color version should I go with?

(https://pbs.twimg.com/media/DACpynEXUAEdjNi.jpg:large)

Twitter: https://twitter.com/91_protactinium (https://twitter.com/91_protactinium)


Title: Re: The Village
Post by: protactinium on May 20, 2017, 10:35:00 AM
Forester Hut now plants trees on new tiles and boosts the wood production on surrounding forests!
(https://media.giphy.com/media/3o7btWQxYF7aZYTtBK/giphy.gif)


Title: Re: The Village
Post by: protactinium on May 21, 2017, 12:47:20 PM
Got the sorting layers sorted out!

Now the workers can move around. (Buildings are getting colliders too!)
(https://media.giphy.com/media/xUPGcH2akPSIlfPEaY/giphy.gif)



And here is a funny error! :
(https://media.giphy.com/media/xUPGcHu4JqABtPxgJi/giphy.gif)


Title: Re: The Village
Post by: low key sirius on May 21, 2017, 07:30:50 PM
I like the green color scheme better than the brown. Makes it feel like the world is growing (spring time) rather than dying (fall time). This looks fun! :handthumbsupL:


Title: Re: The Village
Post by: cepnox on May 21, 2017, 09:17:54 PM
I think, that the brown scheme has more style into it. Although as @MonsterBrothers said, the green one looks more alive.
And what about moving gradually between brown and green as you play, depending on how well you are playing?


Title: Re: The Village
Post by: protactinium on May 21, 2017, 10:50:52 PM
I had a great suggestion on making seasons into the game - then the green would be spring and yellow autumn.

But most people were in favour of green if they would choose so I will pick this one as main and probably incorporate some seasons later


Title: Re: The Village
Post by: protactinium on May 22, 2017, 12:49:11 PM
Progress on buildings:

Now I am making a more GameObject oriented building creation system. The building tiles are constructed from a few separate sprites with their own colliders and sorting order. This means that it is possible to walk around the objects on tiles!
(https://media.giphy.com/media/l4FGyNYecTEJA1z1u/giphy.gif)


Title: Re: The Village
Post by: protactinium on May 24, 2017, 01:44:15 PM
So I worked more on building generation and now it works!
The tiles are slightly randomized but I will work on better randomization
(You can see slight differences between farms and forests, the numbers need to be tweaked though...)
(https://media.giphy.com/media/3ohzdEYp4oa5y8YHvO/giphy.gif)

(https://media.giphy.com/media/3ohzdQeGlAb672pipO/giphy.gif)


Title: Re: The Village
Post by: DisappointedGamer on May 24, 2017, 09:33:29 PM
I really like the art of the tiny people & the houses. Would definitely play it for those reasons.

I love Sim games, and I especially love "Dawn of human history" type of games. My favorite era in Civilization is the beginning - before any scientific advances ruin it :P Idk, I'm weird like that I guess lol.

Seasons sounds like a fantastic thing to add. I think that really adds a huge amount of thematic art to video games. I love weather & seasons. Rain, Lightning, Snow, Blizzards, Severe Weather, Floods, etc. I love that stuff.


Title: Re: The Village
Post by: protactinium on May 25, 2017, 12:37:46 AM
I really like the art of the tiny people & the houses. Would definitely play it for those reasons.

I love Sim games, and I especially love "Dawn of human history" type of games. My favorite era in Civilization is the beginning - before any scientific advances ruin it :P Idk, I'm weird like that I guess lol.

Seasons sounds like a fantastic thing to add. I think that really adds a huge amount of thematic art to video games. I love weather & seasons. Rain, Lightning, Snow, Blizzards, Severe Weather, Floods, etc. I love that stuff.

Thanks!
That is a great idea with weather, did not think about this before
so now it means weather AND seasons - it will be complicated :D


Title: Re: The Village
Post by: protactinium on May 27, 2017, 11:47:39 AM
The farms are now generated semi randomly. They also show growing crops!
(https://media.giphy.com/media/xUA7b51rOJsrB7HZbG/giphy.gif)
(https://media.giphy.com/media/3og0INWx35AcxWnNyU/giphy.gif)



Title: Re: The Village
Post by: io3 creations on May 27, 2017, 02:05:56 PM
That is a great idea with weather, did not think about this before
so now it means weather AND seasons - it will be complicated :D
To reduce the complexity, think of it as the probability of a certain weather event is dependent on the season.  e.g. It's very likely to snow during the winter, slightly possible during fall and spring but not likely during summer. 


Title: Re: The Village
Post by: protactinium on May 28, 2017, 12:10:21 PM
Yes of course. I rather meant the amount of graphic work to add the effects and that I need to develop smart solution :)
I am working on a short actual gamplay gif - will post it soon


Title: Re: The Village
Post by: io3 creations on May 28, 2017, 01:48:11 PM
Since you're using Unity, shaders might help - at least in terms of changing colors for some/many common visual elements.


Title: Re: The Village
Post by: protactinium on May 28, 2017, 01:49:27 PM
Ok I will check out shaders - for now these are all sprites
Updated gameplay gif:
(https://media.giphy.com/media/3o7btYqNVMgc997jDa/giphy.gif)
(https://pbs.twimg.com/media/DA8fndOXgAA7o_F.jpg:large)


Title: Re: The Village
Post by: monikazapper on May 29, 2017, 01:18:04 AM
Interesting village sim! Yes it does look better with the new color version. Maybe later on you could add a bit more color with flowers, shrubs, trees, and water forms (unless you're going for something monochromatic).


Title: Re: The Village
Post by: protactinium on May 29, 2017, 01:21:59 AM
I am planning those exact elements but adding graphic together with making it a little proceduraly random (you can see it on the farms now) takes time :D so in next coming weeks/ months (more realistic) expect diverse foliage :)

I am making each tile not from a single sprite but from set of objects and each tile has a script for randomization. For now it works nice on farm (and You can see slight variations on gold mines, bushes, grass and forest but the differences are hard to spot now)


Title: Re: The Village
Post by: protactinium on May 29, 2017, 10:20:45 AM
So after farms I picked forest. I managed to do a randomized tile sprite generation. Now I need to add more different trees to make it look better

(https://media.giphy.com/media/l1BgSrUHXKWgaFkZi/giphy.gif)


Title: Re: The Village
Post by: io3 creations on May 29, 2017, 02:27:38 PM
I remembered seeing a shader color customization tutorial but took some time to find it.
Part 1: http://staraban.com/en/2d-game-tutorial-part-1-simple-characters-with-cusomization-using-tint-shader/
Part 2: http://staraban.com/en/2d-game-tutorial-part-2-2d-character-with-several-states-and-dynamic-sprite-changing


Title: Re: The Village
Post by: protactinium on May 30, 2017, 01:20:31 AM
Thanks, gonna be handy when I will start implementing weather system!
For now I picked up road creation, I hope to post some gifs today


Title: Re: The Village
Post by: protactinium on June 01, 2017, 11:35:44 AM
I have worked a bit more on forest generation.
Now the tree and leaves are separate objects to allow for leaves animation:
(https://media.giphy.com/media/3og0IMWBLYK7B5Gjn2/giphy.gif)


I have also added road building to the game:
(https://media.giphy.com/media/3og0IPdNFjpWFYR1VS/giphy.gif)



Title: Re: The Village
Post by: protactinium on June 03, 2017, 03:45:36 AM
small updated on game look:
(http://i.imgur.com/Fhw3rsn.jpg)


(http://i.imgur.com/961GwpA.gif)


Title: Re: The Village
Post by: protactinium on June 03, 2017, 08:32:10 AM
Different variants of forest layouts generated from the same map.
I tried to create a probability matrix for each tree based on the neighbouring tiles. If there are no other forest tiles near then the chance for a tree being generated is lower. This should result in more trees in bigger forests and less in smaller tile groups.
(https://media.giphy.com/media/xUA7bggtWODyIV9uEg/giphy.gif)


Title: Re: The Village
Post by: protactinium on June 04, 2017, 06:50:02 AM
Since last update I have worked hard to finally implement some more life to the game.
I have implemented A* pathfinding from Aron Gronberg to the game to control the movement of villagers and animals.
I have used the Unity Finite State Machine tutorial to help me with creating a state controller.

First steps were hard.
I made a default idle state anim for a bird:
(https://media.giphy.com/media/xUA7bdlbU3GOGe7xU4/giphy.gif)

Then I worked on crating simple pathfinding ai based on the solution from a* implementation:

(https://media.giphy.com/media/xUA7b8bAJJG1f9VI4M/giphy.gif)

Unfortunately due to my idea to have colliders - not all of them were scanned by A* Grid, so for now I had to turn them of, or the birds tended to get stuck:
(https://media.giphy.com/media/l1BgRC4zDDtpqxa2A/giphy.gif)



Finally the villagers and birds are walking around

(https://media.giphy.com/media/3og0IAp5K0iCEItv8Y/giphy.gif)

(https://media.giphy.com/media/3o7btMo1KOpcZHIzy8/giphy.gif)


Behind the scenes view of the system:
Blue gizmo means that the character is idle
Yellow Gizmo means it is moveing or looking for target.
The target for now is a randomly selected tile
(https://media.giphy.com/media/3og0INJ91ND6swRrUI/giphy.gif)








Title: Re: The Village
Post by: protactinium on June 08, 2017, 03:02:23 AM
I am working now on creating more life happening in the village.
Now the workers spawn at houses when they are recruited and start to wander around. The amount of villagers now strictly depends on the number of workers and houses

(https://media.giphy.com/media/26gR1nY06KgJU0S1a/giphy.gif)


Title: Re: The Village
Post by: protactinium on June 11, 2017, 07:18:02 AM
Slight update on grass tiles:
(https://media.giphy.com/media/l0IydMPQaRgGXfPMs/giphy.gif)


Title: Re: The Village
Post by: protactinium on June 18, 2017, 12:29:49 PM
Update on ai. The workers now listen to orders and go to work on the tile you select. Otherwise they get bored and wander around

(https://media.giphy.com/media/3oKIP5dXrB7qoBqp8I/giphy.gif)