[ / / / / / / / / / / / / / ] [ dir / 112858 / agatha2 / animu / arepa / irc / lewd / vg / vichan ]

/v/ - Video Games

Vidya Gaems
Email
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Flag
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options

Allowed file types:jpg, jpeg, gif, png, webm, mp4, swf, pdf
Max filesize is 16 MB.
Max image dimensions are 15000 x 15000.
You may upload 5 per post.


<BOARD RULES>
[ /agdg/ | Vidya Porn | Hentai Games | Retro Vidya | Contact ]

File: f2593bc62ab5c1a⋯.png (733 B, 69x71, 69:71, ss (2018-10-05 at 02.49.36….png)

7bd0b4  No.15547168

Is it bad practice to have enemies with randomized routines rather than patterned?

The latter is certainly less frustrating, but also significantly easier and if implemented poorly can even be TOO easy. The former, on the other hand, can run the risk of being TOO hard, even for the most grizzled viddy veterans.

What is your view, /v/?

4777dc  No.15547201

RNG is just another term for bullshit. Skill level has minimal impact, maybe you could say that reaction time is its main purpose. Patterned routines depend on the game. If you're playing a platformer it's usually good, you learn what types of enemies do what and can react appropriately. If they kill you, it's on you. But take say Operation Flash Point. You're at that one mission where you're alone in a forest. There's literally 3 APCs and upwards of a hundred guys completely encapsulating you on all sides. There's also the helicopter flying overhead. And when you get to the second forest, there's squads there too. You end up dying dozens of times, until you learn what squads are scripted to go where and at what exact time the APCs move. That isn't skill either, and even more frustrating. But if say, if each squad had 10 paths to take, it could possibly open up a gap and would make each reload something fresh. So on top of what you exactly mean by patterns, I'd say a bit of RNG can make a hard experience more fun provided it isn't based on it, while it would make a normally easy experience frustrating and "hard".


b46303  No.15547237

>>15547168

Yeah, it's fucking gay.


000000  No.15547239

>>15547168

>Is it bad practice to have enemies with randomized routines rather than patterned?

It depends on a lot of factors.

For example, are there proper lenght recovery animations and windup animations for all actions the enemy can do? If not, randomized routines will result in broken animations/bullshit attacks.

As a very general rule, I would say that semi-randomized AI is better to play against than strictly determistic AI unless you fuck it up seriously and it doesn't fall into the "one way to victory" trap as easily, but deterministic AI is much easier to test extensively.

>>15547201

>RNG is just another term for bullshit.

This is just ignorant, randomness is not inherently more or less bullshit than determinism.

When you try different moves to see what works best on a certain enemies, the order in which you try them is essentially random, and if you wanted an AI to do the same thing against the player you'd use RNG to accomplish it.


369906  No.15547241

File: 09be7d26ca01cd9⋯.png (828.4 KB, 627x749, 627:749, GondolaClassy.png)

>>15547168

What kind of game are we talking? That's a major factor in how easy or hard that sort of thing is to implement and what sort of behavior is desirable. Platformers tend towards purely pattern based AI whereas RPGs tend towards random or semi-random. A koopa will always keep walking forwards until it hits an obstacle. The green ones will always fall off ledges and the red ones will never fall off ledges. An enemy wizard in a RPG however, might pick any of his spells to cast purely randomly though.

Any AI that is 100% deterministic can be understood by the player and any AI that can be understood can be exploited. For example, in many Fire Emblem games, the AI will always attack a target who is incapable of counterattacking if at all possible. Because of this, many players will unequip a high defense character to draw the attacks during the enemy phase and then pick them off during the player phase with his other characters. If you're fine with the player being able to do stuff like that, then a deterministic AI is probably better.

I'm working on a turn based RPG, so I went with a bit of a hybrid approach. Generic enemies will look at every action they know and check to see if any are possible and generate a list of every combination of possible action and possible target for that action. Of the actions it can perform, it picks one randomly, but the choice can be weighted to make some outcomes take precedence over others or to make them more likely to be picked. The AI script then estimates how beneficial it would be to target each possible target of that action, sorts the options with the best ones at the top of the list, then picks one of them near the top - not necessarily the best one, mind you but a good one. I could also set it up to where instead of randomly picking an action and then intelligently picks a target, it ranks every action/target combination and then picks intelligently from that list as well. I may do an alternate AI script that does that for enemies I want to be smarter or have it work like that on higher difficulties.

The key thing to keep in mind with any sort of AI is that the goal isn't to beat the player, but to provide a challenge that is entertaining to overcome.


36aac7  No.15547257

Are you given enough time and agency to react? Can you actually do something useful once you get thrown a curve ball, maybe optimize for risk in advance, or is it an inevitable and complete dice roll that can end you right then and there?

This usually comes down to how granular the random element is, and what you're going to lose should you find yourself in an unfavorable situation.


4777dc  No.15547269

>>15547239

>something that you cannot in any way predict is not bullshit

ok


369906  No.15547272

>>15547269

>What is reaction?


000000  No.15547278

>>15547269

>something that you cannot in any way predict

Is chess bullshit because you cannot know which move your opponent will make?

What you're arguing against is a kind of RNG very uncommon outside of old vidya and tabletop games: the original Doom had heavily RNG-dependant damage, for example, with the damage done by enemies being something like attack_base_damage*1d10, but modern titles almost never do that.


f9e396  No.15547287

>guard patrol patterns are random

>that guard who's been staring away from you for 20 seconds turns around the moment you start to move


f30bb3  No.15547290

What about a set of movements that have small tells that are random? Like multiple sets of patterns that are randomized, so you don't know what they'll do next but you'll know how to react.


9b7689  No.15547302

>>15547168

RNG has to be used intelligently for AI.

>Shit RNG

The enemy has one attack, and the attacks come at random intervals in order to not be too predictable. Risks suddenly becoming too easy or too hard.

>Meh RNG

The enemy has multiple attacks patterns to avoid uniformity, and RNG is rolled once at the start of each encounter to see which pattern it gets.

>Decent RNG

The enemy has a number of attacks and movement patterns. RNG is rolled after every action to select a new attack or movement. The result is checked against the the game state to see if it's an intelligent choice, and if not, it rerolls to find a good one. If no good choice is found in so many rolls, it attempts to reposition, or forces a choice in order to move things along.


4ea04e  No.15547308

Invidious embed. Click thumbnail to play.

>>15547168

>Is it bad practice to have enemies with randomized routines rather than patterned?

It really depends on what kind of game you're making.

If it's a game where the main challenge is navigating the levels or beating set pieces (i.e. point and click adventure games, rail-shooters, platformers, beat'em'ups) then randomness is a nightmare, because you're punishing someone for trying to have a good execution of their gameplay. Assume you're playing a rail shooter where the boss just randomly shoots at different parts of the screen instead of having a good tell and/or a set amount of attacks you have to counter. I mean, enemies can and should have a randomized behavior when they're a big threat, like in the case of bosses, but that randomness should only concern which attack pattern they follow, and every pattern should be equally likely so you can learn how to beat the boss on at least your second try.

When the main challenge is actually competing against the machine or a would be human player (i.e. grand strategy, rts, puzzle vs., fighting games) then randomness is more than welcome, because it has to emulate what a real human opponent would feel like. Barring story mode missions, where it's much better to have a somewhat "set" pattern for the AI (because it falls within the set pieces argument from the above paragraph), an AI in Vs. styled games or when you're competing on a bigger scale should juggle being random in the execution of their inputs and executing certain patterns when presented with the opportunity to do so (i.e. a fighting game opponent that just throws moves at random and even executes certain inputs as fast as the game allows it, only to go full combo when you present him with an exploitable opening - and not even all the time). Also, in these kinds of games it's more than acceptable that your CPU opponent is allowed to "cheat", be it by having extra "ghost" resources or slightly faster units (never teleporting though, that always feels like a dick move). This is because the human player can do plenty of shit that a good, responsive AI cannot (i.e. the human player can reload when things go sour, they can come up with strategies that exploit some known weakness or repeated behavior of the AI, you name it), so it's acceptable that while the AI Roleplays as a human, they get some extra shit that feel like a challenge to the human player. Also, never give your AI defensive bonuses, it just pads the game.


000000  No.15547349

>>15547287

That's shit game design, without RNG the game boils down to "memorize when the guards turn around" and with RNG it becomes "hope the guard doesn't turn around", it's bad either way.

>>15547241

Pretty cool, considered adding some feedback to change the score of actions based on how effective they end up being?


2cbe13  No.15547356

RNG is fine provided that the thing based on RNG has some sort of telegraph to give the chance to respond appropriately. In RPGs and strategy games, RNG is layered on top of itself so that you make calculated risks.


369906  No.15547968

>>15547349

>That's shit game design, without RNG the game boils down to "memorize when the guards turn around" and with RNG it becomes "hope the guard doesn't turn around", it's bad either way.

If I was making that, I'd probably give the guards a minimum and maximum wait time before turning around and randomize it within that range. I'd also make them react to "noise" so you can't just sprint past. You have to move stealthily or they'll hear you and turn around regardless (though perhaps you could exploit that by creating a noise somewhere else. It would alert them that something is going on, but they wouldn't know your position. It would then change the AI to be a bit jumpier, and reduce the minimum and maximum wait time because they're on edge now).

>Pretty cool, considered adding some feedback to change the score of actions based on how effective they end up being?

It should be able to calculate a baseline good enough without that, so I don't think it's needed. An attack would have it's value rated at the average amount of damage dealt to enemies with that amount replaced by a high constant value if the average kills. A healing ability would be the average amount healed, capped at the amount of health actually missing. Abilities that cause status effects are a bit trickier, but it should still be possible to come up with a decent way to calculate relative value - a defensive status would be valued at the amount of damage it blocks multiplied by the number of turns it will be active, possibly multiplied again by however many attacks per turn it predicts it will take (which can be estimated as NumberOfEnemies / NumberOfAllies).

AI always "cheats" in that it has access to and uses information that it's impossible for the player to have, but how fair it seems depends on how that information is used. In my case, the goal is for it to behave similar to how a human would, which means trying to intuit what the best option available is. I don't want it to be too smart, so it doesn't look ahead further than its own turn and it doesn't always pick the best option, but it still follows a logical pattern to make decisions.


2b5d3b  No.15548647

I hate how there are so many instances where it becomes a game of averages due to the extreme ranges in the RNG that you'll get especially in multiplayer games. I don't really know what kind of drop system could be implemented to bypass grinding cancer but I'm sick of dealing with it in games that revolve around loot farming


dc89c7  No.15548654

can't have it too random, or you'll shit on it for being rogue like like like


9db781  No.15548660

>>15547269

>something that you cannot in any way predict is not bullshit

Wait until you get into physics 2 in college… you know nothing of predictability or bullshit.


46336a  No.15548770

YouTube embed. Click thumbnail to play.

Good RNG

>having enemies cycle through all their available attacks at random while taking each used attack out of the attack cycle, until all attacks have been performed after which point the cycle gets refreshed and all attacks can be chosen again

>using a randomly chosen seed out of a static list for RNG behavior, and having multiple overlapping layers of seed-picked RNG to prevent the RNG from doing unintended things and making things more consistent and easier to test and balance, without making all possible seed combinations learnable by the player

>respawning zako runners in Contra, who can be taken out in one shot by anything and can only kill you by running into which you can most of the time see coming from far away, and add a layer of quick on your feet thinking when suddenly you have to deal with a part of the level where you aren't used to a suddenly incoming enemy you can't deal with in time

>the entirety of Ninja Spirit and Daimakaimura

DECENT RNG

>using a table of fixed chances to affect responses for certain minor actions, where things work as you'd expect most of the time, but sometimes it might not which creates certain edge cases, like how pain chances work in Doom and how you can sometimes hitstun an Archvile which essentially gives you a random free pass by canceling the Archvile's flame attack for a bit

>too lazy to write more

ORGANIC "RNG"/EMERGENT GAMEPLAY

<this is basically what happens when you overlap multiple deterministic patterns in such a way that although everything is fixed in a sense and can theoretically be played perfectly, the level of performance and consistency required to do play the same way each time is way beyond 99% of all players, where minor mistakes and changes in your approach creates such a massive butterfly effect that you end up having to rapidly adapt to the current situation each time even though you know exactly what's coming, which is basically what RNG can do but without giving player's the excuse of crying RNG as an excuse for why they lost

<alternatively, the amount of game states that can happen as a result of the player's actions and interactions with the world can be so vast that you naturally end up with a different experience each time

>the missile assault in Contra III at the end of Stage 4 where you find yourself jumping from missile to missile (which come in a fixed pattern) while having to adapt to incoming fire you need to predict (also fixed) and destructible mines which you have to adapt to (fully RNG, but not a huge deal)

>most beat 'em ups, as most enemy behavior is entirely predictable (as it should be), but combining different enemy types in such a way together with the player's route often deviating from the technically most perfect play creates a lot of on-your-feet thinking

>Deus Ex-likes, where you can make all kinds of things happen, even by-the-developer-unintended ones even though enemy behavior and most things are entirely deterministic


3a95a6  No.15548919

i just want predictable easy gameplay not RNG that might make things harder or more interesting


2fa517  No.15549542

>>15547168

only if theyre placed as such that perfect timing and excecution would be required to get past them while their rng nature may or may not permit that timing. i can understand how people might not like that when the game otherwise does not feature that. for the most part i like it when games challenge you to pay attention rather than sticking to a routine.


22bde0  No.15549551

Depends on the type of game, but generally the best solution seems to be random to keep things spicy, but with hardcoded limiters to limit the bullshit (like an enemy spamming their strongest AOE attack exclusively).


96e9c6  No.15549579

>>15547278

I don't remember ever reading a Torpedo that was not a gigantic fucking moron, but you just broke the rule. Good job. I wish every Torpedo was a decent poster like you.


3909c5  No.15549673

As a dev

There's no one and steady answer.

How ever circumstantially there is a case to make for completely linear and fixed patterns. Such as time trial related content.


f015bb  No.15549852

File: 41fa614c25c4a2a⋯.jpg (335.49 KB, 1280x1690, 128:169, 1378973352405.jpg)

I don't mind some random elements but too many randomized elements often lead to sloppy game design. Hammer Brothers in the orginal SMB are an example of good randomized behavior.

>>15547201

>RNG is just another term for bullshit.

Fals because it doesn't take skill to memorize a series of buttion imputs. Some randomization keeps you on your toes. Twitch reflexes is also a skillset that sometimes needs to be challanged.


d2239f  No.15549890

File: 7c5d632226a5c60⋯.png (1.04 MB, 899x600, 899:600, dex_vs_str.png)

>>15547201

Are you a woman? You must be a woman.




[Return][Go to top][Catalog][Nerve Center][Cancer][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / 112858 / agatha2 / animu / arepa / irc / lewd / vg / vichan ]