Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1397320 Posts in 67457 Topics- by 60681 Members - Latest Member: benchmarkses

December 07, 2021, 10:08:30 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsOne Military Camp - City Builder / Tycoon / Strategy
Pages: [1]
Print
Author Topic: One Military Camp - City Builder / Tycoon / Strategy  (Read 640 times)
Abydev
Level 0
**


Abylight Studios


View Profile WWW
« on: October 26, 2021, 02:23:23 AM »

Hi there!

I’m Alex, from Abylight Studios! We are working hard on the development of our next game, One Military Camp. It’s a strategy/tycoon/city building game, where the player has to build and manage a military camp, but also train recruits to turn them into specialized soldiers, keep their morale high, and send them to missions all over the map.

Our creative director and other members of the dev team are writing a devlog on our website and our Steam page, but we thought people here could also find it interesting, so why not share some stuff here too? Smiley

This is our second adventure into this genre, after Prison Tycoon: Under New Management, so, we’ve learned a lot of useful tricks. Also, we have a lot of cool art to show  Toast Right.

Description

Build and manage your own military camp, enroll the best recruits, set the training courses and finally send them on dangerous missions to win the war. But becoming a Military Tycoon also means improving your financial skills, so don’t forget to make your academy a profitable business.


Some Links



Some screenshots






1. How we create thousands of unique characters


One of the core aspects of the game is to train recruits to turn them into better, more specialized soldiers, so, the player will spend a lot of time looking at this characters training inside the buildings and walking around the camp. Each one of them has to feel like a unique individual and not just clones.

Generating this characters had several challenges:
- Change their uniforms over time
- Generate characters with different physical attributes
- Adapt their hair to different hats and accesories.

How did we solve this?

We took a modular approach to modeling the characters, dividing them into two different pieces: bust and body. This pieces are attached to the same male or female skeleton, and we select the combination according to gender, uniform, etc.

For the renders, 2 draw calls are painted, which allows us to change the clothes as the soldier moves up in rank.


Since this combinations are not enough to create enough unique characters, we also add skin color and body type into the mix.

With just changing a variable in the shader, we are able to combine two skin tones and create new mixtures by adjusting the value of a slider.

For the body type, we use a technique called blendshapes, which consists in having different states for the vertices of the 3D model stored in the same mesh. We create a vertex state for slim and another for strong, and again, with just a slider we can adjust the states in between to create a high range of body types.



Now, the problems with the hats… that’s when things start to get hairy. Because this is a military themed game, we have lots of uniforms with different hats. This means that they have to look right no matter the head or hairstyle of the soldier.

Using a combination of vertex painting and some “shader magic”, we paint the vertices of the hair in red. Then, we associate each head with a set of spheres delimiting the “non-deformable” area. For each vertex of the head painted in red outside one of those spheres, its position will be projected to the surface of the sphere.

This creates the desired effect without having to create extra assets.



To end today’s post, we want to show you a bit of our character creation tool .Our development method is heavily tool oriented, since we are a small team we can’t afford to have a large number of people taking care of meticulous tasks. Developing and using appropiate tools allows us to achieve a high level of quality, as if it was made by a bigger team, and our team can focus on what’s important without wasting time on repetitive and absurd tasks.

That’s why the character creation tool was on the top of our priorities list when we started the development of One Military Camp.



And here's how everything looks in game!



That’s all for today. I hope you’ve found it interesting! We’ll be back with more updates of our progress, sharing tricks and showing what’s behind the scenes of our development process.

Take care!

 Hand Metal Left
Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #1 on: October 28, 2021, 07:54:01 AM »

Hi again!

Last time we showed our process for creating characters... now let's make them move!  Gomez


2. ANIMATING THE CHARACTERS


The first step, before animating anything, is to put some bones into the characters. Give them a skeleton, which will be associated to the two parts that compose the characters (head and body).

As you may know, this process is known as rigging.


In our case we've decided to create two different skeletons, male and female. On one side, this will mean creating two variants for each animation. On the other side, it will allow us to make the animations more natural and give them a unique touch, since the female skeleton has different proportions.

The skeletons are made of gizmos and control objects connected with each other following a hierarchy. That way, if we rotate the shoulder, for example, the rest of the arm and hand will rotate accordingly.

In addition to this relationships, we need to add different weights. We do this automatically based on the topology of the mesh and we refine it manually later, painting a heat map over the vertices of each gizmo: "Red" for full influence and "black" for no influence at all.


