• Most people probably don't realise this, but this forum has had two editors for a number of years. One is the xenForo default editor, and the other is a custom editor I made years back I called BBCEd.

    All the settings for which editor you use was lost during the upgrade. You can find the setting under Account Settings > Preferences > Editor.

Graphics Enhancement Pack

Apr 10, 2017 at 10:21 PM
Senior Member
CSE Discord Admin
CSE2 Discord Admin
"Wahoo! Upgrade!"
Join Date: Jan 13, 2016
Location:
Posts: 63
#1
Anyone who hangs around the Discord chat might know that, for a while now, I've been working on a widescreen mod for Freeware Cave Story. It, and the rest of my Cave Story shenanigans, have fallen into a bit of a development hell, and I figure I've kept the folks that are interested waiting long enough, so here's what I have so far:


Alternate video showing 16:9

The aspect ratio is actually user-configurable, using my Mod Loader's new support for mod settings: the video above is 21:9, but with the edit of one txt file, you can make it, not just 16:9, but any ratio you want.

In this mod's settings is the option to enable black bars, to cover the empty space outside the boundaries of smaller rooms, which are made visible by this mod. You can turn this off, but it makes the Best Ending look downright silly.

Unfortunately, the mod is not yet perfect: on an engine level, the only thing on my to-do list is the credits, which are in a sub-par state (edit: fixed now) - the remaining problems lie in the script and map files. This is where you folks come in...

If, for whatever reason, I don't get around to fixing these myself, you can open a Pull Request on the project's GitHub page, and submit fixes yourself. Most of the issues are characters despawning during cutscenes while still on-screen. I may populate the Issues section of the GitHub page with ones that I remember, so they can be publicly ticked-off as they're fixed.

But that's not all: while rooting around the game's drawing system, I was able to make a few more changes, which make this more than just a widescreen mod:


Thanks to a strange property of the engine, where it upscales every image it loads, I was able to add configurable sprite sheet scaling. This doesn't just mean double-resolution sprite sheets, but triple, quadruple, and more! With this, an artist could very well make a 1080p Cave Story mod.

Now, you might be wondering how you'd be able to play such a high-resolution mod, when the game only displays at 480p maximum. Well, the third feature of this Graphics Enhancement Pack is a window size override, so not only can such mods be enjoyed at their intended resolution, but owners of 4K monitors and the like can actually see the game for once. This overrides only the 640x480 option of the DoConfig program, so be sure your copy of the game is set to that, before trying this feature out.

With all that out of the way, here are the parameters for the mod's settings.txt file:
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 = 16

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

; 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 = true

; 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 = 2

; 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 = false

; 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 = true

; 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 = false

; 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 = true

; This lets the game detect the most it can upscale the game to fit your monitor.
; See window_upscale.
fullscreen_auto_window_upscale = true
This mod comes with the DLL Mod Loader, so download links and instructions can be found here.
 
Last edited:
Apr 11, 2017 at 4:28 AM
Perfectionist
CS Beta Content Discord Admin
CSE Discord Moderator
CSE2 Discord Admin
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Dec 26, 2014
Location: the back of their own hand.
Posts: 1285
Age: 118
#2
Did you just... I can finally make my 4x res mod? YES!
Is this compatible with NICE?
 
Apr 11, 2017 at 5:02 AM
Senior Member
CSE Discord Admin
CSE2 Discord Admin
"Wahoo! Upgrade!"
Join Date: Jan 13, 2016
Location:
Posts: 63
#3
I've never tested it. You wouldn't happen to a have a link to where I can find this 'NICE'?
 
Apr 11, 2017 at 5:07 AM
Perfectionist
CS Beta Content Discord Admin
CSE Discord Moderator
CSE2 Discord Admin
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Dec 26, 2014
Location: the back of their own hand.
Posts: 1285
Age: 118
#4
Apr 11, 2017 at 5:52 AM
Senior Member
CSE Discord Admin
CSE2 Discord Admin
"Wahoo! Upgrade!"
Join Date: Jan 13, 2016
Location:
Posts: 63
#5
A few things are broken. It looks like the file redirection built into the mod loader breaks the audio on the XP splash screen at the beginning, and increasing the game's internal sprite resolution causes both of the images at the start and the end of the demo to shrink.

That last one is fixable though: open initdraw.lua in the data folder, and change the line 'doukutsu.poke32u(0x48f914, 1)' so that '1' is replaced with the number you set sprite_resolution to in graphics_enhancement's settings file.
 
Apr 11, 2017 at 6:36 AM
Perfectionist
CS Beta Content Discord Admin
CSE Discord Moderator
CSE2 Discord Admin
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Dec 26, 2014
Location: the back of their own hand.
Posts: 1285
Age: 118
#6
A few things are broken. It looks like the file redirection built into the mod loader breaks the audio on the XP splash screen at the beginning, and increasing the game's internal sprite resolution causes both of the images at the start and the end of the demo to shrink.

That last one is fixable though: open initdraw.lua in the data folder, and change the line 'doukutsu.poke32u(0x48f914, 1)' so that '1' is replaced with the number you set sprite_resolution to in graphics_enhancement's settings file.
Cool.
When you change the screen resolution the information saved to window.rect is wrong. I suggest a way to toggle a modified window.rect writing system, or a way to disable writing to window.rect.
 
