# How to intentionally make an RPG maker game crash?

I'm currently working on a game project that involves tricking the user into thinking the game experienced a bug/glitch and crashed. The reason that I want to code this is that I want to hide the file size of the main game, thus separating it into two files. So I want the first file which has x amount of game to crash at a certain point. Then manually give the second half of the game to the user and they can continue on. It may seem a little pointless, but I think stylistically this is a neat concept to try.

• This is a fantastically un-friendly thing to do, and is not even remotely required to accomplish your (unusual) goal of "hiding the file size" by shipping the game in two executables. – user1430 Mar 15 '16 at 16:13
• very poor practice imo, the community should not answer this and encourage such behaviour, however that said, perhaps you could "simulate a crash" then continue to run the game, as a gamer myself I would not buy a game that deliberately crashed (personal opinion of course) – War Mar 15 '16 at 17:31
• There are roughly a billion and one ways to make a program crash (trust me, I've accidentally seen most of them), so do whatever you feel like doing to mess it up. Divide by zero, access a negative index in an array, open a file that doesn't exist, or go wild, allocate huge arrays until you run out of memory. If you want to be irresponsible, get creative. If you want to behave like a normal person, ask yourself why you would want to hide half of your game. It's not like file size says anything about play time. – Peethor Mar 15 '16 at 18:02
• assert a false condition – user3730788 Mar 15 '16 at 18:35
• Can we not be critical of this question simply because we don't agree with the game design? Our job is to answer his question if we can, not tell him we disagree with his design. – Tim Holt Mar 9 '19 at 5:43

Intentionally causing a crash is a somewhat irresponsible way to develop software. Instead of actually making the game crash, simulate a crash. Use messed up graphics, fake BSOD, etc. Then simply close the application.

This approach allows you to have far more control over the style of the crash. Further, it doesn't introduce potential consequences of forcing an application crash on the end user's computer.

I would suggest you try this simple thing:

Divide by zero.

• The one thing that will save us from the AI revolution. – jgallant Mar 15 '16 at 16:28

It is indeed a irresponsible practice in game development. It's been done before- the fake crashes that is. And splitting the executable into 2 pieces then calling on another to open is just time wasted. You can make a intentional error, cause it to crash and proceed from there. But a better way is to just past a BSOD gif or animation over their screen. Have it throw it's self into full screen right before it happens and then just toss the photo on.

• Just out of curiosity, do you remember examples of when it was tried before? – MAnd Mar 16 '16 at 8:31
• @MAnd: Eternal Darkness: Sanity's Requiem sometimes displayed a fake BSOD as one of the effects of sanity loss - which fooled nobody as it wasn't even on a Windows PC. Also, a 1980s text adventure based on the TV series "The Prisoner" had a real crash at one point. The intent was that the player had to make a change to the code and GOTO a specific line to continue - the game was in interpreted BASIC running on one of the 1980s home computers that used the BASIC immediate mode as a shell. – TheBeardyMan Mar 12 '19 at 10:20

If you do want to make RPG Maker crash, it is not simple, as RPG Maker cannot usually crash through any kind of script call, or such. You can make a fake Error, and close the game, however, making the game crash, is basically impossible, unless it somehow occurs naturally.

The reason why, is when RPG Maker experiences a coding error, or bug, unlike most engines, will always throw a Code Error, then close itself, without any problems, besides that.

• "throw a Code Error, then close itself, without any problems" if that is not the description of a crash, then what do you consider a crash? – Vaillancourt Mar 9 '19 at 1:22

You can use a script call in an event:

window.close()

• Won't this make the game close and not crash though? – Vaillancourt Sep 28 '19 at 22:46