After that, we have a process called skinning. When the skeleton moves, a series of calculations will be performed for each vertex within the shader. These calculations take into account the position of each bone and their influence on the different vertices to calculate the final position in which a vertex is shown on the screen.

Once our character has an skeleton and everything is its right place and ready, we can begin to animate.


Our animators create key poses for each bone, and associate them with a moment in time. This key frames appear like dots in the timeline, and when we press play we see a sequence of positions that changes rapidly.

They are alive!

Of course, the true power of rigging and skinning lies in how we are able to use all these animations in other characters sharing the same skeleton of the base model.



Different female models... with the same animation  Toast Right



We hope you've enjoyed this glimpse at our animation process!

Next time we want to talk about how to make these characters interact in the 3D world Smiley

See you!
Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #2 on: November 04, 2021, 11:05:06 AM »

Hey there Smiley

Keeping in line with the topic of characters and their animations, today’s post will be about the behaviours and AI behind them, to make interact with the world.


3. Character behaviours: Artificial intelligence + animations


Object interactions are one of the hardest behaviours for AI applied to animations. Each object needs its own skeleton, and everything needs to be synchronized with the character’s animation.

First, the character has to begin his action from a specific point (interaction point) that fits with the object its going to interact with.

Then, the animations for the character and the object must have the same duration and start simultaneously.



Actually, animations are a key aspect in the design process for a Tycoon game. They are super important for leveling the game.

More specificaly, is important to fine tune their duration. But the animators don’t know how long certain animations should take when they are creating them. We need the animations to be flexible, so we can tweak them later during the leveling phase of development.

For that, we generate the animations with three phases: Start, Loop, and End.

For the start phase, the first frames start in an idle pose in the interaction point, getting the character ready to perform the action.

In the loop phase, the character will perform the action (in the case of the bench press training, they’ll lift the weights over and over). The trick is to prepare the first and last frames of the animation in a way that it can be played repeatedly, in a loop, without any noticeable jump in the animation.

Finally, the ending phase will start with the last frames of the loop and will end leaving the character at the end position of the animation.

An example:

In One Military Camp, recruits gain XP by performing different trainings. The benchpress exercise will increase the strength stat of the characters, and we’ve adjusted it so it will increase by 1 point after 30 seconds of training.

When the character decides to perform the exercise, the animation will begin in the starting phase, then it will play the wight lifting animation loop for 30 seconds, and then it will get up from the machine and go perform another action.


The AI is related closely to the animations, and it’s divided into two groups of behaviours: Navigation and Action Playback.

Navigation is everything that has to do with moving around the world. Running, walking… even standing in place with an idle animation.

The action playback happens when a character is going to interact with an object. In this, the logical entity of the AI remains static, waiting for the animation to end.



In our case, we have 2 entities for the characters. The one represented by the red arrow is the AI agent. The logical entity of the AI. A directional vector that moves from one point in space to another.

The green arrow represents the visual 3D model. The character itself, what the player will see in the game.

Both share position and orientation, except when taking actions. Then, both entities detach and re-synchronize again at the end of the action.




In the image above, we can see the relationship that exists between the navigation behaviour and the action playback behaviour and how they change from one to another.

The character at the bottom right has decided that he wants to exercise on the bench press (even though the machine is in use at the moment). Then, the AI calculates a route to get to that object. The result is a route from the point of origin (O) to the interaction point (IP) of the object.

The character will remain in navigation behavior, playing a walking animation and following the pre-calculated route.

Once the character is at the interaction point (IP), with the proper position and orientation to start the animation, he will go into action playback behavior. Then, he will start to perform the bench press animation.



When the bench press animation begins, this is what happens:

  • The character starts from the point of interaction with his two synchronized entities.
  • Performs the animation until it ends.
  • The character starts from the point of interaction with his two synchronized entities.
  • The character ends the animation and his drawing entity is in a different position and direction than the artificial intelligence agent.
  • The artificial intelligence agent overwrites his position to adopt the same position as the drawing model. This way, they remain synchronized and the character is ready to continue walking in the direction he’s facing, without any jump in his animations or positions. Sometimes, the offset in position and rotation between the two entities involves compensating both movement and rotation. So, the synchronization must be done in six different axes to match the two entities.





And here’s how everything looks when the game is running! Everything related to the characters involves a lot of work… and then, the player sees it from afar, almost from a bird’s-eye view.


But all that work and detail is not lost. In fact, it makes all the difference. The world and the characters feel much more real and alive.




For next time, I'd like to show you some of the buildings in the game, and how was the design process for them.

We would love to read your thoughts and questions!

Thank you for reading! Gentleman

Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #3 on: November 07, 2021, 09:09:41 AM »

