Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
I assume they made a "go to next level" trigger because that way they could just copy-paste it from one level to the next and it'd keep working. I can just about guarantee that if they'd had it be "go to level X" instead, then they would've shipped with a bug where sometimes when you hit the end-of-level trigger, you'd end up at the wrong level afterwards.

The correct solution would probably be to stop processing events as soon as the load-level trigger is hit...but depending on how exactly loading is implemented, that might not be feasible. For example, if an in-engine cutscene needs to play, that might require the level to remain "active" in a way that makes processing events still necessary.

Game dev sucks sometimes :negative:

Adbot
ADBOT LOVES YOU

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



if the levels are always in order, you could make them a linked list and use goto(currLvl->next) or just plain objects like currLvl->transitionToNext(), etc. plenty of solutions available that aren't basically currLvl++

Inexplicable Humblebrag
Sep 20, 2003

just make one big level

Commander Keene
Dec 21, 2016

Faster than the others



I think we've found the open world game fan. :v:

Snake Maze
Jul 13, 2016

3.85 Billion years ago
  • Having seen the explosion on the moon, the Devil comes to Venus
If I were programming a video game I would simply not include any bugs or glitches.

iwentdoodie
Apr 29, 2005

🤗YOU'RE WELCOME🤗
I think there's a limit to how long you can be on unemployment

zedprime
Jun 9, 2007

yospos

TooMuchAbstraction posted:

I assume they made a "go to next level" trigger because that way they could just copy-paste it from one level to the next and it'd keep working. I can just about guarantee that if they'd had it be "go to level X" instead, then they would've shipped with a bug where sometimes when you hit the end-of-level trigger, you'd end up at the wrong level afterwards.

The correct solution would probably be to stop processing events as soon as the load-level trigger is hit...but depending on how exactly loading is implemented, that might not be feasible. For example, if an in-engine cutscene needs to play, that might require the level to remain "active" in a way that makes processing events still necessary.

Game dev sucks sometimes :negative:
I don't know how exposed it is in something like Unity but my understanding is you want to collect your collision events if not during collision detection routine for process-after-collision step, then in a scripting process-after-collision routine. If you do so, you can get a stack of scripts or routines triggered by collisions, and can post process them for example to remove duplicate "level +1" calls before they happen.


Carthag Tuek posted:

if the levels are always in order, you could make them a linked list and use goto(currLvl->next) or just plain objects like currLvl->transitionToNext(), etc. plenty of solutions available that aren't basically currLvl++
To give credit I imagine that's what they'd did, but then called it twice cause they stuck it in a to-process stack during collision processing.

There's varying other places to catch calling level transition logic twice.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



but then the global state should just get updated to nextlevel twice instead of nextlevel and then nextlevel+1

anyway,
https://twitter.com/db_witch/status/1663677400012472320

Kennel
May 1, 2008

BAWWW-UNH!
New Legacy Inc boys got their hands on a new wrestling game.

https://i.imgur.com/CHtzvKY.mp4

CzarChasm
Mar 14, 2009

I don't like it when you're watching me eat.
In case anyone wants the whole video
https://www.youtube.com/watch?v=8RNLF25W164

Dabir
Nov 10, 2012

Turns out Sid Meier's Civilization for DOS has, uh, a few interesting bugs in it.

Power naps
So, each unit you build has a limit on what it can do per turn, with both moving and attacking using up its supply of movement points. Units can also go into sentry mode, which means they don't take any further orders from you until you either manually wake them up, or an enemy unit stands next to them. But if you sentry a unit in a city, and want to unsentry it, you don't use the regular UI you'd use to wake up a unit in the field, you have to go into the city menu to do it, and I guess that skips a couple of steps that the normal UI goes through. One of those steps being 'how many movement points has this thing used already?'. So, if you have a unit in a city, and it still has any amount of movement left, you can sentry it, then immediately open up the city menu, un-sentry it again, and it'll magically have all its movement points back! Now with the power of snoozing, you can have a single chariot (movement points: 2) defend a city against an entire legion of attackers, mowing them down one stack at a time, then taking a five minute snack break before returning to the front line. Or, if you build a string of cities close together and link them with roads, you can transport a unit from one side of the world to the other in a single turn! From Siberia to KwaZulu in just one day, just imagine.

