Grey Screen Bug With Cave Story (Solved!)

Aug 27, 2018 at 7:11 AM
Indie game enthusiast
"What is a man!? A miserable pile of secrets! But enough talk, have at you!"
Join Date: Apr 18, 2006
Location: Forever wandering the tower...!
Posts: 1790
Pronouns: he/him
Woo! It worked! Thanks so much for everyone who helped and for X-Calibar for fixing this issue! I hope you guys continue to help others like me, and again thanks.
It worked? Awesome! I guess it probably had something to do with DirectDraw then! Some reason it wasn't working for you or at least with Cave Story.

You should be able to copy and paste that ddraw.dll file in your Cave Story folder and put it in any Cave Story mods you download too. Should work most of the time.

Known bugs of DXGL:
Blade lvl 3 looks distorted when fired... I don't know how to fix that.
Also some mods run slower than regular Cave Story.

Some bonuses of DXGL:
Can be used with Steam Overlay (and maybe other injectors supposedly?)
Works with CS-Mod-Loader!

So, if you're happy with how Cave Story is playing, then you can leave it alone for the original experience. But if you want to try running DXGL with Clownacy's CS-Mod-Loader for smoother motion, nice high resolution font, (or optional 60 fps gameplay, widescreen, and music) here are the settings I might recommend testing, also useful if by chance big maps are running too slow:

1) Earlier you moved/renamed/deleted "dsound.dll". Bring it back! Put it back in your Cave Story folder. We'll make a few changes though.
2) Open up your Cave Story folder -> mods folder and while we are here, open up settings.ini again and change "logging = true" to "logging = false". You can probably leave the debug_console, but it's up to you.
3) Save.
4) Still in the mods folder, navigate to graphics_enhancement folder.
5) Open up this new settings.ini in graphics_enhancement folder.
6) Copy over the original and paste one of these:

For 50 fps, 4:3 aspect ratio, sharper fonts, smoother movement:
Code:
; Makes the game run at 60FPS instead of 50, just like the prototype versions
; of the game, and Cave Story+.
60fps = false

; This is the horizontal component of the aspect ratio.
; In 16:9, this would be 16.
aspect_ratio_x = 4

; This is the vertical component of the aspect ratio.
; In 16:9, this would be 9.
aspect_ratio_y = 3

; When this is enabled, the game draws black bars over the out-of-bounds parts
; of the screen when in a small room.
; Without this, some places look silly, including one of the endings.
black_bars = false

; This disables the black bars specifically in the Ironhead boss fight.
; This should be useful for mods that repurpose the Ironhead boss room
; for something else.
disable_ironhead_black_bars = false

; This controls the size of the game window in windowed mode.
; At 4:3, 1 is 320x240, 2 is 640x480, 3 is 960x720, etc.
; This improves font smoothness in fullscreen, and enables higher resolution
; output when combined with remove_sprite_alignment and a high sprite_resolution
window_upscale = 5

; This controls the resolution of the game's sprites.
; 1 is normal, 2 doubles the resolution, 3 triples it, etc.
; For reference, normal Cave Story is 1, Cave Story+'s "New" graphics are 2.
sprite_resolution = 1

; This removes a stylistic choice in the original game where all sprites have their
; pixels locked to a low-resolution grid, forcing an accurate 320x240 aesthetic,
; even when playing in fullscreen on a HD monitor.
; That doesn't work so well when using higher-resolution sprites, as they'll seem to
; just stutter as they move. It also makes camera movements look kind of stiff.
remove_sprite_alignment = true

; This replaces the game's normal fullscreen with a borderless-windowed implementation.
borderless_fullscreen = true

; Enables V-Sync, but only in exclusive fullscreen mode (borderless_fullscreen must be off).
; Normally, at 60FPS, the game's frame output is pretty unstable, with dropped frames all
; over the place. With V-Sync, it's much better.
; Note that this will not work if your monitor is not 60Hz.
fullscreen_vsync = false

; This forces fullscreen to only display at a multiple of the original resolution,
; preventing blurring, but potentially reducing the size of the screen.
fullscreen_integer_scaling = true

; With this, the game will automatically detect the aspect ratio of your monitor,
; allowing it to fill as much as possible.
fullscreen_auto_aspect_ratio = false

; This lets the game detect the most it can upscale the game to fit your monitor.
; See window_upscale.
fullscreen_auto_window_upscale = true
For 60 fps, 1:1 aspect ratio, sharper fonts, smoother movement:
Code:
; Makes the game run at 60FPS instead of 50, just like the prototype versions
; of the game, and Cave Story+.
60fps = true

; This is the horizontal component of the aspect ratio.
; In 16:9, this would be 16.
aspect_ratio_x = 1

; This is the vertical component of the aspect ratio.
; In 16:9, this would be 9.
aspect_ratio_y = 1