Apr 11, 2017 at 7:31 AM
The Sunset Curse
"All your forum are belong to us!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 597
Age: 20
#7
I was able to add configurable sprite sheet scaling. This doesn't just mean double-resolution sprite sheets, but triple, quadruple, and more! With this, an artist could very well make a 1080p Cave Story mod.
Wouldn't that make it easier for new ambitious modders to use cs+ graphics in their mod?
 
Apr 11, 2017 at 1:31 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5969
#8
Wouldn't that make it easier for new ambitious modders to use cs+ graphics in their mod?
It's still against the rules
 
Apr 11, 2017 at 1:41 PM
Perfectionist
CS Beta Content Discord Admin
CSE Discord Moderator
CSE2 Discord Admin
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Dec 26, 2014
Location: the back of their own hand.
Posts: 1285
Age: 118
#9
Apr 11, 2017 at 1:44 PM
The Sunset Curse
"All your forum are belong to us!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 597
Age: 20
#10
It's still against the rules
That's exactly the issue, if new members start using this to make mods with cs+ graphics, it'd be quite an issue.
It'd be better if it were only available for people who wouldn't use those, but having control over that isn't easy either.
 
Apr 11, 2017 at 1:58 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5969
#11
well then I guess we should just disallow this altogether to save everyone time
 
Apr 11, 2017 at 3:41 PM
Forever 12
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: May 24, 2013
Location:
Posts: 541
#12
Legal concerns aside, damn this is really impressive. Cave Story looks amazing in 21:9!
 
Apr 11, 2017 at 6:57 PM
Okay I give up... for now
"That dog!"
Join Date: Dec 31, 2011
Location: United States
Posts: 1732
Age: 22
#13
This is very impressive, it will be interesting to see if people ever end up coming up with some 4x resolution sprites to put in this. Four years ago, this was just a pipe dream.

I had a feeling that sooner or later someone else would come along with their own 2x resolution hack. In regards to whether or not this is legal, there's nothing illegal about this. Even though it may instigate some people into wanting to break the rules, Clownacy is free to distribute this mod as long as he's not distributing NICALiS' graphics. When Noxid and GIR made the original 2x resolution hack, they restricted access to it simply because they felt that was the best thing to do, not because of any threats from NICALiS (correct me if I'm wrong). Clownacy is under no obligation to follow suit with how he grants access to this hack, unless the moderation team were to suddenly rewrite the rules of these forums, which I find unlikely.
 
Apr 11, 2017 at 7:03 PM
The Sunset Curse
"All your forum are belong to us!"
Join Date: Jul 20, 2015
Location: Under sea level or something
Posts: 597
Age: 20
#14
The responsibility of usage of CS+ graphics is still for the individual modder, a good-timed warning somewhere along the way of installing should work well against the issue.
...Or at least, mostly
 
Apr 12, 2017 at 2:03 AM
Ready to Live; Ready to Conquer
Modding Community Discord Admin
"Bleep, Bloop, Bleep, Bloop"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1528
Age: 21
#15
If we can get NICE/PEONS, TSC+, and Xin's 0x1000 entity hack into this that would be amazing.

Also we should call it "chocolate CS" (you know instead of vanilla) and have it be the new base everyone should make mods off of.

Edit: oh so this plays ogg files as well; at least for music, if they would work for sfx as well then we can have the features of NICE and PEONS at the same time (minus lua support via NICE)
 
Last edited:
Apr 14, 2017 at 1:11 PM
gigantic immortal dog...?
"That dog!"
Join Date: Apr 18, 2006
Location: Forever wandering the tower...!
Posts: 1656
#16
This is very cool.
Did a quick resize and photoshop filter to test 4k cave story :)

I reduced the size of the screenshot and cropped, but it was originally...
Code:
aspect_ratio_x 16
aspect_ratio_y 10
window_upscale 13
sprite_resolution 10
black_bars false
Maybe I'll edit it in a video for fun later~
 
Apr 17, 2017 at 6:52 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Sep 17, 2016
Location: In the swooce
Posts: 9
Age: 16
#17
Kinda late to the party, but thanks for releasing this for us modders! This is huge.
 
Apr 23, 2017 at 6:09 AM
Senior Member
"Master using it, and you can have this!"
Join Date: Dec 24, 2013
Location: H
Posts: 72
Age: 18
#18
Is there a way to run this mod in fullscreen? If there is, I will love you immensely.
 
Last edited:
Jun 27, 2017 at 5:06 PM
Junior Member
"Fresh from the Bakery"
Join Date: Dec 7, 2014
Location:
Posts: 10
#19
Is there a way to run this mod in fullscreen? If there is, I will love you immensely.
Yeah it kinda sucks that 3x is too small and 4x is too large for my screen... I have a 1920x1080 screen.
The mod itself is really impressive, congrats!
 
Jun 27, 2017 at 5:18 PM
Senior Member
CSE Discord Admin
CSE2 Discord Admin
"Wahoo! Upgrade!"
Join Date: Jan 13, 2016
Location:
Posts: 63
#20
Not to be a tease, but I do have an experimental Borderless Fullscreen implementation in the works. I have a video of it in-use here.


Not only does it make it easier to change between windows while playing - as you'd expect from borderless-fullscreen - but it even fixes the blurry filtering you'd see in the original fullscreen mode. That might vary depending on the PC running it though; I've only tested it on this machine.
 
Top