To me! *splash* To you! *splash*
This is kind of a variant on that last glitch. One kind of unit you can build is boats, and boats can also be sentried. Most kinds of boats can also carry land units, and if a land unit boards a sentried boat, the boat unsentries. And wouldn't you know it, unsentrying a boat this way also gives it back any movement points it spent this turn. And land units don't have to actually be on land to board a boat - they can step off the deck of one boat straight onto another one! So if you want to explore the entire ocean in one day, all you need is two triremes, a squad of peasants with pitchforks to toss back and forth between them, and a lot of patience.

Work harder, not harder!
Settlers are a very versatile unit in Civilization 1. Not only can they build new cities, they can also work the land, doing important things like irrigating, setting up mines and building roads to improve your civilization's productivity and mobility. Now, a lot of those tasks take more than one turn to complete. Or do they? Well, if you put a settler to work on a task, give orders to all your other units so the end of turn prompt appears, then check on your settler again, you'll find that they've already done an entire turn's worth of work, before the turn actually rolled over - and now they're asking for more orders! Well, put them right back to work on the same thing. And do it again, and again, and look at that, an entire mountain road that would have taken three or four turns, completed in just one.

Bridges to nowhere and floating fortresses
Settlers are buggy, boats are buggy, settlers in boats are double-buggy. Put a settler in a boat, and they can build roads and railroads on ocean tiles. Sadly this doesn't allow land units to walk on them, and boats don't move faster on roads, but floating railroads do make those tiles generate extra resources, so that's nice. You can build fortresses on ocean tiles the same way, but the guide that first documented this bug is long dead, and nobody seems to know whether they boost the defenses of boats inside them.

Reusable nukes
In Civilization, nuclear missiles are units like any other, and a nuke going off is handled through the regular battle system, with only a very slight tweak made to give them appropriate destructive power. See, normally, when an attacker wins a battle against multiple units that are standing on the same tile, the game tries to delete the entire stack of units. However, there's a limit to how many units the game can kill at once: When the game tries to delete a stack of more than 10 units in a single tile, only the 10 units with the lowest unit IDs will die. The rest are completely unaffected by the battle. Now, when a nuke attacks, the game skips the actual battle, just assumes it won, then tries to kill not only the entire stack of units on the tile it attacked, but everything in the 8 tiles around that tile too - including the nuke itself, naturally. That's pretty elegant, and I bet whichever programmer thought of that was really proud of themselves... But that kill limit per tile applies to the tiles affected by nuclear explosions, too.

Now, nukes have high movement, are impossible to see coming, and are indiscriminately destructive, so in normal gameplay, it's unlikely you'll want to have any of your own units within the blast radius when one goes off. But let's say you did. Let's say you had 10 lesser units all stacked up in one place, and you had a nuke go off from on top of that stack. All ten of your own units would die, of course, caught in the blast radius and incinerated instantly... But the nuke wouldn't. That's right, according to Sid Meier and his team, nuclear missiles can survive their own explosion if they have a big enough audience. And if the nuke still has movement points left, and you have a carrier or a city close enough for it to reach before the end of its turn, it can even get away to nuke another day.

We've found Atlantis, and it's in Canada
This one's a real treat. The map data for a game of Civilization includes the terrain type of every tile in the world, stored as a 4-bit number. A 4-bit number covers values from 0 to 15 - but there's only like 12, maybe 14 terrain types in the game, depending how they're counted. Each terrain type has an entry in an internal data table that tells it things like what resources it can produce, what improvements can be built on it, whether it can be converted into other types, that sort of thing. And space is at a premium in the pre-CD age, so the devs didn't want to waste it adding extra entries to the terrain data table for terrain types they weren't going to use. If a tile's terrain type was somehow set to 15, it would miss the terrain table and start grabbing junk data, using totally unintended values to tell it how to behave. But under normal circumstances, the game shouldn't ever generate terrain 15, so that's not a problem. Right? Right?

Well, it also happens that there's a limit to the number of total units the game can handle in the world at once. In later versions of the game, when you reach that limit, it gives you a warning, then starts automatically disbanding units when new ones are created. But in earlier versions, all you get is the warning. Keep trying to create units past that, and the unit data will overflow into the map data, corrupting part of the world and turning some of it into the mythical terrain 15!

