# To use or not use RNG in combat?

## Recommended Posts

Here is the scenario I have pertaining to a combat system I am jotting down on paper.

The attacker has 100 soldiers each with 1 attack point and 3 health points. The defender has the same.

All the player has to do is press a button and combat is all computed then the player is just shown the results. From my current example, I would have the attacker's soldiers do 100 points of damage to the defender resulting in 33 defenders being killed. The same happens to the attacker's soldiers. This continues until both sides defeat each other at the same time and it ends in a draw.

I feel if I introduce a random factor, the battle could get lop-sided and the smaller side could not recover So I thought I would ask the community for their opinions of the very simple combat scenario.

The game concept I am designing deals with combat from outside the actual conflict. Sort of like a coach and a sports team. You give orders and watch as your units perform them. The game does start small, with 100 to 200 soldiers (all the same) and could grow to larger numbers as well. I was just wanting to get a system in place for small conflict that could scale into larger ones.

Each side has a unit type (soldier) a unit quantity (100). The player give the order, and the computer does the rest. After both players give their orders, the results are computed instantly. Keeping all things equal, Attack power, defensive power, etc. (I need a baseline) What would be the best way to determine damage? Static numbers, or RNG numbers?

To use or not use RNG in combat?

##### Share on other sites
Posted (edited)

This sounds similar to auto-resolve in total war or such games.

As such, I think you need some mild randomness to it, to make it seem more realistic/simulation-like.

Just try and add a factor like x0.8-x1.2 for each "round of damage" one side deals to the other and see how that feels. Given all other factors are equal (terrain, morale, equipment etc) 200 soldiers should always win against 100. But not necessarily against 160 (but more often than not!).

So 100vs100 would often result in 20-25 guys alive on one side and the other side dead. For realism you could allow routing since the loosing side almost never fights to the last man in battles (or are we inside the movie "300"? )

You can also try and add bigger randomness factor, but make these uncommon and very clear to the player. Like a popup telling you the "event":

Fog - only half casualties on both sides (if your system supports not always killing one side completely)
Commander killed - your side only deals 70 % dmg for the remaining rounds
Rain - archers (if applicable) deal only 70% for the remaining rounds
You get the idea!

This can add character to an otherwise plain "press the button and get the results". Each "combat rounds" can take some moments to resolve so the player can watch the numbers tick down (the entire battle can still be over in 3-10 seconds depending on the feel you are after). I tried this for a game and it gives a bit more organic feel to the simulation.

Edited by suliman

##### Share on other sites

There are other factors that will be involved in the actual resolution of combat, like weather and terrain.  I guess I should have explained that a little in the original post.

I guess I am looking for baseline stats.  What happens on a sunny day, flat land, and everyone in good moral.  I would think all things being equal and no combat modifiers, I was thinking that a soldier would do 1 point of damage.  The group would do 100 points of damage, that then could be modified by outside factors.  Just need to get a base line established.

I like the random range idea of making the group of 100 soldiers deal damage of 80 to 120 points of damage, but feel that may be too big of a swing before other modifiers.

##### Share on other sites

If there's a geometric aspect (flanks and such), I think randomness is worth having just to introduce variation in outcomes along the line when two walls of units approach each other. Given that the player is sort of a coach, my design instinct is to introduce unpredictable wrinkles in combat to strategize around.

In terms of range of values, there's two levels a combat can be viewed in: at the low level, it's pairs of individuals fighting. If 100 equal soldiers per side pair off and fight to the death, 95% of the time each side will end up with 40-60 soldiers (binomial distribution). As the armies grow larger, that collapses into a tighter and tighter proportional range (1000 vs 1000 is about 470-530).