Hi!

I want to show you some of the process of creating the buildings for our game.

In One Military Camp the player has to build their own camp, placing and upgrading buildings to train the recruits into different specializations that will allow them to complete the missions succesfully and win the war.


Let’s take a look at the Spy Training Building


Here, the recruits will master the subtle art of subterfuge. To reflect their specialization, the recruits will wear an appropiate uniform, even when they are just wandering around camp, to make easier for the player to identify their assignment.

For the spies, we went for the classic look of sunglasses, hat and a long trenchcoat. We want the tone of the game to be humorous and lighthearted, and the first image that comes to mind when thinking about spies, is the cliché of the mysterious person, sitting on a park bench, with his face hidding behind a newspaper while he (or she) listens covertly to enemy agents.

Using stereotypes that are familiar to players also helps with readability.



Each building has its own training exercises that will give XP to soldiers in a certain specialization. The Spy specialization is level 2, so the building has capacity for trianing 4 soldiers and needs an instructor to function.

We start the design with this requirements:
  • Should have a size of 12×24.
  • Has to allow 4 simultaneous workouts for different exercises.
  • It must feel… spy-ish, (you know, with a satellite dish or stuff like that).

To design the building, first we define a valid layout, big enouth to host the different trainings (the colored rectangles represent the different training stations:

The training exercises available in the Spy Training Building are:

  • Spying cardboard figures, hiding behind a newspaper.
  • Covertly listening to enemy conversation, ( and everyone knows that those long listening sessions are more bearable if you have donuts).
  • Learning to cheat a polygraph. You have to be prepared in case you are caught behind enemy lines.
  • Avoiding lasers and other traps, in case you want to break into an enemy fortress.
[/li]
[/list]


When we have a defined design, we start doing concepts to visualize the training sessions, and how the building will look on the outside and on the inside.


Each building can be upgraded into different tiers, which will enhance its capabilities and improve its efficiency. To make this changes more noticeable at glance for the player, the appearance of the building will change, from a very basic version with just a few essential materials, to more sophisticated and high-tech versions.


As the players progress through the missions, they will obtain science points that will allow them to research improvements to unlock new upgrades.


And this is how it will look in the game after everything is modeled in 3D and it’s integrated into the game engine with its behaviour programmed:



What do you think?  Grin

I'll keep sharing more insights into the process of creating concept art for characters and buildings. Stay tuned!
Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #4 on: November 10, 2021, 08:31:24 AM »

Hey! Coffee

Let’s go back to the characters again.

I showed you a bit of the process of how we generate them, making sure they are all unique and all the permutations work with every clothing item, hats, etc. I also wrote about how we make them move and interact with the world…

But obviously, 3D artists don’t just start modeling whatever they feel like. First, the general look and design of the characters has to be conceptualized by a concept artist, based on the briefing created by the game designers and the Creative Director.

For One Military Camp, the artistic direction was petty clear from the beginning. We wanted a cartoonish and stylized style, with strong and readable shapes and proportions.

Along with the briefing/description, the artists make use of reference images and moodboards. This images can be characters of other Ips that share similar features, clothing… but also pictures that help convey the mood that we want to achieve for the setting and tone of the game.

Is very common to rely on clichés and conventions that players are expecting and tend to relate to specific types of personality. This can make things, like the character roles, easier to understand fo the player, visually and at-a-glance.

Sketching


After gathering all the reference material (briefing, GDD…), it all begins with the sketches. These can be just line art or shading. Some artists begin with a dark silhouette, to make sure that the basic shape of the character is well balanced and legible.

This can give additional infomation to the 3D artists to help them with the modeling.

This phase is about setting the foundations for the anatomy, complexion… Also, to test poses, expessions, clothing, etc.

We are not looking for a pefect, polished finishing.


From Sketch to Full Render

Here, lightning is key. It’s what in the end is going to help us understand the shape and volume of the character.

The most common lighting setup is a frontal light, together with a fill light and sometimes a colder back light, to define the silhouette and make it pop.

During this phase, don’t forget to rotate the canvas, flip the image, deform with mesh… Also, it’s good to know how to blend colors with the help of the blending tool. The contrast between hard edges and smooth color transitions will give us that feeling of realism.

Add some projected shadows too!


Color is very important too. Not only has an impact on the artistic direction, but also on the gameplay. It can help to make the game more readable for the player and contributes to set the tone and identity of the game.

Very important for the user experience.

In our case, we use color to differentiate the soldier specializations. Together with the UI, it makes easier to identify any soldier in the camp.

We did several tests, with combinations of different color schemes to give each soldier class their own personality.

Here are some of them:



As I said, the goal of a concept artist is not to achieve a perfectly finished and polished piece of art. The goal is to faithfully convey the vision of the Creative Director and game designers, and to transmit the volume and material of the character.


See you next time with more updates!
Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Ramos
Level 6
*



View Profile WWW
« Reply #5 on: November 10, 2021, 09:12:19 AM »



Your game got a very solid quality to it.

The theme somehow reminded me of a very old Sega game "General Chaos" I don't know if you know it.


Good luck sir
Logged

Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #6 on: November 12, 2021, 12:52:18 AM »



Your game got a very solid quality to it.

The theme somehow reminded me of a very old Sega game "General Chaos" I don't know if you know it.


Good luck sir

Thank you for you kind words!  Beer!

I do know General Chaos  Wink and I can see why it reminds you of it!
Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Ramos
Level 6
*



View Profile WWW
« Reply #7 on: November 12, 2021, 06:43:49 AM »


Thank you for you kind words!  Beer!

I do know General Chaos  Wink and I can see why it reminds you of it!

I am very pleasantly surprised to hear that

I am also a friend of the Developer from General Chaos(I am also a big fan of his), he had some attempts of rebooting that game but because of various reasons he keeps delaying, I am positive that he would also love what you made here.


Keep the updates coming, I am curious how this game develops.  Gentleman
Logged

Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #8 on: November 25, 2021, 10:34:43 AM »

Hi there!

It’s been a while since the last devlog. We’ve been very busy working in the game. Not enough time to write Wink

I’m going to bring a different topic for this devlog, before moving on to the terrain systems in One Military Camp (which will be the next entry)

I want to talk about spreading the word about our game, which is something that sometimes can be overlooked... And it’s important stuff, because in the end we want people to play the game. I mean... that’s the whole point of a video game  Grin

We must make sure that the incredible work of the dev team reaches every player out there. They have to know it exists and be able to find it among the constant stream of new titles.

Not an easy task!

This devlogs are part of our efforts to put OMC out there, and are also a nice way to share knowledge and experiences with the community. But we also try to be present in the usual places: Instagram, Twitter, Reddit, Imgur, Steam…

Something very useful when thinking about content and ways to communicate our game are special events.

There’s always something to celebrate, no matter the day. I’m not talking just about Christmas, Halloween, etc. Almost every day is a “Day of ______” at least somewhere in the world.

It’s good to take advantage of that and make the game more visible by participating in a widespread event. It discovers your game to a larger audience, allows you to talk about it in a different way…

A lot of times it requires some extra work and precious time to adapt content to fit certain themes or events, like we did with Halloween:


However, sometimes we already have the perfect assets to use! Like in this instance with our canteen:


The orchard full of fresh veggies was a great fit for World Vegan Day Smiley

And you never know when an animation or a screenshot might be useful. For example, this animation of a soldier opening a fridge:


Turns out there's something called "Clean your refrigerator day". Lol. Who would have thought?  Cheesy

Of course, there are also recurrent events like #indiemonday #wishlistwednesday or #screenshotsaturday. Which are perfect to engage with other users and developers.

Community support is super important!


So… how do you approach this difficult task of making your game known? Have you found something that works really well for you? I'm curious Smiley


We'll be back really soon sharing some of the challenges we had to overcome to generate the terrain and details for One Military Camp.

See you!
Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Abydev
Level 0
**


Abylight Studios


View Profile WWW
« Reply #9 on: December 02, 2021, 08:47:16 AM »

Hi again, time for another devlog!

We’ve been working hard lately (what else is new…) and we keep making progress towards having a playable demo.

In previous devlogs I’ve shown you how we make the characters for One Military Camp, starting from the concept phase, the modeling, the generation system we use to make them all different, the animations and how they interact with objects…

Today is going to be about the terrain, which can also be a character in itself Smiley

Initial research

Our first instinct was to try Unity Terrain, using its API for runtime modifications and our custom shaders for some extra features. It was promising and worked great for a while, but eventually we realized that we needed more.

More resolution and more speed!(as always in game dev)

So we decided to go all-in with an in-house solution tailored for our use case. It often happens that it's possible to achieve better results with a custom solution, specially when you don't need all the features found in a generic one.

What did we need? Being able to modify heights and textures of very specific areas of the terrain surface, while still being able to undo it and return to the original state. Since our users will be placing, moving and removing stuff on the terrain in real time it's important to do all that on the fly and in a non destructive way.



Our approach

Our approach was the creation of specialized masks for later interpretation. A mask is simply a texture that contains information in one or more color channels (red, green, blue, alpha) that can then be retrieved as values in the range 0 to 1, e.g. in a shader. Our Terrain System renders two masks:

    Mask1:splats (red, green, blue) and holes (alpha).
    Mask2:heights (red) and tint (green).


Splats?

When working with multilayer materials (such as a terrain in which we combine e.g. soil, grass, gravel and stone) we use a splat map that defines what textures to use in a particular spot. Because we use 3 channels (red, green and blue) we can mix up to 4 layers(the absence of color is also accounted for).

Holes?


Some of our buildings have features like swimming pools that go deeper below ground level. So, instead of lowering the terrain vertices (which could result in unwanted displacements in their neighbourhood) we simply discard (don't draw) the terrain pixels under this holes mask. The value is inverse to what is common in transparency alpha, i.e. 0 means no hole, 1 means hole.

Heights?


This may look as the most obvious one, but with a caveat. Commonly in terrain systems the height information would define how high a vertex has to go(effectively defining a height map). In our case, it instead defines how deep the vertex goes, so it's not really a height map for us and we could call it a depth map if you want. Specifically, 0 means highest, 1 means lowest.

Tint?

This one defines how to mix the colors when drawing the detail objects like grass or rocks. More on this later.

It's no coincidence that there are two masks separated like this: Mask1 (splats and holes) is applied to pixels, while Mask2 (heights and tint) is applied to vertices. That way we can optimize and access these masks only when needed.

Ok, so we have our masks defined, but how do we generate them? Sometimes simple is best. The Terrain System has two cameras, one for each mask, and they only see mask objects. What is a mask object? Every road, building, etc. in the game has a couple quads attached. These quads could be seen as funny colors, but these colors are really defining their part of the whole mask. Now imagine we draw all these mask objects together from a cenital orthographic point of view. The result would be something like this:


Actual render of Mask1.

Mask1 viewed from an ingame perspective.

You may be wondering why some of the values have been reversed from what is common in the industry. I'll explain. The way we composite the mask colors is additive (clamped to 1). In other words: if two mask objects overlap, the resulting value is never lower than the greatest one.

For example: suppose Object_A and Object_B share some space and both are defining a hole. As stated above, 0 means no hole and 1 means hole. There will be parts where Object_A wants to draw 0 and Object_B wants to draw 1. The resulting value after compositing will be 0 + 1 = 1 (which means the hole prevails). That way we can place masks without fear of unwanted overrides.

I leave it as an exercise for you to figure out what will happen when other values overlap and how this applies to the height map as well.



Illustrative overlap of hole masks.

And you would ask: "But how can you render and apply a huge mask like this to a huge terrain, keep updating it every frame, and still achieve good frame rates?" That's why we again leverage our particular use case: the game doesn't allow the camera to go very far back and it never shows a big portion of the terrain. Thanks to this, instead of having huge masks covering the whole terrain, we use very small ones that cover only the visible area and act like a window through which we see the complete masks. This means we can benefit from it and increase the perceived resolution of the splats, holes, etc. For free!

Quality is in the details

But a terrain system isn't complete until you can add some vegetation and rocks to it, right? The main challenge for this is how can we draw a massive bunch of objects, complete with wind effects and whatnot, and stay above 60fps. The way to achieve it is using what is called GPU instancing.

The technique frees the CPU almost completely while the GPU draws the same one mesh over and over at different locations. Not surprisingly, GPUs are really fast at drawing meshes, and turns out this works wonderfully for drawing vegetation and repeating objects.

Friendly drawing of GPU instancing concept.

So we created a Detail System that would work along the Terrain System. With it we can define (via a custom tool) as many detail object locations as needed. But it's internally that it's most interesting. First it takes the terrain and subdivides its area into a hierarchy of smaller regions. For every region it determines what detail object locations fall inside. Thanks to this, during gameplay, the system is able to pick only the locations whose region is visible by the camera. That's called culling. Finally a drawcall is issued for all of the locations of every visible regions. As a result, all the detail drawing is really fast.

The next step involves our friends, the masks. While drawing each detail object we know where it is and what values the masks have there. So we can use this information to:

    Displace the vertices based on the height value.
    Hide grass based on the splat values.
    Change the color based on the tint mix value.


That's all! We hope you've enjoyed today's devlog and found it useful.

We'll be back soon. Meanwhile you can support us by adding the game to your wishlist

Have a good day! Beer!


Logged

Follow us @abylight
Wishlist One Military Camp on Steam
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic