Skemech Posted February 26, 2024 The title kinda says it all. I'm working on a MyHouse style wad and i want to intentionally crash the game if the player does something I don't want them to do as a punishment 1 Quote Share this post Link to post
9 Xaser Posted February 26, 2024 This sort of thing is very obnoxious -- you're best off not doing it. Myhouse didn't do anything of the sort, either -- you can lock yourself out of certain areas and endings depending on your choices in the map, but it didn't softlock you or kill you for doing so. Heck, you can technically always restart the map without even going to the menu, since the exit loops back on itself (or underhalls/sllahrednu ;). 6 Quote Share this post Link to post
3 JadingTsunami Posted February 26, 2024 No. It is not possible (for good reason) to exit the game from a script. Options of what you could do: - Warp the player to a "punishment box" with no way to continue - Jump to an "end game" screen with a discouraging message - Spawn unkillable enemies to swarm the player And so on. 2 Quote Share this post Link to post
1 Shepardus Posted February 26, 2024 (edited) If there is a way to crash the game, it would be considered an engine bug and would be patched out. Graceful failure handling is just good engineering. I'm sure there are ways to crash the game, but you cannot and should not count on them continuing to work (unless you're targeting vanilla of course, since that's not changing). Edited February 26, 2024 by Shepardus 1 Quote Share this post Link to post
1 Stabbey Posted February 26, 2024 9 minutes ago, Skemech said: Without spoiling the ending of this wad, trust bro, the game crashing because you the player fucked up, makes sense in the story line Even if it "makes sense," do not do it regardless. It will seem like you made the map incompetently. The player will find it jarring and obnoxious, which will give them a negative impression of your WAD. Find another way. 3 Quote Share this post Link to post
1 inkoalawetrust Posted February 28, 2024 Most of the ways to actually crash the game are very esoteric, in GZDoom at least, the game isn't meant to actually hard crash at all, so most crashes are the result of something in the actual engine breaking instead of the result of a mod, so the two easiest ways to "Crash" the game are to spawn an actor that goes to a state with a duration of 0 tics, like this. Class Freeze : Actor { States { Spawn: TNT1 A 0; Loop; } } This creates an infinite recursion, and should work on any ZDoom-based engine. That being said, it might caused unwanted behavior like lag potentially, though from my experience infinite recursions just clog up and stop the game, and don't cause anything else to lag. Either way, this won't actually crash, it'll just close eventually, either on its' own or by the user closing it themselves. An alternate GZDoom only method would be to just call ThrowAbortException(), this is also even more guaranteed to do what you want, it'll just cause a VM abort, which is not a crash, it just stops the level. Normally this is used to add custom VM aborts with custom messages and logs for mods, but you can also use it for this purpose. 0 Quote Share this post Link to post
0 Skemech Posted February 26, 2024 But there's not a way to spawn a metric fuck ton of enemies that would lag your pc, and/or crash the game? 1 Quote Share this post Link to post
0 Makros_the_Black Posted February 26, 2024 (edited) 9 minutes ago, Skemech said: But there's not a way to spawn a metric fuck ton of enemies that would lag your pc, and/or crash the game? Teleport them into an inescapable room with like... a million monster spawners and spawner locations maybe? (Essentially face them off against a million Icon of Sins....) :/ Would hate to be the guy placing all those..... :O Edited February 26, 2024 by Makros_the_Black 0 Quote Share this post Link to post
0 Skemech Posted February 26, 2024 1 hour ago, Xaser said: This sort of thing is very obnoxious -- you're best off not doing it. Without spoiling the ending of this wad, trust bro, the game crashing because you the player fucked up, makes sense in the story line 0 Quote Share this post Link to post
0 D4NUK1 Posted February 26, 2024 (edited) Spain Doom crash the game if you're playing vainilla doom.exe If you're using modern sourceport, you can make a fake room that's make a fake crash or glitched state with a hurt floor killing you slowly Edited February 26, 2024 by D4NUK1 0 Quote Share this post Link to post
0 LoatharMDPhD Posted February 26, 2024 map OAR10 // "Sanctum Santorum: OAR" { //levelnum = 49 levelname = "...Like... The Butt of a Joke" music = "D_DM2TTL" partime = 259 skytexture = "sky3" //nextsecret = "MAP34" intermusic = "D_DM2TTL" //intertextsecret = "Fuck Your Framerate..." endcast = true // this will intentionally crash the game //next = "OAR99" // single room full of revs with death exit then endcast = true } 0 Quote Share this post Link to post
0 LoatharMDPhD Posted February 27, 2024 (edited) // boss brain and a boss shooter but no spawn targets should crash her... try that... or 34 spawn targets should do it too... Thanks Decino! Edited February 27, 2024 by LoatharMDPhD 1 Quote Share this post Link to post
0 Wilster_Wonkels Posted February 27, 2024 If by "game" you mean Stock Market then no... 3 Quote Share this post Link to post
0 Pure Hellspawn Posted February 27, 2024 51 minutes ago, LoatharMDPhD said: // boss brain and a boss shooter but no spawn targets should crash her... try that... or 34 spawn targets should do it too... Thanks Decino! bosseye with no bosstargets make the activation sound but do nothing afterward. 1 Quote Share this post Link to post
0 LoatharMDPhD Posted February 27, 2024 2 minutes ago, Pure Hellspawn said: bosseye with no bosstargets make the activation sound but do nothing afterward. then your sourceport must've fixed the feature... try 34 spawn targets then... 0 Quote Share this post Link to post
0 Pure Hellspawn Posted February 27, 2024 1 minute ago, LoatharMDPhD said: then your sourceport must've fixed the feature... try 34 spawn targets then... Speed of Doom Map30. 2 Quote Share this post Link to post
0 JadingTsunami Posted February 27, 2024 1 hour ago, Skemech said: Without spoiling the ending of this wad, trust bro, the game crashing because you the player fucked up, makes sense in the story line It's common to believe the player is going to be as invested in your storyline as you are. They never are. Crashing/hanging your computer is not fun. No one finds this fun. It does not matter if it makes sense to you in the storyline because you're not the target audience. Your player is. That said I realized a way you could do it. But I don't want to help with this, sorry. 8 Quote Share this post Link to post
0 Dark Pulse Posted February 27, 2024 I do remember a certain WAD that made the ZScript VM intentionally crash, but I'd agree with Xaser and say that doing it is not a great idea. Some people might take that as a bug, others might see it as a good reason to not play your WAD again if they never saved or something. Especially if it's without warning. 2 Quote Share this post Link to post
0 kevansevans Posted February 27, 2024 I can echo the sentiment of avoiding purposefully crashing the engine. I maintain a mod where the goal is to be intentionally irritating to the player, but one thing I will never do is an on purpose crash, even if I could do in a few lines of code. The closest I get to it is purposefully lagging the engine so hard it looks like a real crash, but resumes normal game play after 5 seconds. It's just one of the many unspoken rules of what is and isn't okay to do to the player, and making them think something seriously broke in your mod is a one way ticket to get them to never touch it again. There is of course the rare exception that is The Sky May Be, but it must be emphasized that's an exception. 2 Quote Share this post Link to post
0 LoatharMDPhD Posted February 27, 2024 // warp to a level that does not exist... 1 Quote Share this post Link to post
0 Makros_the_Black Posted February 27, 2024 Are you really set on this? I mean, I did make a suggestion, but it was pretty off the cuff, I too, am in the boat of voices echoing the same message... it's not a really great idea to chase my man... as others have said, you can create rooms that give the illusion without actually doing so... generally that kind of effect is better served when it seems to be the case, then as mentioned by kevan, everything goes back to normal... think the recent Batman series of games... If your hearts set in stone, then it's set... but... errrrr.... :/ You have a very intruiging concept from the little snippet you gave away with how important it is to the story of the wad... find a better execution my man! :( 1 Quote Share this post Link to post
0 Kserks96 Posted February 27, 2024 You can try by spawning 1000000 revenants. 0 Quote Share this post Link to post
0 LoatharMDPhD Posted February 28, 2024 (edited) well think about it... Bethesda intentionally releases games that cost $70 bucks and they can't get past the title screen without crashing and wiping your sysini file... so why not add that AAA studio charm to our Free Range projects?!? I don't know about the lot of you, but I'm completely onboard with the concept of, "it's not a bug, it's a feature"! Edited February 28, 2024 by LoatharMDPhD 1 Quote Share this post Link to post
0 Makros_the_Black Posted February 28, 2024 1 hour ago, LoatharMDPhD said: well think about it... Bethesda intentionally releases games that cost $70 bucks and they can't get past the title screen without crashing and wiping your sysini file... so why not add that AAA studio charm to our Free Range projects?!? I don't know about the lot of you, but I'm completely onboard with the concept of, "it's not a bug, it's a feature"! HAHAHAHAHAHAHAHA! Yeah, but let's be honest here... who really thinks Bethesda are even capable of an effective bug test, let alone know what one is? hahahahaha! :D 1 Quote Share this post Link to post
0 Scuba Steve Posted March 1, 2024 Doesn't "The Thing You Can't Defeat" do something similar? It's pretty simplistic; warp to a level without any player starts. 3 Quote Share this post Link to post
Question
Skemech
The title kinda says it all. I'm working on a MyHouse style wad and i want to intentionally crash the game if the player does something I don't want them to do as a punishment
Share this post
Link to post
24 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.