On an Earth game, the corruption creates a new square continent, affectionately known as Atlantis, just north of Canada. Putting a unit on it may well crash your game, but if you have a city nearby, you'll find that terrain 15 is phenomenally productive, producing well over 100 shields, food and trade per turn (under normal circumstances, producing even 5 of just one of those would be exceptionally productive and probably take multiple layers of improvements). Of course, if you've developed far enough to have researched Industrialization, your cities will pollute the area around them based on their population and production - and any city that taps into the vast wealth of Atlantis will see both of those skyrocketing. Not that they'll be able to see the sky for long, with all that smog choking out the sunlight and putting the planet on the fast track to global warming.

Dabir has a new favorite as of 02:20 on Jun 3, 2023

The Lone Badger
Sep 24, 2007

Dabir posted:

Of course, if you've developed far enough to have researched Industrialization, your cities will pollute the area around them based on their population and production - and any city that taps into the vast wealth of Atlantis will see both of those skyrocketing. Not that they'll be able to see the sky for long, with all that smog choking out the sunlight and putting the planet on the fast track to global warming.

So that's why Atlantis was lost beneath the waves.

Hempuli
Nov 16, 2011



Dabir posted:

Turns out Sid Meier's Civilization for DOS has, uh, a few interesting bugs in it.

Thanks for the writeup! That was really fun to read :)

Stare-Out
Mar 11, 2010

This just showed up in my recommendations and it's pretty great and accurate

https://www.youtube.com/watch?v=Sq-N28fukMY

Railing Kill
Nov 14, 2008

You are the first crack in the sheer face of god. From you it will spread.

lol

The Terrain 15 thing is so dang cool.

Dabir
Nov 10, 2012

Oh, just remembered a bug in a completely different game I ran into recently.

A little bit of background. In Yugioh (stay with me here), there's this monster called The Agent of Creation - Venus. Its effect lets you pay 500 life points (you start with 8000, so that's not much) to summon a Mystical Shine Ball from your hand or deck. You'll have to take my word for it that that's something you'd want to do. Venus has no limit on your ability to use its effect, so you can activate it as many times as you like per turn, but you can only have three copies of each card in your deck, so you'll run out of balls after the first three activations.

Enter Yugioh World Championship 2006: The Ultimate Masters for GBA. The AI in this game is, shall we say, primitive. It's predictable and easy to manipulate. It makes fun mistakes, like if you have a 1200 ATK Beaver Warrior and a 3000 ATK Blue-Eyes White Dragon it'll happily summon a 1400 ATK Celtic Guardian to run over the beaver. But it really breaks down when it comes to using monster effects.

Now, I do sympathise with the AI programmers, because the way the AI handles Venus in particular should work. Follow the logic here.

  • If you have a card, it's because you want to use that card.
  • If you're using a card, you want to use it as much as possible.
  • The most value you can get from Venus is by putting all of your balls on the table.
  • Balls can be shuffled back into the deck by other card effects, so blindly using Venus three times isn't good enough. Any time your balls aren't visible, you should use Venus to get them out.
That all works, right? But there's just one snag.

The AI isn't allowed to know the contents of its own deck.

That's right, the AI has absolutely no idea what's in its deck. If it sees a search effect, it'll try to use it no matter what, and only after it's committed to it will it learn whether it has any targets.

So hang on, how does it know when to stop using Venus? Well that's easy enough, if you're putting Venus in your deck, you want to get the most value out of its effect, so you'll always pair it with a full set of balls. If it can't see three shiny balls in its field, graveyard and double-graveyard, it uses Venus's effect until they're all on full display.

Unfortunately, it is possible for an AI to end up with Venus on their field and no balls to summon with it. For example, there's a few cards that let you change which player controls a monster on the field. I discovered the bug I'm about to describe by accident when the AI took control of my Venus itself, but if you're trying to take advantage of it, your weapon of choice is Creature Swap. So, you've chosen an opponent with no balls, and you've given them Venus. What you'd expect to happen, if you didn't know about this bug, is that the AI would just attack you with Venus. What actually happens is this:

They pay 500 LP for Venus's effect.

Alright, big deal, they've paid 1/16 of their life total, looked through their hand and deck and realised they don't have any balls to summon, that's a bit silly but whatever.

Then they do it again.

Yeah, remember how the AI doesn't know what's in their deck? That's true even when they've just looked at it. And not just looked at it - in Yugioh, if you have to find a card in your deck, and it isn't there, your opponent gets to look at your deck to prove it isn't there. So you and the AI have both seen that it's ball-less, but it's got this Venus card and it doesn't see three balls, so by heck it's going to pay whatever it costs to do it again. And again. And again. And a- you get the idea. They can't literally pay themselves to death, but they can, and will, pay all but their last 500 this way, no matter how much they started with. By default, that's 7500 LP, or 15 times in a row you get to look through your opponent's hand and deck.

Tl:dr: If you give the AI in GBA Yu-Gi-Oh a pretty girl to hold, it'll throw its life away showing you its deck and no balls.

Dabir has a new favorite as of 13:13 on Jun 3, 2023

PurpleXVI
Oct 30, 2011

Spewing insults, pissing off all your neighbors, betraying your allies, backing out of treaties and accords, and generally screwing over the global environment?
ALL PART OF MY BRILLIANT STRATEGY!

I didn't think this would be interesting, but between Sea Roads and Atlantis, that was pretty comical.

Also amused to learn that the YGH AI can be defeated by having no balls.

dialhforhero
Apr 3, 2008
Am I 🧑‍🏫 out of touch🤔? No🧐, it's the children👶 who are wrong🤷🏼‍♂️

Stare-Out posted:

This just showed up in my recommendations and it's pretty great and accurate

https://www.youtube.com/watch?v=Sq-N28fukMY

Good poo poo.

Dewgy
Nov 10, 2005

~🚚special delivery~📦
PYF Game Glitch: So, you've chosen an opponent with no balls, and

Paper Tiger
Jun 17, 2007

🖨️🐯torn apart by idle hands

Dewgy posted:

PYF Game Glitch: So, you've chosen an opponent with no balls, and

Alternately,

PYF Game Glitch: you and the AI have both seen that it's ball-less, but

Zamujasa
Oct 27, 2010



Bread Liar

incredible. iirc YGO Forbidden Memories on the PSX also has a few fun instances of ignoring the rules (as much as they existed at the time), including the CPU just manifesting whatever card it feels like playing into its hand; things like decks or shuffling are mere trivialities

Dabir
Nov 10, 2012

Yep, Forbidden Memories is notorious for its already pretty scuffed rules just going out the window when the AI decides it's time to drop Meteor Black Dragon on you whether you like it or not.

World Championship 2004, also for GBA, has a real great AI bug. One of the most powerful cards in the history of the game, banned to this day, is Snatch Steal. Equip to an opponent's monster, and you take control of it as long as Snatch Steal sticks around. Your opponent gets an extra 1000 LP every turn in exchange, but if you're playing the card right, that's not going to make up for the on-field advantage you're gaining from it. It got unbanned a few years ago, then was swiftly rebanned because it swings games just that hard.

Almost every single AI deck in WC2004 has Snatch Steal. But that's actually a good thing for you, because, get this, the AI doesn't know how to use Snatch Steal. No, I don't mean they play it badly. I mean they do not have the ability to play this card. If they draw it, they will never, ever activate it. It's staying in their hand until the end of the game.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Dabir posted:

Yep, Forbidden Memories is notorious for its already pretty scuffed rules just going out the window when the AI decides it's time to drop Meteor Black Dragon on you whether you like it or not.

World Championship 2004, also for GBA, has a real great AI bug. One of the most powerful cards in the history of the game, banned to this day, is Snatch Steal. Equip to an opponent's monster, and you take control of it as long as Snatch Steal sticks around. Your opponent gets an extra 1000 LP every turn in exchange, but if you're playing the card right, that's not going to make up for the on-field advantage you're gaining from it. It got unbanned a few years ago, then was swiftly rebanned because it swings games just that hard.

Almost every single AI deck in WC2004 has Snatch Steal. But that's actually a good thing for you, because, get this, the AI doesn't know how to use Snatch Steal. No, I don't mean they play it badly. I mean they do not have the ability to play this card. If they draw it, they will never, ever activate it. It's staying in their hand until the end of the game.

