Jump to content
  • 0

Anyone know how to intentionally crash a game?


Skemech

Question

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

  • 9

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 ;).

Share this post


Link to post
  • 3

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.

Share this post


Link to post
  • 1

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 by Shepardus

Share this post


Link to post
  • 1
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.

Share this post


Link to post
  • 1

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. 

Share this post


Link to post
  • 0
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 by Makros_the_Black

Share this post


Link to post
  • 0
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

Share this post


Link to post
  • 0

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 by D4NUK1

Share this post


Link to post
  • 0

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
}

Share this post


Link to post
  • 0

// 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 by LoatharMDPhD

Share this post


Link to post
  • 0
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. 

Share this post


Link to post
  • 0
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...

Share this post


Link to post
  • 0
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.

Share this post


Link to post
  • 0

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.

Share this post


Link to post
  • 0

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.

Share this post


Link to post
  • 0

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!  :(

Share this post


Link to post
  • 0

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 by LoatharMDPhD

Share this post


Link to post
  • 0
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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...