CS:GO Rogue-Lite Mode - (Translated from Orelstealth's original)
this is an English version of oral stealth's video which you can check out in this video's cards and description I really enjoy games like dead cells The Binding of Isaac and slay the Spire these are my favorite games from the Rogue light genre a few years ago I made a procedurally generated aim map for CS go but in my heart what I really wanted to make was a full-featured rogue light I had already started on it even back then and today I am happy to finally share it with you fortunately for you but unfortunately for this game mode Counter-Strike 2 is here and acts as this Project's main villain it's certainly a gift to fans of the game series with its source 2 engine its new features and so on but rather understandably it is disastrous news for my new game mode that I've spent the last three years developing undertaking such an ambitious project was a daunting Prospect so it started life as just a small aim map that generates an enclosed layout and item placement within a confined manageable area not what you'd hope for from procedural level generation but it served its purpose well helping me to practice my scripting skills and it seems like many of you still enjoyed the result next I decided upon a wingman mode to serve as a sensible stepping stone on the way towards my ultimate goal of creating a fully fledged Rogue light I used this to investigate the limitations of scripting for Counter-Strike because if some things proved impossible then there would be no point in going any further for example with wingman mode it's fun to be able to change the size of the bomb site because it's boring if it's the same all the time fortunately csgo allows for you to change this sort of thing but Bots proved to be the limiting factor and the more you change the circumstances the less the chances are that they'll actually be able to plant the bomb the Bots navigation mesh in general is a secondary but still important consideration I went about getting it working for this game mode by splitting their movement grid up into very small squares with many of these being obstructed by procedurally generated details and then what's left becomes their Roots across the level this was more or less fine other than that I focused on making the generated details look more varied and prettier than in previous iterations by including more varieties of items buildings decorative elements and most importantly plant types I battled with various teething issues along the way with unexpected bugs and unpredictable restrictions but I eventually produced a playable wingman map in which the sights the spawns passages and its environments were randomly and successfully generated every time however something still seemed off about the result I didn't enjoy it and ultimately decided to put the project on hold in the hope that one day I'd get a divine inspiration that was required to help finish it to a stand that I was happy with sadly I'm still waiting for that day so until that happens my wingman Project's fate remains uncertain while developing that wingman project I was doing a couple of page projects on the side one of these was a request for a training room of sorts which was an idea I had had previously but it was the paid element that finally encouraged me to attempt it I realized it would be the ideal project to combine with my procedurally generated scripts and I enjoyed combining the two to produce a training room that changes with every playthrough it comprised of different rooms strung together inside Each of which were places to spawn items mostly boxes behind them Bots could appear which you needed to shoot in order to gain points I was happy with the result because I had finally generated more than one room at once which helped me to decide that I was finally ready to undertake my dream project of a rogue light experience so after a few years of experimentation I finally got on to making a roguelite game mode with the ability to play both solo and with friends complete with pickups unlockables shops unique enemies abilities and bosses it's funny that initially I plan to make this mode for the 10th anniversary of Cs go but in the end it turned out to be a farewell gift to a passing era but first things first how do we get this working on a game engine that's Bound by so many restrictions as with the wingman map first I needed to make sure that I could get the essentials working firstly the damage rewrite I wanted the weapons in this mode to deal damage differently from how they do in Counter-Strike because the player's stats would be getting upgraded as the experience progressed so it was important to also be able to make the Bots the players would be facing more challenging and more lethal in each successive location played this seems like an impossible challenge because if you were to get shot in the head with an up it is most likely a one-hit kill before any damage modifications could occur to reverse that luckily in CS go I found a workaround health is displayed on screen up to a maximum of 32 767. so what happens if we set the player's Health to 32 768. I hear you cry well setting it to that makes the section of the HUD displaying your health to suddenly disappear it's like it thinks the player's dead or something but setting it one Higher again to 32 769 makes it look like we have just one HP again when in fact the total is so great that we can survive even a whole pint of lead and this is how the damage rewriting works I boost the player's Health to Beyond 32 768 which then gives me control over how much damage should be inflicted depending on a number of Rogue game mode related factors like difficulty level luck and much more and since the health levels are so high there's no risk of the player dying as the calculations are being performed this trickery isn't noticeable to the player and is a system that was essential to get a rogue Style game mode working secondly there are items in this game mode that give players a buff so it was important to implement an inventory system that correctly collects stores and displays the player stats and abilities fortunately this was implemented without a hitch the only negative being that CS go does not provide good tools for editing the existing Hut this instead has to be implemented via visible tooltips or with text but this doesn't scale well to higher resolutions a fancy alternative to these approaches is to attach custom assets to the player's camera but even this isn't without a bitter downside I chose to feature some of the interface using this method but the player must remain still because during movement everything attached to him will shake in a distracting manner which is a Pity because this could have been the ideal solution to creating a brand new user-friendly interface for my game mode the third challenge was adding a save system a roguelite experience can last several hours so the idea of having to do that without a save system is just wow fortunately CS go has some tricks I could utilize to save files and then to load from them by reading from them again this method is far from ideal but it's better than nothing saves work automatically and save the player's progress on each load of a new level so if the game crashes your stats may be reset but your earned experience points remain which he can then spend again the next time you load the map up and the fourth and most important challenge to overcome was the level generation let me remind you that the room in the aim map was simple with the whole generation process being the mere placement of predetermined items in the training map the generation was more complicated with multiple rooms being combined to form a long Corridor complete with objects appearing in certain places but for a roguelike game mode it was necessary to come up with something a lot more advanced I tried several options finally settling on the following a room gets divided into a floor and separate walls the floor model stores data about the edges of the room and any potential exits and the wall models have different designs and lengths you can see from this Farm theme that each wall has many sub-models which allow for a huge Variety in appearance and the best thing about it is that this is all contained within just one model this greatly reduces the number of props required per area which is important when the total number I can have is so limited the this method of room generation allows me to connect two different floors in one room from which there can be several entrances and exits around which walls can be built the result is an elaborate Corridor containing many different rooms some of which have branches some leading to shops or to rooms with desirable items in them this was made possible thanks to blender which I had to learn for this project I only needed to figure out a few basic things like how to create simple models simple animations primitive bone creation and how to modify existing assets which helped with many different aspects of developing this game mode the generation of items in previous projects was relatively simple I arranged a set of boxes and Barrels in advance in a level like this and put triggers in places to ensure that only the right types of items were spawned there this severely limited the variety of the result but this time not even a single crate is placed in the map beforehand instead I store all possible items in a long elaborate file containing every parameter required what spawned and where it can be placed is now determined by the floor model Itself by understanding the shape of the rooms and where its edges lie allows me to break the whole thing up into rectangles in which I can spawn whatever I want and this isn't just for items but for characters enemies weapons location specific details and even the rooms themselves all these things have their own detailed files documenting every parameter for every permutation possible I have essentially Rewritten the whole thing from scratch it's still spaghetti code but is far less stringy than before these new scripts have improved many things for example the Rewritten code for choosing a seed and for generating random numbers now does these things more intelligently in the older code the slightest fart would greatly alter the generation of locations and the placement of items and anything else dictated by the seed but now there will be no such problems even the seed itself has changed Now using eight characters consisting of letters and numbers meaning that the number of different seeds is now as great as 2.8 trillion 2.8 trillion different locations and
levels and it's now almost entirely generated from that code in my earlier aim and training map projects there were many pre-prepared elements that spawned for different purposes but now only the weapons and large and complex objects like a store and A Wheel of Fortune are hand placed I use far fewer green Gordon Freemans to indicate set spawn points for things and the bot and player spawns are now fully decided by scripts Bots can now spawn behind almost every box or tree but do so only within reason on the whole the entire procedural generation process has been greatly improved but unfortunately it was not without problems and some desired mechanics sadly had to be abandoned I simply could not or did not have time to fully Implement everything I would have wanted for example I was hoping to use the old split navigation method but the size of these levels can be so very large as great as twenty thousand by Twenty Thousand units and splitting a grid of this size drops the game's frame rate down to about one frame a second and so using such a grid system is totally infeasible I found workarounds by manipulating bots in other ways but by still using the same scripts I wanted pistols to have infinite ammo and for the rest of the weapons to have finite ammunition to use but unfortunately CS go does not allow for you to get or to give the player the required amount of ammo you can either replenish all of the ammo all at once or must use other methods which result in their own exotic bugs there is an ammo dispenser in the danger zone game mode which would have been ideal but sadly it refuses to work in a custom game mode of any sort just great in the end I opted to give all weapons infinite ammo which I think worked out for the better even several ability cards that were already fully functioning also fell under the knife but more on that later some mechanics were reworked or completely removed for example earlier in development in order to take a diskette players needed to have a free inventory slot which could be obtained by taking any card I thought that doing it in this way it would give players more motivation to collect cards but in practice this Theory never took root a separate topic for discussion is optimization Source provides tools for optimizing maps by hiding stuff behind solid walls but as these levels I was creating comprised entirely of dynamically generated objects even the walls and Floors being such things optimizing such an environment is a different task entirely to begin with i investigated the use of LOD this stands for level of detail meaning that things nearby are drawn at a much higher quality and with more polygons and this quality then gradually drops as the items get further away from the player problem is in CS go level of detail doesn't work at all so I cheated many of the generated walls and Floors have their own sub models that determine the detail of these items so I calculated where the players were in the level made sure I kept good quality floors and walls in the neighboring regions and then completely turned off the submodels in the ones further away a this trick helped a little but what helped most was just not to render stuff at all so I've resorted to a technology that games from the 90s made very heavy use of fog I also used this on my aim map and here as planned it entirely removed rooms that did not need to be seen reminding us again that we are in virtual reality many textures had to be compressed as the map size was getting uncomfortably large at one point reaching almost 900 megabytes in size after all this compression the map is still 700 megabytes due to the large number of wall models for the Farm locations but once the map file has been archived it weighs just 300 megabytes which is still big enough to break CS go and when connecting to a rogue light server for the first time you may still see the error failed to find a dedicated server which actually means that the map is still being downloaded you can try to change the download server in the steam settings but this does not always help your best bet is simply to wait or perhaps to restart Counter-Strike and steam several times in general due to the abundance of dynamic items I aimed for the frame rates on my maps to be similar to those in the danger zone game mode but it's variable sometimes it's higher other times much lower it all depends on the Bots and on the number of objects around I'd like to say that the plot was cut due to technological constraints but the reality is I simply did not have time to come up with something I even planned to have voice acting like what's heard in the official Co-op Maps but alas in the current version there is no hint of a plot at all but the idea was to have something like this the Phoenix have a secret Soldier training program that runs in virtual reality the operatives were able to steal this data and try to hack the program with the help of convars a special program called Rogue was developed which uses most of the stolen data but much of which can only be obtained by extracting information and that involves players jumping into the VR simulation and by gaining experience points thus by building this entire special complex operatives can study the intricate Technologies the Phoenix possess by undergoing a mysterious training program in virtual reality okay I think it's time to walk you through the end result in the beginning the players don't have a Hut as they are still in reality in order to get started they must get their hands on Modern equipment yes Dr romanov's glasses are perhaps a strange choice I had initially planned to make a model of a fully fledged virtual helmet but I didn't have time to do this sorry upon picking up romanov's glasses players can finally see the Hut and other elements thanks to the magic of augmented reality it will highlight and reveal more detail if pointed towards objects characters and various hints dotted around the room which I placed to help the player to get used to this system a little before the experience Begins for real here we will focus on the most important thing the leveling room subjects gradually level items while looking at this green button which is definitely not just a large microwave oven that's all just in your imagination each open block opens a new opportunity to get a new item or to open a new category for leveling in the same room you can view all the blueprints booster packs and ability cards which if we also factor in the curse cards comes to more than a hundred in total I even bought one of them Apple pads to try and help me to draw these things with my crooked little fingers I'm no artist but I'm quite proud of how these cards turned out coming up with names for cards was its own challenge because the name should not only reflect the ability it represents but should also be something that's within my ability to draw for example understanding how to draw weakness is more difficult than drawing fragility or figuring out how to design a car to represent self-flagellation when there's already another existing card with artwork containing a masochist I chose to rename this one empty deck since it debuffs your stats based on how many other cards you hold at the time so you had better hope the rest are empty some card names were originally chosen to reference other games music films and media problem is quoting something like the HEV suit from Half-Life is not always the easiest to draw nor the most intuitive wording to attempt to translate into different languages I quickly learned that it was best to moderate my usage of Niche references though I did still use I know Kung Fu but oh well after the leveling room it's time to choose a character each have their own stats and unique ability in the form of a special Card unfortunately this is one of the most underdeveloped aspects of the game mode these special hard served their purpose but visually they could have been made clearer to display that they've been activated I really wanted to animate the hands in first person to visually communicate their power to the player but it would have required time and effort that I couldn't justify another problem is the activation itself unfortunately Counter-Strike doesn't have a way to easily trap which buttons are pressed you instead have to track specific actions so activation of these abilities is represented by the weapon inspect function you press a button usually F and the ability is triggered the problem is that while the player is busy equipping or reloading a weapon their ability will be disabled since you can't inspect a weapon during these other actions which is a shame since it's at such moments that the special ability could have been the greatest Lifesaver there are eight characters to choose from but more were originally planned four of the eights start unlocked and the remaining four can be unlocked in different categories of the leveling room now next we dive into VR and this is where the fun begins in virtual reality as we go through the level room by room will encounter various enemies items that we can pick up shops that we can visit and The Wheel of Fortune before ending with a boss fight of sorts let's start with items ability cards can be either good or cursed good ability cards give the player various passive abilities that last the duration of the Run cursed cards give a negative effect such cards can be randomly acquired from The Wheel of Fortune sometimes you get good and bad cards together where you may know what the good card is and you may take a gamble believing it will outweigh the downsides of whatever the cursed card may be some of these have mild effects others can be pretty devastating as I said earlier there are over a hundred different cards in this game I try to make the abilities as unique and as interesting as possible some of the cards did not make it to the current version of the mode While others were reworked many times for example the Dynamo machine card this ability was supposed to encourage the player to constantly move because with each step he would gain a small amount of HP the moment he stops this health would rapidly drop down to one HP again I decided to remove this card until I could figure out a better way to balance it another interesting card is the alpinist this was the very first one that I ever made it allows the player to climb onto Ledges initially the levels were planned to be more vertical and there would even be some rooms where there would be mini games in which the climber ability would have been very helpful but this ability ended up being handier for other purposes I ended up giving it to almost all of the Bots yes Bots can also have their own abilities and stats just like the players can the alpinist ability helped to dislodge Bots from potential stuck spots and also allowed them to navigate taller obstacles there are also cards for setting fire to things for slowing stuff down and even to charm enemies some cards allow you to heal more effectively some change grenades there are cards to increase the damage of a certain type of weapon and some mail to your stats and abilities changing your approach to choosing diskettes there are many opportunities to create unique feeling character builds in this game mode this gets these allow you to level your character's main stats there are five core parameters Health damage technology critical damage and luck there are others as well but I'll only discuss these main ones in this video health and damage are fairly easy to understand but others like luck and especially technology may not be so immediately understandable among other things luck also affects one of your secondary stats known as critical chance which determines How likely you are to deal critical damage it also determines the chance of triggering various unique abilities like setting fire to people or poisoning them luck also helps with the Wheel of Fortune improves your chances with cases which may be booby-trapped and also the chance that a cursed card may not work now I've always considered technology to be similar in function to intelligence it affects your secondary stat of medicine which affects how much you can heal yourself for example if you have a negative medicine stat then a small first aid kit will only restore 1 HP I do not recommend that you neglect technology it also determines the damage that's dealt from grenades and most importantly the potency of some cards abilities blueprints are basically weapons you pick up a drawing and you get a gun or sometimes a few grenades it's all straightforward and then there are some collectible items money experience points and first aid kits which do exactly as you'd expect these sort of things to do also worth mentioning are the booster packs these are kind of like hidden items which were regularly likened to achievements during this game modes testing if you fulfill enough hidden conditions during a level then you will receive a booster pack that opens a unique card that cannot be obtained in any other way these first three items I've covered that being cards discounts and blueprints can all be obtained in the store through the Wheel Of Fortune or from various containers that are found in the game's World both when clearing out a room and on other occasions the storm mechanic was inspired by the feature found in dead cells the player has offered several random items for a certain amount later on players May unlock an ability to re-roll items or to even be able to choose a specific category of items to buy from The Wheel of Fortune was more inspired by the Isaac slot machine although for the most part it just serves to randomly give an item to a player who has a playable coin to spend there are 12 Parts on this wheel of which only four start revealed there are two buttons to control it one of these improves the will by replacing bad sectors with random ones and if there are none to replace then it reveals another part of the wheel as for the second button that's used to spin the wheel itself there are a lot of containers scattered through the game some will appear after you've cleared out a room as a kind of reward While others are in special areas or simply well hidden within the environment I have added some powerful features to make the game feel fairer for example if a player is about to die they will instead be left with one HP giving them a final chance to avoid a game over there is also an instant reload mechanic which the player can activate by pulling off a melee kill after which they will then find their weapon has been reloaded and when playing with two or three players you can revive a friend by sacrificing half of your current health which is then transferred to them instead it is worth noting that the balance of all these elements was and remains a massive challenge I have made a real fun mess with all of the different gameplay mechanics that are going on here but even with all these things in place the fact it still took me so many attempts to reach the final location in the game is probably a sign that the map will still be able to offer a challenge of some sort unfortunately this project is only about 80 done the gameplay mechanics work but I'm not yet ready to consider it finished despite it perhaps looking as if it is on the surface the enemy types leave a lot to be desired there currently aren't as many enemy types as I would have liked and the Bots are limited in their capabilities some enemy types were born from borrowing and combining several different ideas for example my friend answer Mist released a video about hitboxes which helped give me the idea of a scarecrow class of enemy since his hitboxes eventually become so small it discourages mindless spray and prey and I hope will make defeating him more about Precision shots and smart tactics for instance you can simply set him on fire instead this enemy type was initially a bubble of some sort but was then replaced with straw before the bubble guy returned but only for later acts of the player's quest in the early sections of the game you'll most likely encounter Farmers armed with various weapons like a torch that can set the player on fire and some snowballs that can blind and slow the player down combined these three different types of enemies are intended to challenge the player in various ways and to encourage them to move about and to try and shoot more accurately and to have to make decisions about who to attack first and with which kind of weapons I don't want players to just run and gunned blindly there are also different variations of enemies with Firearms one particularly noteworthy enemy is glitch this was one of the first unique enemies that I made he has a regularly changing character model and the ability to teleport to different locations I originally considered this kind of feature for a boss fight but decided against that and right now only have two types of bosses that you'll encounter in the game I want to make each boss a little more interesting than your standard helicopter boss or another type of bullet sponge vehicle sort that you tend to see in other games I will not describe the bosses in detail but for each of them I envisioned Unique Mechanics to try and make their fights look and feel interesting to play the procedurally generated Maps throughout many different bugs at various stages of development sometimes I forgot to prescribe the necessary parameters for certain objects which led to funny situations and sometimes the modes simply throw out unknown errors which were far harder to diagnose in the current version for example there is one bug that I can't fix in any way when a player enters the first location with Bots the round can restart thereby throwing the player into reality again after which the game will work as normal the why this restart occurs in the first place I have no idea lighting oh For the Love of All That is Holy in this God forsaken land the problems I had with lighting I do not recommend anyone to deal with Dynamic lights in CS go it is the most disgusting thing I try to add the tiniest little light to the first location and the result of this nightmare unfortunately will immediately catch your eye in general shoddy indoor lighting is the main reason why many of the locations are in outdoor spaces I had to abandon some locations just because of the lighting which is a Pity I really wanted to generate Subway passages and to have office complexes where the player would have to fight through several flaws of a half constructed building in the styles of office and vertigo five locations were originally planned with one of those being secret only to be unlocked after certain conditions but it just took too much time so I opted for three locations with three boss types which then became just two because I didn't even have time to do that one of the locations is around the remnants of a farm in which you'll need to fight the farmers and to get through the basements in large Fields filled with hay sheds machinery and various other props the second location is something like a forest these spaces are more claustrophobic the visibility poorer and the enemies more aggressive the Third location let's just call it air she's a little unfinished I've got the floor models and connecting fridges ready for her but that's about it I started making unique enemies and even had plans for a third boss type but like I said I didn't have time to complete that which gets us onto something I've been meaning to talk about I called Count Strike 2 the Main villain earlier and I need to explain why the fact is that some features of the source engine on which key mechanics of this game mode are based simply do not work in Source 2. the trick with rewriting Health cannot be done which is the first major blow to this mod there is no way to save files since the console commands do not work and to be honest I doubt they ever will which is yet another blow to this game mode and the killing blow is that Counter-Strike 2 uses the scripting language Lua while in CS go mappers have been using squirrel for 10 years it was here that I again felt dead inside reflecting upon the 50 000 lines of code needed to create this mod and honestly now I simply do not know what awaits this project of course having access to the source 2 tools I will see what can be done but so far it doesn't look hopeful in fact I'd even say it's hopeless I really want for the developers of countstrike 2 to take notice of this project to add squirrel as a scripting language and to allow for the same changes to HP and for the inclusion of save files but who am I kidding so that's why I decided to release this game mode as it is there may be some bugs and crashes I may not have had the time to add some enemy and boss types and there isn't an established ending but it's still a lot of fun to play especially since the map is flexible enough to be played either Solo or with up to three players working together there is a lot to discover and to find in it and I am distraut that this idea of which has been my dream for three years will now most likely sink into Oblivion huge thanks to my friends [Music] thank you so much for helping me to test the map for suggesting ideas and for giving me encouragement and support when the source engine did not and thanks also to you mysterious viewer for listening to this nonsense from a Madman until the very end I'm open to suggestions on how to improve this mod and I hope you enjoy playing it have fun
2023-04-22 07:38