This tangentially reminds me of the game Card City Nights 2, which is a fairly silly game about an in-universe CCG, i.e. all of the NPCs are mad about card games, you get into matches with them, win/buy new cards, customize your deck, etc. Once you've beaten the game, you unlock some special modes, one of which is Mirror. In this mode, you have to beat all of your opponents by using their own decks against them. This turns out to be really quite difficult early on, because so many of the early opponents have such utterly atrocious decks. They're stuffed with cards that do nothing but take up space, and have minimal damage potential, let alone combo potential. Oftentimes it comes down to very carefully timing things so that your opponent decks themselves (takes damage from being unable to draw cards) before you do. It's a weirdly compelling puzzle that I was not expecting when I played Mirror mode.

Late-game mirror matches are more interesting in a conventional sense, i.e. you have to figure out how your opponent's deck works, so that you can use it more effectively than they do.

Phlegmish
Jul 2, 2011



Snatch Steal is a great name

kirbysuperstar
Nov 11, 2012

Let the fools who stand before us be destroyed by the power you and I possess.

Zamujasa posted:

incredible. iirc YGO Forbidden Memories on the PSX also has a few fun instances of ignoring the rules (as much as they existed at the time), including the CPU just manifesting whatever card it feels like playing into its hand; things like decks or shuffling are mere trivialities

IIRC CPU decks in FM are constructed on the start of the match from a pool unique to that character with percentage chances for cards.

Also that game's final boss rush is six loving back to back fights and if you lose a single one you have to try from the first one again and the third of them almost always opens with Gate Guardian or Meteor Black Dragon and more often than not has Megamorph also

Just an absolutely hateful game even among the "making up the rules because the OCG wasn't a thing yet" games

Dabir
Nov 10, 2012

TooMuchAbstraction posted:

This tangentially reminds me of the game Card City Nights 2, which is a fairly silly game about an in-universe CCG, i.e. all of the NPCs are mad about card games, you get into matches with them, win/buy new cards, customize your deck, etc. Once you've beaten the game, you unlock some special modes, one of which is Mirror. In this mode, you have to beat all of your opponents by using their own decks against them. This turns out to be really quite difficult early on, because so many of the early opponents have such utterly atrocious decks. They're stuffed with cards that do nothing but take up space, and have minimal damage potential, let alone combo potential. Oftentimes it comes down to very carefully timing things so that your opponent decks themselves (takes damage from being unable to draw cards) before you do. It's a weirdly compelling puzzle that I was not expecting when I played Mirror mode.

Late-game mirror matches are more interesting in a conventional sense, i.e. you have to figure out how your opponent's deck works, so that you can use it more effectively than they do.

Sounds neat, and it looks like it's pretty cheap on Steam. Might have to give it a try.

Railing Kill
Nov 14, 2008

You are the first crack in the sheer face of god. From you it will spread.
All this talk of bad Yugioh AI reminds me a bit of the OG Culdcept. The 3DS port (Culdcept Revolt) is the best version of the game but lacks the... unique charm of the original. The original Dreamcast/PS2 version didn't have an AI issue, but a major translation issue. Culdcept is a marriage of CCG and Monopoly. So accurate, consistent, and intelligible translation is critical to the little nooks and crannies of interactions that come up in a CCG.

It did not do this.

A new player will start by noticing funny but benign quirks like the creature Ba'al named "Ba=Al." But then you start noticing mechanical glitches baked into the mechanics of cards that are the result of programmed mechanics not matching the wording. And then there's some cards that are utterly unintelligible as written, like Quetzalcoatl:

Quetzalcoatl posted:

Boost (creature with First Attack ability that will not be obtained after ST+10)

I'll give you a fighting chance to make sense of this:

Boost is a passive ability that buffs creatures of the matching type.

First Attack is like First Strike in MTG. It's a keyword some creatures have.

ST is short for Strength, the game's version of Power in MTG (i.e. a creature's damage).