; When this is enabled, the game draws black bars over the out-of-bounds parts
; of the screen when in a small room.
; Without this, some places look silly, including one of the endings.
black_bars = false

; This disables the black bars specifically in the Ironhead boss fight.
; This should be useful for mods that repurpose the Ironhead boss room
; for something else.
disable_ironhead_black_bars = false

; This controls the size of the game window in windowed mode.
; At 4:3, 1 is 320x240, 2 is 640x480, 3 is 960x720, etc.
; This improves font smoothness in fullscreen, and enables higher resolution
; output when combined with remove_sprite_alignment and a high sprite_resolution
window_upscale = 5

; This controls the resolution of the game's sprites.
; 1 is normal, 2 doubles the resolution, 3 triples it, etc.
; For reference, normal Cave Story is 1, Cave Story+'s "New" graphics are 2.
sprite_resolution = 1

; This removes a stylistic choice in the original game where all sprites have their
; pixels locked to a low-resolution grid, forcing an accurate 320x240 aesthetic,
; even when playing in fullscreen on a HD monitor.
; That doesn't work so well when using higher-resolution sprites, as they'll seem to
; just stutter as they move. It also makes camera movements look kind of stiff.
remove_sprite_alignment = true

; This replaces the game's normal fullscreen with a borderless-windowed implementation.
borderless_fullscreen = true

; Enables V-Sync, but only in exclusive fullscreen mode (borderless_fullscreen must be off).
; Normally, at 60FPS, the game's frame output is pretty unstable, with dropped frames all
; over the place. With V-Sync, it's much better.
; Note that this will not work if your monitor is not 60Hz.
fullscreen_vsync = false

; This forces fullscreen to only display at a multiple of the original resolution,
; preventing blurring, but potentially reducing the size of the screen.
fullscreen_integer_scaling = true

; With this, the game will automatically detect the aspect ratio of your monitor,
; allowing it to fill as much as possible.
fullscreen_auto_aspect_ratio = false

; This lets the game detect the most it can upscale the game to fit your monitor.
; See window_upscale.
fullscreen_auto_window_upscale = true

NOTE: the 60 fps one uses a 1:1 ratio which reduces the size of the screen, more than normal. This smaller size should boost the speed of the game, in case you felt Cave Story wasn't running as fast as it should on large maps.
If you want 50 fps and think that Cave Story is lagging even on the 50 fps one, just copy the 60 fps one and set "60fps = true" to "60fps = false".

ALSO, if you see screen tearing and want vsync whether using CS-Mod-Loader or not. Go back to the DXGL Config:
1) Hit Windows key -> "Configure DXGL"
2) Make sure you are on the "Global" Application profile
3) Change Vertical sync from "Application default" to "Enabled every flip or primary Blit"
4) Hit apply or OK.

BONUS:
1) Go to Cave Story -> mods folder
2) open up mods.txt
3) Add the following line at the bottom: "title_background"
4) Save! (Oh and if you want to remove any of those lines, feel free. Like the 3ds_hud line if you want to change Cave Story's GUI back to normal.)
Here's a copy of the mods.txt for reference.
Code:
3ds_hud
alternate_music
debug_save
disable_image_protection
graphics_enhancement
ikachan_cursor
sdl_controller_input
title_background

Hopefully all of this works for you, and if not, or you want to disable it, just do what you did previously to change or remove dsound.dll.
 
Aug 27, 2018 at 9:27 PM
Junior Member
"Fresh from the Bakery"
Join Date: Aug 23, 2018
Location:
Posts: 12
Age: 24
Wow! Again thanks for all the hard work you've put into this and I think it's alright to say, Take it easy man. (But thanks lol)
 
Sep 2, 2018 at 1:50 PM
Junior Member
"Wahoo! Upgrade!"
Join Date: Feb 26, 2018
Location:
Posts: 46
-The display size for the Chinese and Japanese font is one pixel off of an integer upscale, so all the text in those languages has gone through "Nearest Neighbour hell."
That depends on resolution.

-It can't use normal Cave Story save files?
-It's possible to jump without leaving the ground??
What?
-The pause menu doesn't have the usual F1/F2/ESC shortcuts.
-It's possible to look up and interact at the same time.
Doesn't seem like something bad.
-Gravity is unbearable. ;-;
What? Gravity is *exactly* the same as in CS.
-P. sure this font ain't monospace.
Which one? Anyway, they both aren't. It's easily fixable if anyone wishes to provide *free* monospace unicode font. And CS uses arial by default, if i remember correctly.
-Secret items take too much punishment?
-X won't cancel teleportation.
What?
-It's possible to get two of the same item if you get it IT+'d twice.
-There's a max of 6 portal slots?
And that's a bug, because?
-The animation for BkMoon is one pixel off on the top of its framerects, so the bottom of the moon moves with the highest clouds.
That was fixed long time ago.

In summary: NXengine is pretty-much a lost cause, and Evo is a step forwards and a step backwards in many ways. I don't think it's worth anyone's time to try and fix it.
Cucky's "Cave Story Engine" has already surpassed it in accuracy and quality (although, it's not finished yet), and will surely become the preferred engine for porting Cave Story in the future... I hope. And then may NXengine rest with the devil.
While other points look valid, and it's indeed a long list, it is worth my time fixing it.
Also, if you're talking about this https://github.com/ThatOneGreenGuy/CaveStoryRemake/, then, ugh, I'll just leave my opinion to myself and go fix some bugs in nxevo, because i prefer doing things, rather than shitting on other's work.
 
