{"id":172,"date":"2023-04-06T17:05:26","date_gmt":"2023-04-06T16:05:26","guid":{"rendered":"http:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/?p=172"},"modified":"2023-04-06T17:05:26","modified_gmt":"2023-04-06T16:05:26","slug":"bsc1b-indie-dev-research-element-systems-in-games","status":"publish","type":"post","link":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/2023\/04\/06\/bsc1b-indie-dev-research-element-systems-in-games\/","title":{"rendered":"BSc1b &#8211; Indie Dev Research &#8211; Element systems in games"},"content":{"rendered":"\n<p>I envisioned having elemental affinities in the game and my initial plan for them is a bit of a mess, where resistances and weaknesses are set up on a per-enemy basis where I think it would be harder than it should be to pick up on the mechanics and effectively adapt to it as quick as I\u2019d like it to be for the player.<\/p>\n\n\n\n<p>Looking at the way other games handle this:<\/p>\n\n\n\n<p><strong><em>Runescape <\/em><\/strong>has a simple damage triangle of melee, ranged and magic \u2013 magic is strong against melee whilst melee is strong against ranged, which is strong against magic. It\u2019s split into weapons determining what armour you will do the most\/least damage to and armour determining what weapons will do the most\/least damage to you.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"732\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-38.png\" alt=\"\" class=\"wp-image-175\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-38.png 802w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-38-300x274.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-38-768x701.png 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><figcaption class=\"wp-element-caption\">Damage triangle in Runescape (Top is melee, right is Ranged, left is magic).<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-39.png\" alt=\"\" class=\"wp-image-176\" width=\"428\" height=\"540\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-39.png 408w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-39-238x300.png 238w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/figure>\n\n\n\n<p>This has an extra layer where different types of attacks and ammunition may be used, melee has stab, bludgeon and piercing, ranged has arrows, bolts and thrown weapons and lastly magic has different elements. PvE enemies are weak to a certain part of the triangle and extra-weak to a certain damage type. Players can use &#8216;prayers and curses&#8217; which consumes prayer points but reduces damage from one part of the triangle at a time &#8211; this has been best engaging in fights where the player has to switch prayers through the engagement.<\/p>\n\n\n\n<p>This formula works well for the PVE and PVP game as there is a large range of enemies in the game, enemies deal certain types of damage based on their programmed behaviours (eg, melee when closed or use ranged\/magic), players can study the enemy and prepare the best equipment to fight.<\/p>\n\n\n\n<p><strong><em>Pokemon<\/em><\/strong> is one of the oldest examples of this system I can think of and is still building on it to this day with the latest releases.<\/p>\n\n\n\n<p>Each pokemon and ability has an element, so the element of the pokemon vs the element of the ability used against it determines the damage the effectiveness and as a result, the damage it inflicts.<\/p>\n\n\n\n<p>This, combined with the regular vs special attacks and defences alongside the many different elements and moved in the game make it a fairly tricky system to get acquainted with and may not be fully understood without the assistance of online resource \u2013 though Pokemon: Legend has generously been telling players the effectiveness of their pokemons 4 attack moves against the current target \u2013 you still don\u2019t know this ahead of time and may come in with a pokemon that all low effective attacks.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-37-1024x1024.png\" alt=\"\" class=\"wp-image-174\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-37-1024x1024.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-37-300x300.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-37-150x150.png 150w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-37-768x768.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-37.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Element Effectiveness in the Pokemon series.<\/figcaption><\/figure>\n\n\n\n<p><strong><em>Borderlands<\/em><\/strong> has a classic system that I\u2019m a fan of, it has a couple different weapon elements that have different effects and effectiveness against 3 different types of hit points: Health, Shield &amp; Armour.<\/p>\n\n\n\n<p>These elements have varied from game to game but for this one, I would like to list multiple and compare their approaches. In BL2, we have fire, shock, corrosive, slag and explosive. Slag and Explosive are equally effective however slag applies a debuff that increases non-slag damage while explosive provides a blast radius.<\/p>\n\n\n\n<p><br>Health has the fewest resistances while Armour has the most, shields is inbetween but is able to regenerate after going long enough with no damage.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"569\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-36.png\" alt=\"\" class=\"wp-image-173\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-36.png 864w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-36-300x198.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2023\/04\/image-36-768x506.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><figcaption class=\"wp-element-caption\">Damage Resistance\/Weakness in Borderlands 3<\/figcaption><\/figure>\n\n\n\n<p>I like borderlands 3\u2019s model more where you have more options and returns for what weapon elements you equip. Fire, Shock and Corrosive are the best against certain elements by a good amount than other elements whilst doing the least damage against the other health types, whilst cryo and radiation is a little less effective against shield\/armour but deal full damage against health.<\/p>\n\n\n\n<p>It gives the player a lot of nice choice over the weapons they equip, however in the game\u2019s balancing, players are able to get away a lot without element matching which can be preferable as a lot of shield\/armour is just a second layer to the health bar, meaning shield\/armour matched or not they still have to deal with the health afterwards.<\/p>\n\n\n\n<p>Looking back at borderlands 2, my friend who has invested a lot of time into the game, playing a lot on the end-game difficulty, prefers the system of BL3 over BL2 as the \u2018slag\u2019 element from 2 is mandatory to use during lategame where most enemies cannot be killed without the use of it. Slag is a slight inconvenience to use as you need to equip a weapon or grenade mod with the effect and shoot it enough times for it to be applied to then switch to the best suited weapon.<\/p>\n\n\n\n<p>This mechanic feels balanced out to use in the early game as you\u2019re able to fight all enemies very effectively without the use of it especially if you\u2019re matching all elements to health types, however if your level\/weapon levels are too low for the current level or maybe the enemy you\u2019re fighting is too though then slag can be extremely useful.<\/p>\n\n\n\n<p>However, in the very late game at maximum levels, the element becomes mandatory as enemies all become extremely tough so that you cannot reliably survive fights without struggling and going down a few times. Needing to swap between 2 different guns for every single enemy becomes quite frustrating as this function is meant to be the trade-off for an optional technique.<\/p>\n\n\n\n<p>?Asked my friend what if enemy health was reduced but the slag damage bonus was reduced aswell, he said the scaling for enemy hp and damage was just often too high \u2013 if enemy hp was lowered then slag would be less needed but opens more opportunities for one-shotting bosses if you did use it.<\/p>\n\n\n\n<p>From this, I like the idea of categorising enemy health into different types as the player can\u2019t just blindly fire at enemies without considering the target and changing their approach, status effects are an additional gameplay element that helps.<\/p>\n\n\n\n<p>Applying this to my current game idea, different spells could not only have varying shapes and styles but also different elements, but this would be worth testing a before and after for. Without this system, I imagine that the different spells would be a harder to balance whilst maintaining variety for combat (eg the lightning spell working as a hitscan, the fireball having no gravity, corrosive ball having a lot of weight but a larger size).<\/p>\n\n\n\n<p>I would store the elements and health types in two enumerators, each spell would save an element and each enemy would save a health type. When the enemy has a damage event, it will check the element and select a lower, higher or no multiplier at all depending on the designed strengths\/weakness. The code should be easily tweakable<\/p>\n\n\n\n<p>I don\u2019t know if I would include a weakening element like \u2018slag\u2019 in my game, if I did I would likely try to keep it balanced. It doesn\u2019t deal much damage as the intent is to apply an effect, it shouldn\u2019t be too difficult to hit so I\u2019d give it a high velocity but also a moderate to high mana cost. Maybe it costs all the player\u2019s mana for an attack that could hit multiple enemies so they\u2019d be more weak but the player would have to use sword magic.<\/p>\n\n\n\n<p>For implementation, enemies would have a \u2018slagged\u2019 variable that when calculating final damage it would check for if slagged and multiply by a global \u2018slag damage bonus\u2019 amount.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I envisioned having elemental affinities in the game and my initial plan for them is a bit of a mess, where resistances and weaknesses are set up on a per-enemy basis where I think it would be harder than it should be to pick up on the mechanics and effectively adapt to it as quick&hellip; <a class=\"more-link\" href=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/2023\/04\/06\/bsc1b-indie-dev-research-element-systems-in-games\/\">Continue reading <span class=\"screen-reader-text\">BSc1b &#8211; Indie Dev Research &#8211; Element systems in games<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,7],"class_list":["post-172","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-bsc1b","tag-indie-development","entry"],"_links":{"self":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=172"}],"version-history":[{"count":1,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"predecessor-version":[{"id":177,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions\/177"}],"wp:attachment":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}