Now: I dare you to tell me what this loving card does. (No cheating if you've played the game.)

Here's what it does: Quetzalcoatl gives +10 ST to your creatures who natively have First Strike, i.e. do not gain it in combat by an item or enchantment effect.

Somehow, I love Culdcept and it is one of my favorite games.

DontMockMySmock
Aug 9, 2008

I got this title for the dumbest fucking possible take on sea shanties. Specifically, I derailed the meme thread because sailors in the 18th century weren't woke enough for me, and you shouldn't sing sea shanties. In fact, don't have any fun ever.
Another crippling AI bug from I've experienced is from the old Microprose Magic: the Gathering game, although this one isn't the original dev's fault. The game was released in 1997, but in the decades since, a bunch of cards from more recent Magic sets have been modded into the game. Enter Oona's Prowler, a 3/1 flying creature for 1B that has an ability that lets any player discard a card to give it -2/-0 until end of turn, shrinking its attack power. This is usually not worth it for an opponent to do, because a card is usually worth more than 2 damage. I put it in my deck because I was trying to play reanimator, and it's a decent way to get big creatures into the discard to be reanimated. But it turns out that as soon as you play it, the AI will immediately decide that they need to shrink its power down to zero, even though it's not attacking yet. And, in fact, they'll keep on discarding cards, even after its power is already zero. So on turn 1 or 2, you can play Oona's Prowler, and instantly destroy your opponent's entire hand. If that sounds like it's so devastating that you basically have won the game already just by playing this single 2-mana creature, then you'd be correct.

I think this bug exists because the original game's card pool doesn't have any activated abilities with a discard in the cost, so the way the ability would have to be coded, or maybe just the way it's interpreted by the AI, is as an ability that costs nothing and causes the player who activated it to discard a card and the creature to shrink. So the AI sees: an ability I can do that costs nothing? Hell yeah, let's do that. Okay, that's done, now what? Oh look, an ability I can activate that costs nothing! And repeat.

Gynovore
Jun 17, 2009

Forget your RoboCoX or your StickyCoX or your EvilCoX, MY CoX has Blinking Bewbs!

WHY IS THIS GAME DEAD?!

DontMockMySmock posted:

So on turn 1 or 2, you can play Oona's Prowler, and instantly destroy your opponent's entire hand. If that sounds like it's so devastating that you basically have won the game already just by playing this single 2-mana creature, then you'd be correct.

This is one of the more egregious examples, but the AI for the Microprose game was doodoo from start to finish. It could play the "attack and block" game barely well, but then it would Terror it's own guys for no reason.

Arrath
Apr 14, 2011


DontMockMySmock posted:

Another crippling AI bug from I've experienced is from the old Microprose Magic: the Gathering game, although this one isn't the original dev's fault. The game was released in 1997, but in the decades since, a bunch of cards from more recent Magic sets have been modded into the game. Enter Oona's Prowler, a 3/1 flying creature for 1B that has an ability that lets any player discard a card to give it -2/-0 until end of turn, shrinking its attack power. This is usually not worth it for an opponent to do, because a card is usually worth more than 2 damage. I put it in my deck because I was trying to play reanimator, and it's a decent way to get big creatures into the discard to be reanimated. But it turns out that as soon as you play it, the AI will immediately decide that they need to shrink its power down to zero, even though it's not attacking yet. And, in fact, they'll keep on discarding cards, even after its power is already zero. So on turn 1 or 2, you can play Oona's Prowler, and instantly destroy your opponent's entire hand. If that sounds like it's so devastating that you basically have won the game already just by playing this single 2-mana creature, then you'd be correct.

I think this bug exists because the original game's card pool doesn't have any activated abilities with a discard in the cost, so the way the ability would have to be coded, or maybe just the way it's interpreted by the AI, is as an ability that costs nothing and causes the player who activated it to discard a card and the creature to shrink. So the AI sees: an ability I can do that costs nothing? Hell yeah, let's do that. Okay, that's done, now what? Oh look, an ability I can activate that costs nothing! And repeat.

Yo is this the game with a big overworld map you go traveling around and battling folks in? And it has an active modding scene??

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
At the other end of the scale is the AI for Final Fantasy Tactics. People have modded drastically different skills and spells into that game, and the AI is able to make intelligent use of pretty much all of them. It still can't plan worth beans, but when it comes to picking good moves on a turn-by-turn basis, it does quite well.

(I'm basing this mostly on this defunct/stalled LP of an FFT hack; I've never played the game myself)

RatHat
Dec 31, 2007

A tiny behatted rat👒🐀!

kirbysuperstar posted:

IIRC CPU decks in FM are constructed on the start of the match from a pool unique to that character with percentage chances for cards.

I don't think the cards are actually generated until they draw them. But yeah, each card in the AI's deck is just a % chance of a bunch of different cards. IIRC the last boss has like a 10% for each card to be one of the best cards in the game(and there's no limit to how many they can have) so theoretically if you were insanely unlucky they could have a deck full of Blues Eyes Ultimate Dragons. Unlike modern Yugioh, which is like a contest to make the best bullshit card combos you can, Forbidden memories is basically just a numbers game of whoever has the biggest monsters

Here's a video that goes over how speedrunning it(and how the game itself) works. As you'd expect you need a LOT of luck to get a good time

https://www.youtube.com/watch?v=-f5xLVvvbFU

It’s not really glitchy but the game is janky enough I think it still fits for this thread

RatHat has a new favorite as of 00:01 on Jun 5, 2023

Gynovore
Jun 17, 2009

Forget your RoboCoX or your StickyCoX or your EvilCoX, MY CoX has Blinking Bewbs!

WHY IS THIS GAME DEAD?!

Arrath posted:

Yo is this the game with a big overworld map you go traveling around and battling folks in? And it has an active modding scene??

Yes and yes, although "active" is a relative term considering the game is 25 years old.

DontMockMySmock
Aug 9, 2008

I got this title for the dumbest fucking possible take on sea shanties. Specifically, I derailed the meme thread because sailors in the 18th century weren't woke enough for me, and you shouldn't sing sea shanties. In fact, don't have any fun ever.

Gynovore posted:

This is one of the more egregious examples, but the AI for the Microprose game was doodoo from start to finish. It could play the "attack and block" game barely well, but then it would Terror it's own guys for no reason.

Terror on its own creatures only happens at the lower difficulty levels; at the highest one it's still very bad but (usually) not commit-suicide-bad.

Gynovore posted:

Yes and yes, although "active" is a relative term considering the game is 25 years old.

I discovered the expanded card pool via this goon let's play, which also has a randomizer for the enemies' decks, so click through that for some good info and resources.

John Lee
Mar 2, 2013

A time traveling adventure everyone can enjoy

Arrath posted:

Yo is this the game with a big overworld map you go traveling around and battling folks in? And it has an active modding scene??

If you liked Shandalar, there's a vaguely similar game called Erannorth Chronicles, though the actual experience of battling is very different from MtG. Here's a piece of an ongoing LP for it:
https://forums.somethingawful.com/showthread.php?threadid=4029409

Haystack
Jan 23, 2005





Gynovore posted:

This is one of the more egregious examples, but the AI for the Microprose game was doodoo from start to finish. It could play the "attack and block" game barely well, but then it would Terror it's own guys for no reason.

I dunno, I feel like getting any working M:tG AI in 1997 is fairly impressive

Arrath
Apr 14, 2011


Well I've got some games to look into, thanks everyone.

Dabir
Nov 10, 2012

RatHat posted:

I don't think the cards are actually generated until they draw them. But yeah, each card in the AI's deck is just a % chance of a bunch of different cards. IIRC the last boss has like a 10% for each card to be one of the best cards in the game(and there's no limit to how many they can have) so theoretically if you were insanely unlucky they could have a deck full of Blues Eyes Ultimate Dragons. Unlike modern Yugioh, which is like a contest to make the best bullshit card combos you can, Forbidden memories is basically just a numbers game of whoever has the biggest monsters

Here's a video that goes over how speedrunning it(and how the game itself) works. As you'd expect you need a LOT of luck to get a good time

https://www.youtube.com/watch?v=-f5xLVvvbFU

It’s not really glitchy but the game is janky enough I think it still fits for this thread

Lmao I forgot the hardest opponents get a 20 card hand that pretends to be 5 cards

The Cheshire Cat
Jun 10, 2008

Fun Shoe

TooMuchAbstraction posted:

At the other end of the scale is the AI for Final Fantasy Tactics. People have modded drastically different skills and spells into that game, and the AI is able to make intelligent use of pretty much all of them. It still can't plan worth beans, but when it comes to picking good moves on a turn-by-turn basis, it does quite well.

(I'm basing this mostly on this defunct/stalled LP of an FFT hack; I've never played the game myself)

Yeah the fact that the AI in FFT can take basically whatever romhackers will throw at it is pretty impressive. This is entirely speculation but my guess is that how it works is that they likely decided early on in development, before content was finalized, that it would be easier to not really bother having any sort of specific behaviour for classes or abilities because there was so much variation, so instead the way it works is probably that every unit just has a collection of actions it can use, and those actions are themselves just a bag of attributes it communicates to the AI (e.g. "will deal 100 damage" or "causes poison"). It then has some kind of evaluation engine when looking at those attributes and picks what it thinks is the optimal action for this turn based on that. What this means is that people can hack the game and completely shuffle the abilities around or create entirely new ones, and since they're still all drawing from the same pool of core attributes, the AI already knows how to evaluate them.

There are some combos it won't understand, like in the LP you linked there are abilities that can only be used when afflicted with certain status effects, so it won't be able to situationally adjust its evaluation of those status effects to account for the fact that they open up more options in addition to their normal effects (i.e. it won't deliberately poison itself to allow it to use a "only available if poisoned" ability on a future turn). If it's already afflicted by one, though, it will be able to see the ability that it's now allowed to use and evaluate it as an option just like it would any other. It already has the ability to understand those sort of "situationally active attributes" because things in the base game require it to - like recognizing that a character afflicted with zombie gets reversed effects from healing spells and thus it shouldn't cast them on undead allies (and should cast them on undead enemies).

That said, there are some pretty funny AI quirks in the game still - it never considers not moving/acting as an option. It will always move and act in a turn if it has valid options for both available, even if those options are strictly worse than just sitting still (aside from positioning being important, passing a turn without consuming your move/action/both lets you retain some CT which means your next turn will come up faster than if you had used them). My guess is this was done because choosing not to act is more of a long term thing and is much harder to evaluate since its value is situational. This was on the PS1 so doing any kind of chess engine type deep tree search where it looks multiple turns into the future was just not going to be viable, especially considering how many permutations of actions/movement there are just for a single character.

The Cheshire Cat has a new favorite as of 23:20 on Jun 6, 2023

Adbot
ADBOT LOVES YOU

ToxicFrog
Apr 26, 2008


Arrath posted:

Yo is this the game with a big overworld map you go traveling around and battling folks in? And it has an active modding scene??

Yes and yes! Sadly the only modder who was adding new cards to singleplayer, Korath, quit4ever after some sort of conflict on the slightmagic forums years ago and scrubbed all of their releases from the net. If you can still find them anywhere, I believe "GG1" (gemcutter's guild release candidate 1) is the last version released. The original version of the game with patches to run better on modern windows/widescreen displays/etc is still available, though, I believe under the name "shandalar 2012".

Manalink, the multiplayer mode, has a very active modding scene which has added loads of stuff, but is multiplayer-only.

TooMuchAbstraction posted:

At the other end of the scale is the AI for Final Fantasy Tactics. People have modded drastically different skills and spells into that game, and the AI is able to make intelligent use of pretty much all of them. It still can't plan worth beans, but when it comes to picking good moves on a turn-by-turn basis, it does quite well.

(I'm basing this mostly on this defunct/stalled LP of an FFT hack; I've never played the game myself)

If you watch something like FFT Battleground you can see lots of examples of the AI being extremely stupid, too -- a powerful team throwing away a near certain win by making very bad choices happens often enough it's achieved meme status. Common highlights include:
- carefully aiming buffs to hit as few members of your party as possible
- spamming low hit rate debuffs rather than basic attacks that have a 90% chance to kill the target
- casting spells on enemies that will take just long enough to go off that the enemy has time to run up and hug the caster, catching them both in the blast
- using abilities that scale inversely with hp% while at full health
- reacting to low health by hunkering down and casting self-buffs, even if the buffs do nothing useful and the enemy attacking you is one hit away from death itself

I suspect that some of this comes from the fact that the FFT AI is meant to be fun to play against, which is not always the same thing as being optimally competent -- e.g. the player feels clever if they can race one of their units into the middle of an enemy formation and take out a bunch of enemies with one of their own spells, which would not be possible if the AI always used safe timing/targeting.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply