u/Mafla_2004

Need advice on handling weapon reload animations for weapon with dual fire modes and magazines.

Hello. This might seem like a simple problem but there are some things that make it more complex than it should be, so I decided to ask for advice here.

Weapons in my game work as follows: They have two fire modes, the primary which is fired with LMB and the secondary which is fired with RMB, a weapon might use the same magazine for both fire modes, have different magazines for different fire modes or have one or both fire modes not use magazines, this introduces a bit of a problem when it comes to reloading.

This is because a weapon might have to use an animation for reloading the primary clip, an animation for reloading the secondary clip, and an animation for reloading both at the same time, and not every weapon might need all these animations: some weapons might use none because they don't use clips, some might only need the primary or the secondary, some may need the primary and the secondary but not the animation for reloading both and so on.

I could have the weapons hold three pointers to animations and just not worry if some of these are set to null because it won't cause a massive memory waste, but the situation gets more complicated when you factor in the possibility for reloading on an empty mag: as you know some weapons might use a different animation for reloading when the mag is empty, and in the case of my game, this would need to apply to the singular fire modes, doubling the max number of animations a weapon could have from 3 to 6, and most weapons won't use all 6, I calculated that there are a grand total of 19 possible cases.

Of course, just shoving 6 animation pointers in the weapon class is not good practice for a plethora of reasons, so I began rethinking stuff:

First off, I decided to isolate "fringe cases" that are so rare it's not worth it to implement them in the base class, those being the cases in which an animation for reloading both mags is needed, there will be at most one weapon in the game that will need this so I can just code it in the specific weapon itself, the max number of animations goes down to 4.

Secondly, I thought about offloading handling animations and possibly reloading itself to components for each fire mode, so a firemode has a pointer to a reload manager which can hold one or two animations, which will then decide which one to play and possibly also replenish the weapon's clip accordingly, the downsides are that this would take much more memory than just having 4 animation pointers in and would introduce a bit of neddless complexity in the code.

What is making me reconsider the components path though is the fact that some weapons (and not few since most weapons are based on WW1 guns) might need to reload rounds singularly, so I need to handle that case too, this is where using the component thing could help, but at the same time I could have an enum in the weapon class that, for each firemode, specifies if the mode needs no reload, a simple reload, support for empty mag reload or rounds reload.

I also looked at how other games handle this problem and found that... They just don't, most games with dual fire mode weapons either don't use mags (Unreal for example) or use a singular mag for both fire modes (Half-Life), I'm not sure though this could fit the needs of my game, but I could try to redo that "isolation of fring cases" process.

So I'm a bit indecisive and I decided to ask for advice here, what would you do in my situation? I don't want my code to look like that of Yandere Simulator TwT

reddit.com
u/Mafla_2004 — 22 hours ago

Found out you can Parry (Unreal Gold)

If you're confused, I launched a flare and it intercepted the Slith's blob

u/Mafla_2004 — 6 days ago

I recently came back to Unreal & Unreal Tournament and found myself saddened by the fact the series (which has always been my favorite) is dead, and while I enjoyed some games I found myself thinking if and how the series could be brought back from the dead (especially with the 30th anniversary coming in 2 years and with the boomer shooter genre seeing a renaissance), and I wanted to brainstorm what I concluded and see what you have to say about it.

I came to the conclusion that trying a reboot of Unreal Tournament right away might be a losing battle: the main reasons for this being that the PvP shooter scene, especially that of arena shooters, is already saturated and trying to enter it again would put the game in direct competitions with giants like Call of Duty, Battlefield and Rainbow Six, which are already full of players, so UT would likely not get much attention.

Another reason is the fact that UT, unless it becomes as filled as its competitors, would likely require a great amount of skill for a player to not get destroyed right away by more experienced ones (hell, many people already struggle to not get frustrated when fighting against players around their skill level and UT is full of people who have been playing passionately for 10 to 30 years), which would frustrate newcomers and possibly push them to quit, this can be circumvented to some degree with UT's botmatch mode, especially with how advanced UT's AIs are compared to most games', but it is still a shot in the dark.

However, this doesn't mean that Unreal is destined to remain in the shadows forever: if we look at the boomer shooter scene (which is where a hypothetical new Unreal would land) we can see that single player experiences consistently perform better than multiplayer ones.

Think of Doom 2016 and Eternal wherethe community cares a lot more about the campaigns than the multiplayer modes, or Dusk that did well in singleplayer while the multiplayer mode almost entirely dead, or Ultrakill which is one of the most appreciated boomer shooters out there and is entirely singleplayer; all these games show that, when it comes to this genre, people prefer singleplayer by a lot.

This is where I think a potential reboot of the series could shine: Unreal Gold was a splendid singleplayer game, its atmosphere and aestethics were beautiful, it had extremely intelligent AIs that forced the player out of the more "mindless" gameplay of games of the same era, and it had of course a unique weapon roster, all things players would value in a boomer shooter game, so if Epic were to catch these elements and successfully translate them in a modern title, I think it would gather a sizeable audience and possibly bring the series back to life.

It could also be a chance for Epic to show further what Unreal Engine 5 can do when used well, they would know how to squeeze the best out of their shiny new features without making a game that runs like dog water (hopefully).

Now, this doesn't mean either the multiplayer scene of Unreal, and thus Unreal Tournament, is hopeless; assuming they do make a reboot of Unreal Gold (which I know already is wishful thinking on its own) and it does well enough, they could use the new player base gathered with it as a starting point to propose again a multiplayer spinoff (a new Unreal Tournament) or incorporate it as an extra mode (as was the original plan for UT), so that it already has a potential community of old and new players to get it started, and see where that goes; if it goes well, they could go on with new UTs, otherwise keep on with singleplayer focused games.

This is what I think would be the most likely way to bring Unreal back to life, and while I know Epic will most likely not do any of this until Fortnite dies (and I mean, it *is* slowly bleeding out but I don't wanna hope for the death of another fandom to see my fandom come back to life), sometimes I like to think about this what if. Do you think this would work or do you picture something else?

reddit.com
u/Mafla_2004 — 23 days ago