At another level, though, it's a team activity: If there's a lot of victories at one flank, the forces can wrap around and start seeing big advantages in that region. If an individual trips, he might leave his allies vulnerable. If one guy panics, it might sweep into a general retreat. At this level you can have much wider variations in outcome (although there's no standard equation anymore).

##### Share on other sites

I think you answered your question yourself. As you need baseline stats you already explained that on the first post - 100 apoints vs 300 hpoints. This is your baseline stats and there comes an events/buffs/modifiers/other factors which somehow affects some sort of rounds endings.

From a player perspective - RNG is fun tho. As you are sure you can win with 1000 army versus 100 army, you are not sure what about 100v150, how many losses you have to encouter and so on !

Countable fight ending in a long-term could come to a boring gameplay.

##### Share on other sites
On 3/13/2018 at 6:53 PM, Mercury Gate said:

deals with combat from outside the actual conflict. Sort of like a coach and a sports team. You give orders and watch as your units perform them.

If this is your objective, "100 soldiers attack 100 soldiers" is a completely inadequate level of detail: giving skillful, nontrivial orders in order to win (as a coach would do with a sports team) would be impossible. The game would reduce to the strategy of moving troops to the appropriate front line locations. without interacting with actual combat.

Randomness is quite orthogonal to the choice between nonexistent, simplified and detailed tactical combat; its main purpose is limiting the usefulness of detailed planning (so players decide quickly, keep pace and don't succumb to "analysis paralysis") and providing unpredictable situations to react to, so if tactics are trivial, strategy becomes the level that offers interesting decisions and might need some randomness to work well.

##### Share on other sites

Thanks for your feedback.  Randomness in the damage results can lead to players being happy when the RNG is in their favor, and unhappy when it is not.  If I know that 100 solders does 100 damage, I can plan my attack according to that and will know the result, but if I am depending on RNG to swing in my direction, my soldiers could do 95 damage and I loose the skirmish.

I guess I am looking at it more like chess.  Each piece has a set movement and attack direction and leave it up to the player to decide the best course of action based on that.

I could be wrong in my thinking and still would like to hear what others have to say on the topic.

On 3/26/2018 at 5:49 AM, Eimantas Gabrielius said:

Countable fight ending in a long-term could come to a boring gameplay.

you may be right.  But if feel it can depend on the context of how weighted the combat is to the over all idea of the game.  If the game has a combat focus whereas the combat is the "be all" and it end up boring, the game will be looked at as a boring game, but I think if the combat is just a small portion of the game, the lack of details from the combat system could be a blessing allowing the player to focus on the game play aspect they like the most.

##### Share on other sites
2 hours ago, Mercury Gate said:

I guess I am looking at it more like chess.

Chess is not a terribly "fun" game, in the sense most video games aspire to be. The better player will win 100% of the time, which makes it distinctly less fun for the perpetually losing side.

##### Share on other sites

I do find dice rolls to be fun when I'm actually throwing the dice. But if I'm playing a strategic game, I tend to avoid attacking unless I already have a pretty good idea about the outcome. The game isn't about counting on a lucky dice roll it's about getting the strongest pieces into the right position the fastest. I may be wrong about what my opponent is planning or encounter something else unexpected but it seems like the general idea is to see if your plan succeeds or fails on its own merits.

##### Share on other sites
8 hours ago, kseh said:

I do find dice rolls to be fun when I'm actually throwing the dice. But if I'm playing a strategic game, I tend to avoid attacking unless I already have a pretty good idea about the outcome. The game isn't about counting on a lucky dice roll it's about getting the strongest pieces into the right position the fastest. I may be wrong about what my opponent is planning or encounter something else unexpected but it seems like the general idea is to see if your plan succeeds or fails on its own merits.

Games generally don't only depends on one factor like Attack Points. For example RPGs like World Of Warcraft, no matter how much Attack/Agility/Spell Power you have, you will never hit for the same amount but you still know that you cant beat level 3 monster if you are level 10, but there is RNG anyway. It doesn't mean you have total RNG of fight ending, but some factor where you can't count 100% of fight flow i think is a must.

I've made an experiment on Stronghold. I sent 5 infantryman vs 1 horseman  x10times.
1st ending - 1 infantry x 0 horseman left
2nd ending - 0 infantry x 1 horseman left
3rd ending - 0 infantry x 1 horseman left
4th ending - 2 infantry x 1 horseman left
5th ending - 0 infantry x 1 horseman left
6th ending - 0 infantry x 1 horseman left
7th ending - 1 infantry x 0 horseman left
8th ending - 0 infantry x 1 horseman left
9th ending - 1 infantry x 0 horseman left
10th ending - 1 infantry x 0 horseman left

Although you know your horseman is strong enough, you can't be sure you won't be beaten by 5man. And if there wouldn't be RNG, I only have to do the math and ensure my win. Is this interesting ? Then I would prefer go do math instead of playing game

## Create an account

Register a new account

• ### Similar Content

• While going through a Game Design Document Template, I came across this heading - Core Game Loop & Core Mechanics Loop.
What's the difference? Can you provide some examples of an existing game?  Suppose if I am including these topics in a Game Design Document, how should I explain it so that my team can understand?

• GOVERNOR is a modernized version of the highly popular series of “Caesar” games. Our small team has already developed maps, written specifications, acquired music and performed the historical research needed to create a good base for the programming part of the project.

Our ultimate goal is to create a world class multi-level strategic city building game, but to start with we would like to create some of the simpler modules to demonstrate proof of concept and graphical elegance.

We would like programmers and graphical artists to come onboard to (initially) create:

A module where Province wide infrastructure can be built on an interactive 3D map of one of the ancient Roman Provinces.
A module where city infrastructure can be built on a real 3D interactive landscape.
For both parts, geographically and historically accurate base maps will be prepared by our team cartographer. Graphics development will be using Blender. The game engine will be Unity.

More information, and examples of the work carried out so far can be found at http://playgovernor.com/ (most of the interesting content is under the Encyclopedia tab).

This project represents a good opportunity for upcoming programmers and 3D modeling artists to develop something for their portfolios in a relatively short time span, working closely with one of Canada’s leading cartographers. There is also the possibility of being involved in this project to the point of a finished game and commercial success! Above all, this is a fun project to work on.

Best regards,

• Hey All,
I'm looking to get into the gaming industry. I've skirted around the idea for a long time, always thinking that I couldn't do it. I've finally decided to take the plunge.

My question is whether it's worth going to school for game design/coding etc. I've been writing content for paper games for a while, and have a good idea of story and some basic design. But I have next to no technical know how.

My instinct is that such things can be learned with a lot of practice, video tutorials, and more practice. I've also heard that a degree is not really that important, since you get hired based on your portfolio/prototypes. Why not just make the games?
But won't a degree help with contacts and mentoring--I'm not a great networker.

Of course, it'll plunge me into more debt, but...
If anyone has advice, let me know. Also any idea of a program to start with: Game Maker, Unity, Godot, Construct, Stencyl--I've heard good things about them all, so much so that I don't know which would be best to start with!

Thanks

• I'm making an small 2D engine using Kha and I have a timer class, which basically simply either waits a certain amount of time to call a function, or repeatedly calls a certain function after every x seconds. I simply want to know if I should have timers run on different threads. I'm aware that makes sense, but I might use many timers in a game for example, would that still be okay? Also I'm currently writing an animation components, which waits every x seconds to draw another image using the timer class. And in a normal 2D games, I would have many objects with animations on them, other than the other timers. So I just wanted to ask people who have more experience and knowledge than I have what I should do for timers: Either leave them on the same main thread, or make them run on different threads. Thanks in advance.
• By Gezu
I'm a 3D artist with basically no music knowledge at all. I do love musics like some video games and films have. I have a Yamaha DGX-205 which wasn't used by anyone for a decade and I don't know why but this January I started to learn how to play some of the musics I like. I didn't know how to start and I ended up with trying to learn Trine Dragon Graveyard. It took me 5 month to be able to play this from the beginning to the end but I really enjoyed every second of the learning process.
Since I was not satisfied with the piano sound of my DGX-205 I tried to connect it to my PC. It took me some time to figure out how I can make it work. The app which is mentioned in the manual is not supported anymore. I did some search and installed LMMS which absolutely did what I wanted (I mean now I have nice piano sound from my PC's speakers when I press the keys :D). After installing a program designed to make music I started to wonder if it is possible for me to create music?
Right now I'm learning a track from Child of Light but the idea of learning how to compose is still in my mind. I know there are many experienced composer around here and I would like to ask for advice. How shall I start learning? Shall I wait and learn to play more music or is it a good idea to start right now? Where can I get good info on how to learn composing? I have no particular plan with composing I only want to do it for fun.

• Hello fellow game devs I am seeking some answers to a somewhat simple question. Now I always thought that when a dev was going to work on a new game to publish he/she should keep some aspects secret infill time to release then he/she can give out needed information pertaining to the game to the public as a marketing tactic. However I had a discussion with other game devs who stated that my way was somewhat not right and the only reason I had such thoughts was due to me being a smaller indie dev who was afraid of having my idea stolen.
Therefore I would honestly like to know if my way was right or were the other devs correct. If I were to start working on a new game and give out information about it online via social media would I be risking my idea being stolen and it being made faster and better by another developer or team of developers. Am...Am I paranoid???

• Hey everyone!
My name is Aaron and I’m a writer, gamer, and marketer/campaign manager for PowerSpike, a startup in the Twitch space. For the past two years, I’ve had the opportunity to build and run professional Twitch influencer marketing programs for some great brands (a few clients include Soylent, Camp Mobile, CreativeLabs, and more).
I’ve been obsessed with Twitch as both an entertainment and marketing platform since 2014. Before entering the world of marketing, I was a broadcaster and a content creator myself and made YouTube videos in my spare time.
Recently many game developers have shown interest in collaborating with Twitch streamers to promote their games -- and I think I can help!
I’ve learned so much about entertainment and community development from studying the growth of popular streamers since then, and my current position has allowed me to learn an incredible amount about the process of promoting a product/game/service’s message to a large audience with the help of Twitch streamers.
I’d love to share what I’ve learned with anyone who has questions. Ask me anything!

If you’d like, you can follow me on Medium at https://medium.com/@aaronmarsden -- that's where I'll be posting both personal and PowerSpike articles on game dev marketing. I also just released my first article, "The Ultimate Guide for Promoting Your Game with Twitch Influencers," here on GameDev.net! You can check it out here:
Thanks everyone!

• hello!
so i had this idea of a game i wanted to make that i had in mind for years and i wanted to try to execute it (at least partiality).
problem is, i don't really know what kind of game style this game can fall under and i don't really know where to start learning sources and design wise :/ .
i want to create a management style game and all the controls the user has are through a menu of some sort similar to this (this particular example is from a game called '911 operator' by jutsu games):

to find more information about how i can create such a game i really want to know what's the name of this style of game, mostly GUI controlled game.
aside from that i'm looking for a bit of advice,
which engine would be best for such a game? i'm fluent in C++,C# and python so any game engine you can throw at me is great!
are there any good sources to learn from before jumping into this kind of game, tutorials of some sort perhaps?

thanks so much to anyone who answers, this really means a lot to me!

• Hi!
So, I've recently thought of a nice twist to a hack and slash-type zombie game that I'd love to make (mostly so that no one can steal the idea I'm not gonna elaborate to much on the story, but that should be no issue to help me, I think).
But my problem here is that I have little to no knowledge of coding. I AM willing to learn, but I'd rather not have to develop 50 games before I've learned how to develop the game I actually wanna make. I'm just a hobbyist. I don't have that kind of endurance for this.
The game I'm looking to develop is basically just your typical Player having to fight their way through masses of zombies in a city towards a certain safe place, going from location (check-point) to location.
The only controls I really want for the player to have are:
-to interact with objects (like talk to people aka trigger a dialogue or cutscene, pick up objects like weapons, have commentary appear when interacting with something (like the player clicking on a corpse and triggering the player thinking "Please, don't attack me to. ... Thank you very much, Sir.". All of this could be established with simply triggering a cutscene though.),
-move with the arrow keys or ASWD,
-have a health bar (not necessarily displayed, I just want the player to actually be able to die if they get gnawed by too many zombies)
-and hack away at zombies coming towards the player. Just let out all your frustration by bashing in their faces, maybe have a satisfyingly-bloody animation when they die.
-Hopefully have companion characters fight zombie hordes with you. (Although I could get creative and find excuses not to have the side-characters fight with you)
-No jumping required.
-Inventory would be nice but not necessary either.
-Saving your current game progression manually would be great, but could be done with check-points, too.

Primary focus of the game would be just having fun hacking away at zombies and getting to know the characters, who I hope to make worth getting to know.
I've been researching the internet for game engines for weeks now but I haven't really found one that seemed helpful to me, mostly because the reviews are full of vocabulary that as an absolute newbie I understand none of. So, whenever I read the cons for an engine in the review I understand very little of it.
Although an engine that requires absolutely no coding and still be able to perform all of this would be an absolute dream come true, I believe that's quite impossible to find. The only non-coding engines I've come across so far are absolute garbage due to limits, buggy, underdeveloped, or abandoned by their creators. I'm willing to learn coding, I'm not afraid of it as long as there are tutorials and templates out there, too.
As I'm a hobbyist I'd rather not pay for an engine or to export my game. I'm most-likely not going to sell my game for money and if I do it won't be expensive at all no matter how much time I'd invest in it.
Obviously the game would need to either be open source or let me publish and distribute the game freely.
The only game engine I've found so far that I believe I'd understand is Adventure Game Studio, but I haven't used it much yet, just watched a couple tutorials on youtube. But it's a point-and-click only engine as it seems so it won't be of much help for this type of game, unless I get really creative with my controls (I'll keep this engine in mind for other possible projects in the future, though).
I've tried Godot as well, which seems to be really hard to learn for a beginner of my level, especially as the coding language is completely unique to the engine from what I've read (and noticed myself).
I did come across Unity and UE (Unreal Engine) and from what I've read it seems that Unity is better, but, again, I understand very little of any reviews I've read. What's mostly scaring me away is that services that have Premium possibilities you pay for are usually really limited in a stupid way. But if this is not the case, hey, let me know!
Pixel-art-ish animation would work well, too, so an alternative to RPG Maker would be fine (or at the very least a cheap alternative where I don't have to pay monthly for).
The art for the game I can provide and create completely by myself if it's 2D. I'm an artist mostly and I have experience with making comics and digital drawings (fanart mostly hahaha) and I've gotten into animation which I'm fairly decent at (I'd be willing to learn 3D animation, though!).
So, that's about all the info I think might be of importance, but if there's anything more you need to know to help me, I'll answer as quick as I can!! And if you tell me I gotta give up on some of the features I want the game to have, I'd be willing to listen to suggestions.
Thanks in advance to everyone who is willing to help me!

• 32
• 12
• 10
• 9
• 9
• ### Forum Statistics

• Total Topics
631349
• Total Posts
2999473
×