Post subject: Nintendo Nightmare
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
Link to video This game is amazing. NO srsly its so fucking amazing I have to make a thread about it. A TAS of this game would definitely be funny as shit, and it runs on Hourglass, but it does very weird things to the game. You can only shoot with the mouse, but everything else except from the main menu uses the keyboard. You can actually start the game without the mouse, but I'll explain that later.
Here, my YouTube channel: http://www.youtube.com/user/dekutony
QuizmasterBos
He/Him
Joined: 6/23/2013
Posts: 136
Considering the horrible audio this "game" has, I strongly suggest that this game should not be TASed in favor of many other more suitable games. I highly doubt a TAS would look good anyway. Plus it wouldn't be very enjoyable to watch, that's why Vinny made a highlight video in the first place so you wouldn't have to sit through 4 hours of this abomination.
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
http://www.twitch.tv/powerfulkyurem/c/4085480 http://www.twitch.tv/powerfulkyurem/b/583380940 Here are some speedruns of this game. I just have to find a way to shoot projectiles and solve some issues with the camera and I'm gonna get started. EDIT: The vids are down... at least there's a new one.
Here, my YouTube channel: http://www.youtube.com/user/dekutony
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
This is what happened when running this game on Hourglass: Link to video The camera rotates insanely and sometimes when I hit space, it skips things ... pls help. if I can somehow lock the camera, I will TAS this game no matter what. http://tasvideos.org/userfiles/info/18673228058121930 (.wch file for random things) P.S.: Spacebar bug fixed, can someone please make a mouse disabler for this game???????
Here, my YouTube channel: http://www.youtube.com/user/dekutony
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
A mouse disabler? Hourglass doesn't pass on anything "mouse" to any game that it runs, unless you use Resurrection, which is not intended for use yet.
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
I mean to lock the camera or even the mouse in the game. Mod the actual game or something like that to disable it.
Here, my YouTube channel: http://www.youtube.com/user/dekutony
Skilled player (1742)
Joined: 9/17/2009
Posts: 4986
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Uh....is this even a serious game? Looks like one of those games made in a day as a joke rather than a game to play. :|
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
So apparently the guy that ran this game just vanished from YouTube and Twitch, so I don't have a guide anymore.
jlun2 wrote:
Uh....is this even a serious game? Looks like one of those games made in a day as a joke rather than a game to play. :|
The game was released in 2009, the dude that made this game back then took this game seriously since it is a 3D Game Maker game (which is impressive considering the program's limitations back then), but years later, the developer is very aware that the game sucks. The Vinesauce highlight video is hilarious though.
Here, my YouTube channel: http://www.youtube.com/user/dekutony
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
Joined: 9/12/2014
Posts: 541
Location: Waterford, MI
Here is an outdated(or glitchless for that matter) run https://www.twitch.tv/pwulla/v/46392752 he just wasn't aware of "glitches" in the game back then thats all. Which I personally don't like.
Joined: 9/12/2014
Posts: 541
Location: Waterford, MI
*bump* With libtas, you should be able to tas this. You can decompile the exe file and port it to game maker studio and compile to Linux. I don’t have any of these tools(or even the game) so does anyone still have it?
Joined: 9/12/2014
Posts: 541
Location: Waterford, MI
*bump again* the game and source code can be found herehttps://adriendittrick.itch.io/9-10-do-nightmare Unless game maker studio trial doesnt import gmk files, Ill test it when I get around to it with libtas.
Joined: 9/12/2014
Posts: 541
Location: Waterford, MI
*Another bump* Apparently someone is fixing this game uphttps://fazana.itch.io/910-nightmare-dx With libtas supporting wine now, Ill see what I can do this weekend.
Joined: 1/26/2021
Posts: 10
I made an AI to tas Nintendo Nighmare in 17 minutes and 37 seconds although AI is probably giving too much credit to this code. Take for example a generic room. Suppose it has some obstacles to walk around in order to reach a door. My current way that I would tackle this is to write some sequence of conditionals that partition the room into manageable regions. Then in each region I say to walk towards some position. That is the extent of this logic. It is *automated* (and therefore a bot), but it is not really doing any actual *thinking*. Therefore I do not consider it a bot. In this run I would say there are seven major areas that we go through. This is just a broad categorization I have mentally, and others might disagree with me. These seven segments are as follows: 1. Intro level as Mario 2. Death Egg as Mario 3. Intro level as Link 4. Death Egg as Link 5. Gyorg Tower 6. Volcano Temple 7. Sand Temple Technically within the code there are six segments as the intro level is the same code for Link and Mario. Mechanically they are the same, aside from Link having the ability to acquire items. The primary goal of the speedrun is to defeat the final boss which is located in the Sand Temple. In order to defeat the boss, two items are required. These items are the hookshot and the hammer. The hookshot is located within the Gyorg tower which we immediately exit upon obtaining. The hammer is located in the volcano temple, and we also leave that dungeon immediately upon getting the hammer. The Death Egg dungeon is entered in order to obtain the Jet Shield, which is an upgrade that allows the player to hover infinitely over any distance. While this item is theoretically skippable, the hover ability allows the bot to essentially skip the majority of obstacles. The primary technique used in this run is the CAD (control-alt-delete) exploit. To elaborate, on Windows pressing the CAD keyboard combination brings up a secondary desktop security window. Through errors in the underlying game engine that are not fully understood, large swaths of game code are not executed while in this menu and similar UAC menus. As it matters for this speedrun, this causes collision and walking movement disabled while leaving gravity enabled. This allows the player to fall under the floor at any time, and because jumping midair is a normal feature, this is utilized to jump under walls. Once Jet Shield is obtained, the need to jump back in bounds is eliminated as all doors have infinite height in both directions. Because the issue of opening and closing windows security menus via automation is neither deterministic timing-wise nor possible without some form of *Windows* exploit (aka a Windows security flaw), CAD is simulated via a call to event_perform() to generate calls to the begin step event (which according to people far smarter than me is the only event executing every frame CAD is active). Another large skip is backup/star farming during the first Death Egg segment. That particular collectible is not quite functional and can be collected any number of times. Doing this allows one to skip the first three worlds and go straight to the Death Egg level. This probably didn’t need much clarification but I hope it helps. I am hoping by starting this conversation some further skips might be discovered or perhaps better optimized routing might be created. I am currently shooting for sub 15, but sub 10 or even sub 5 would be amazing. The video: https://m.youtube.com/watch?v=4-_6hI8RjHw&t=7s Note that I did not film the video or publish, so while nothing has been mentioned to me there is always the possibility that the recorder didn’t keep their hands off (apparently they were frustrated by the bot’s inefficiency). This happened last time and created a minor discrepancy between my time and their time. No such discrepancies exist (that I know of), but if any are determined I will be sure to make note of it here. Here is the code: https://pastebin.com/rdRk46X6 I put it in a function-like format for readability. The bot is hardcoded within the game’s source code which is then compiled with Game Maker 8.0.
Joined: 1/26/2021
Posts: 10
I know this isn’t how we traditionally do tases and it is my hope to one day convert to a piano roll style tas.
Sand
He/Him
Player (143)
Joined: 6/26/2018
Posts: 175
This is quite an interesting approach. If I understand you correctly, the source code of the game is available (nintendo-nightmare.gmk at the home page), and rather than provide inputs externally, you edit the source code to act as if the player had taken certain actions at certain times. I don't think there's anything wrong with calling it a bot. Did you use the same approach in your 24:04 run?
The primary technique used in this run is the CAD (control-alt-delete) exploit. To elaborate, on Windows pressing the CAD keyboard combination brings up a secondary desktop security window. Through errors in the underlying game engine that are not fully understood, large swaths of game code are not executed while in this menu and similar UAC menus.
That's a strange glitch. Do you know if it affects other GameMaker games, or is it specific to this one? I'm curious about the calls to random_set_seed. Does the game's RNG desync otherwise?
scr_tas_room1()
{
    internal_room = room1;
    random_set_seed(589190);
}
Joined: 1/26/2021
Posts: 10
Sand wrote:
This is quite an interesting approach. If I understand you correctly, the source code of the game is available (nintendo-nightmare.gmk at the home page), and rather than provide inputs externally, you edit the source code to act as if the player had taken certain actions at certain times. I don't think there's anything wrong with calling it a bot. Did you use the same approach in your 24:04 run?
The primary technique used in this run is the CAD (control-alt-delete) exploit. To elaborate, on Windows pressing the CAD keyboard combination brings up a secondary desktop security window. Through errors in the underlying game engine that are not fully understood, large swaths of game code are not executed while in this menu and similar UAC menus.
That's a strange glitch. Do you know if it affects other GameMaker games, or is it specific to this one? I'm curious about the calls to random_set_seed. Does the game's RNG desync otherwise?
scr_tas_room1()
{
    internal_room = room1;
    random_set_seed(589190);
}
Yes you understand correctly. The code looks at various data in the game world and actually presses the keyboard or moves the mouse to do some action, although with mouse I did actually alter the code for positioning slightly to utilize a generic variable in order to allow me to make mouse resolution independent. Mouse movement controls the camera, so a different resolution used to throw off the scripts. The same approach was used for 24 minute run, but it was less optimized and there was no CAD. Also the dev got annoyed and held space himself during a cutscene which then confused me since I had actually predicted a longer time than the one he got (which is of course impossible barring a math error or in this case human error). The only other difference is that for the boo fight I just got fed up and recorded inputs myself of me fighting the boo... which is why that whole segment looks bizarre and not bot-like. Also I never actually got the saving and loading of inputs working properly so it basically just works purely because I then went in and edited the file until it worked. It was a fun day. The CAD glitch does affect all game maker games compiled with version 8.0. I do not know if it affects older versions. Version 8.1 also suffers from the glitch but is never able to recover from CAD, so you might as well kill the executable at that point. Game Maker Studio supposedly patched the bug out altogether which makes me all the more curious why it occurs. Surely someone knew at one point (at least I hope it wasn’t fixed by accident), but by now that knowledge is probably forgotten. Regarding the set_seed, the initial one is needed for bizarre reasons. Apparently game maker just has a random seed. Dunno why. Didn’t care. The rest slowly crept in as I eventually needed to be able to conveniently edit and test a part of the bot without waiting for the entire tas to run through. In case you were not aware, while game maker has savestates, they do not appear to preserve rng, and they also outright break if you change game code and then use an old save state (for obvious reasons). That is also something I hope to slowly phase out. It used to be much worse. Cutting boo fight definitely cleaned out a large chunk of just bad and painful code. The main ones I can think correspond to Mario reaching the death egg and link right before the final boss. For the former there was much iteration because of the sheer insanity of that room. Just finishing that room let along optimizing was a pain in the butt. Final boss was worse, and I swear that code has dragons in it. So basically Charizard is a boss where you just hit with hammer till it dies. Ok cool fine. The problem arose when the previous phase (Ivysaur) required you to slash your sword. So there is a glitch. If your sword is slashing it does an animation. The variables deciding sword animation state are also used for hammer animation state. So, if your sword is playing an animation not in common with hammer and you pull out your hammer, the hammer code won’t ever end the animation because it just doesn’t know how. This means the hammer freezes (with a 1/3 chance) unless you always wait for the animation to finish before switching. This took 3 days to correct for the latest run and almost made me late on Adrien’s requested deadline (he had other stuff going on and needed to it at a certain time). For the 24 run it was less bad... in that I got annoyed by hammer freezing for ivysaur and just slapped rng seeds at it till it stopped breaking and moved on. The 24 minute run was less about optimization or “submittability” and more about “does this thing work”. Unlike an infamous suspected rng manipulator I won’t mention by name, I have no qualms mentioning this and admitting it. I would also never try to pass this off as an actual true TAS Videos or leaderboard worthy tas with those calls in there. However, there doesn’t appear to be any community specific issue with rng manipulation. In fact, the other non-tas speed runner for Nintendo Nightmare is aware and suggested I “alter rng every frame to cheese death egg”. I’m not that desperate...
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
Hey, excuse me, but um... A thread for this game already exists. http://tasvideos.org/forum/viewtopic.php?t=16013
Here, my YouTube channel: http://www.youtube.com/user/dekutony
Joined: 1/26/2021
Posts: 10
dekutony wrote:
Hey, excuse me, but um... A thread for this game already exists. http://tasvideos.org/forum/viewtopic.php?t=16013
Wait what...? Did I make a thread back in the good old days and forget about it or something? (Checks thread) Ah right. Vinesauce. I forgot about those streams. Should we merge the threads somehow?
Sand
He/Him
Player (143)
Joined: 6/26/2018
Posts: 175
Typhon wrote:
Should we merge the threads somehow?
I'm not sure how to request a thread merge—I see that XTREMAL93 has requested some merges in the "Feature Requests" thread in Post #499548, but I clicked on a few and they haven't been merged.
Joined: 1/26/2021
Posts: 10
Sand wrote:
Typhon wrote:
Should we merge the threads somehow?
I'm not sure how to request a thread merge—I see that XTREMAL93 has requested some merges in the "Feature Requests" thread in Post #499548, but I clicked on a few and they haven't been merged.
A moderator has already been contacted. Not sure if there is a delay. It’s been a couple of days...
Joined: 1/26/2021
Posts: 10
Update on some new information: So there is a cutscene during the Mario segment where Mario is talking to Darth Vador. This cutscene and the portion where you grab the following backup are in the same loading zone. The place where you get sent when collecting a backup is the same place you get sent to when dying. So it is theoretically possible to die and skip the cutscene. However I have to look deeper as I am not sure whether or not the player actually exists until after the cutscene. Either way, we have a way to die almost instantly, so that’s going to be far superior than just walking to the backup. Unclear on the time save. Hopefully it is a lot. Edit: I cannot seem to die normally when executing CAD in that room, so I am not going to allow it even if the simulated CAD somehow works. It’s very likely that if it does work, it is a bug in the TAS library and not an actual strat. TAS doesn’t seem to work either so I am out of luck. Basically the room is constantly healing you so you can’t die in that room.
Joined: 1/26/2021
Posts: 10
So over the past month to month and a half-ish I have been steadily acquiring new pieces of information bit by bit that in isolation don’t change much regarding my previous route. First off we need to talk about how save states (aka built in save functionality) work in game maker in relation to the game loop. When a save state is made all values, variables, etc. are saved. What isn’t saved is the position within the game loop. Loading starts a new frame after loading, period. This isn’t particularly noteworthy but it is useful to understand this. Now we need to discuss the pause menu. It is activated via pressing escape and it works by using save states to save game state and then load that state to leave the game menu. It is worth noting that the exception triggered by control alt delete (considered questionable and non-kosher imo) was within the mouse handling which immediately follows keyboard handling. So therefore opening the pause menu every frame is equivalent to the control alt delete exploit (aside from frame rate cap disable which isn’t really useful anyway from a tas standpoint). Now to explain what Link does when falling out of bounds. He warps to his spawn position and a height held within a global variable. This global is calculated in the draw event and occurs two draw executions after creation of Link. Now enter pause buffering. This prevents the draw event from executing and also allows the player to easily fall out of bounds. This causes link to warp to his spawn height... which would be whatever the previous room set. This is pause height storage and it can be used to transfer the spawn height between rooms. You can also jump as link to add height before letting the new value lock in. So this allows for arbitrary height adding. With this ability, the jet shield can be cut (theoretically). By chaining height in volcano temple to get high enough you can then lure a teddy with a flamethrower to kill link nearby the sand temple entrance. Then you use the stored height to enter sand temple. You can also chain height to jump on the walls in the rock smasher room of sand temple to walk across easily. Finally with enough height you can fall to the dynamite and shroob head in the final chuck Norris “fight” to beat the game. All other locations don’t need jet shield, as my previous tas either didn’t use it or just used it for slightly easier movement. Now we just need to figure out a way to either cut out the backup farming, the hookshot, or the hammer. I haven’t yet done all the math or made a tas but I predict a sizable cut to the length of the tas, especially since the last non-control alt delete tas was 24 minutes, and this is a non-cad tas.
Joined: 1/26/2021
Posts: 10
dekutony wrote:
This is what happened when running this game on Hourglass: Link to video The camera rotates insanely and sometimes when I hit space, it skips things ... pls help. if I can somehow lock the camera, I will TAS this game no matter what. http://tasvideos.org/userfiles/info/18673228058121930 (.wch file for random things) P.S.: Spacebar bug fixed, can someone please make a mouse disabler for this game???????
I think what you are seeing is the mouse not being moved to the center of the screen. If you somehow lock your mouse to the center of your display that should fix the problem. You might also be able to use a modded version with mouse disabled. If you still need such a copy let me know. I can try making one. Granted, you won’t be able to do well without mouse movement.
Joined: 1/26/2021
Posts: 10
So I was messing around in the volcano temple and ended up finding yet another major glitch. First off as I said in my previous post when link falls out of bounds, he gets warped to his last death position. However this acts weird if died while clipped inside a wall. If this happens, link instead gets pushed out of the wall when out of bounds warping. This sends him back to his current position while raising his height to the warp height. This can be utilized in the chuck norris boss room to skip accumulating over 700 units of height. The steps are as follows: 1. Jump over to the central chuck Norris platform. 2. One pixel below chuck Norris, fall through the floor. 3. Walk up to die to chuck Norris. 4. Do a spawn height manip to ensure you spawn inside the wall under the floor. You should now be able to fall/walk to the dynamite platform and the shroob head platform. I was able to do the platform itself in RTA though depending on height stuff you may have to some extra steps involving jumping back to the main platform and dying again inside one of the fairy pillars by falling repeatedly. My tas is currently redoing Gyorg tower which is a bit painful without jet shield so some of the application is still theoretical and might change a bit when I get there and try it out for real.