Sep 2, 2018 at 3:22 PM
Senior Member
CSE Discord Admin
"Fly, Fly, Fly!"
Join Date: Jan 13, 2016
Location:
Posts: 132
I guess that's the problem with making a clone engine black-box style. I can tell you 100 things wrong with those Taxman+Stealth Sonic remasters... ugh.

The above post does bring up something that always bothers me about these clones: sometimes they go for enhancements, when I just want a vanilla-accurate engine that has readable source code. Not to sound entitled or anything, I just think it's important to not make edits to the game to make it 'better', at least when said edits aren't optional.

Sure, I could edit the source code myself, and remove the enhancements, but it's a bit of an ironic burden: I'm using a clone engine so I don't have to recreate the game myself... except I do have to recreate parts of it.

Also, I think the 'Gravity is unbearable' bit might be referring to the song, Gravity.
 
Sep 2, 2018 at 3:27 PM
Junior Member
"Wahoo! Upgrade!"
Join Date: Feb 26, 2018
Location:
Posts: 46
Well, current target is accuracy. If you'll point out "optional enhancements", sure, i'll make them optional.
Also, it's not currently black box style development, due to hypothetical someone somewhere messing compile flags, and another hypothetical someone abusing this.
(Although, it looks like that's the case with mentioned above engine too, being initially a cleaned up version of decompiled with HexRays source of original CS (or CS+). And while, it's ofcourse far more accurate, being almost direct copy source-wise, lagality of such engine is a big question)
 
Last edited:
Sep 2, 2018 at 4:04 PM
Junior Member
CSE Discord Admin
"It's dangerous to go alone!"
Join Date: Jun 13, 2017
Location:
Posts: 34
Age: 21
Pronouns: he/him
Seeing as the source code for the CaveStoryEngine is deduced from the Linux port of CS, which was developed by Simon Parzer and Peter Mackay, they would be the ones to have to complain to us (the fact that Pixel gave them his source code does not matter here except if they signed some sort of legal agreement giving him rights to the executables they produced from his code).

Also, reverse engineering is probably not implicitly forbidden (otherwise I don't see why I can find "thou shall not reverse engineer this" clauses in almost half EULAs I read).

Really though, we're just in the same gray area as the people who contributed to Sonic disassemblies.

I also have to point out that there are 4 people contributing to the CaveStoryEngine, so we're prolly gonna go faster than you :awesomeface:.
 
Last edited:
Sep 2, 2018 at 5:03 PM
Junior Member
"Wahoo! Upgrade!"
Join Date: Feb 26, 2018
Location:
Posts: 46
>Also, reverse engineering is probably not implicitly forbidden
It isn't for the purposes of interoperability, self-education, etc.
It is for the purposes of creating competing software.
Also, it depends on country. Above is valid for USA (DMCA) and EU (EU Directive 2009/24)
Also, it doesn't matter who developers are, it only matters who copyright holder is.
 
Sep 2, 2018 at 5:20 PM
Junior Member
CSE Discord Admin
"It's dangerous to go alone!"
Join Date: Jun 13, 2017
Location:
Posts: 34
Age: 21
Pronouns: he/him
1. We're not creating competing software (except if you consider making an base engine for mods "competing" with just hacking the original)

2. It's also for the purposes of interoperability, considering the code is portable on all platforms with SDL.


Btw, I'm not saying nxEngine is bad or anything, really it's amazing work considering you (and Shaw) didn't use decompiled code (you must have spent a lot of time inspecting how NPCs worked and remaking them lol), but I think our remake is prolly gonna be better at compatibility with mods and stuff.
 
Last edited:
Sep 2, 2018 at 5:27 PM
Junior Member
"Wahoo! Upgrade!"
Join Date: Feb 26, 2018
Location:
Posts: 46
You are mistaking portability with interoperability. Interoperability is an exchange of data with original software. Map editor, for example.
BTW, i've never said i'm not looking at decompiled code, however, i won't say, that i do, lol.
 
Sep 2, 2018 at 5:37 PM
Junior Member
CSE Discord Admin
"It's dangerous to go alone!"
Join Date: Jun 13, 2017
Location:
Posts: 34
Age: 21
Pronouns: he/him
Oh ok lol. So we're in same grey area anyway lol.
 
Back
Top