spacemaniac / hamsandwich Goto Github PK
View Code? Open in Web Editor NEWSource code and modding kit for Hamumu's Dr. Lunatic series.
Home Page: https://spacemaniac.itch.io/hamsandwich
License: MIT License
Source code and modding kit for Hamumu's Dr. Lunatic series.
Home Page: https://spacemaniac.itch.io/hamsandwich
License: MIT License
A common feature request is a button to control Weapon Lock. There are two possibilities:
Additionally:
I tried to add my tileset to the game so I created a "tilegfx" folder with bmp-image in it:
When I launch the game, there is my tileset in the editor list:
But when I try to load it, there is an error: ERROR: open_sdl(tilegfx/TestTiles.bmp): not found in any vfs
Here is console log:
[0/2] Re-checking globbed directories...
ninja: no work to do.
==== Running supreme (windows-x86_64-debug) ====
DEBUG: auto 0 required: @nsis@installers/supreme8_install.exe
DEBUG: auto 1 disabled: @zip@installers/all_supreme_worlds.zip
DEBUG: auto 2 disabled: @zip@installers/sup_GloomValleyRemastered.zip
DEBUG: auto assets: assets/supreme
DEBUG: auto appdata: appdata/supreme
INFO: audio format: freq=44100, channels=2, format=0x8010
INFO: window format: SDL_PIXELFORMAT_RGB888
INFO: renderer: direct3d
INFO: flags: accelerated vsync ttex
INFO: texture: (16384, 16384)
INFO: formats (3):
INFO: SDL_PIXELFORMAT_ARGB8888
INFO: SDL_PIXELFORMAT_YV12
INFO: SDL_PIXELFORMAT_IYUV
ERROR: open_stdio(hiscore.dat): not found in any vfs
ERROR: open_stdio(hitime.dat): not found in any vfs
ERROR: open_sdl(tilegfx/TestTiles.bmp): not found in any vfs
Same goes with custom sounds and graphics.
I learned about your project back in January 2022. I tried to modify the game in the old version, and everything worked for me. Now I decided to install a new one and ran into the above problem.
Thanks in advance for your reply.
Sleepless Hollow is an absurdly difficult game, and a crash in the Bones tomb while fighting the one flames miniboss when it killed me corrupted my save and deleted the Earsplitter from my inventory, rendering the game incompleteable as far as I can tell (this is my first real playthrough). I had beaten two other bosses prior. I was playing on the Linux build also.
There appears to be an issue with sounds. Many sounds will not play if there is multiple sound triggering events going on. Actually, certain games that shouldn't have that much going on ALSO suffer from severe sound drops, and it might be related to the sound distance stuff of the original code. Spooky Castle features some of the most severe sound drops, sometimes the game is just silent in spite of anything going on. This issue happens across all versions of the engine I've played, from the browser build, to the Linux build, and even the Windows build.
Also as an aside, if you have plans to revamp the sound engine or replace it, have you by chance looked into miniaudio (https://miniaud.io/)?
At least in windowed mode. Mouse also gets trapped with no way to tab out of the game and use it.
As discussed on Discord, a special that can change the current color palette to one based on the given bitmap file.
The zip can be downloaded at https://hamumu.itch.io/dr-lunatic-supreme-with-cheese. Such an option would, of course, require the user to download the zip themselves, as with the original game's installer.
Edit: I just remembered that Loonyland 2 has multiple optional add-ons available on its itch.io page.
Yo!
A while ago I made a start on converting the Dr Lunatic code to use SDL/OpenGL for rendering. I didn't get that far, it literally just fades the Hamumu logo in and out again, but I did write a shader that draws images using a palette, which I thought might be useful. (It surprised me how simple it is to do that.)
Vertex shader:
#version 150
in vec3 aPosition;
in vec4 aColor;
in vec2 aUV;
out vec4 vColor;
out vec2 vUV;
uniform mat4 uProjectionMatrix;
void main() {
gl_Position = uProjectionMatrix * vec4( aPosition.xyz, 1 );
vColor = aColor;
vUV = aUV;
}
Fragment shader:
#version 150
uniform sampler2D uTexture;
uniform sampler1D uPalette;
in vec4 vColor;
in vec2 vUV;
out vec4 fragColor;
void main() {
int colorIndex = int(255.0 * texture(uTexture, vUV).r);
vec4 texel = texelFetch(uPalette, colorIndex, 0);
fragColor = vColor;
fragColor *= texel;
}
The palette is sent by just telling opengl to load its memory as a 1D texture. Images are sent as-is to the GPU, as 2D, single-channel textures. It means you can still use the original palette-switching code, and 256-colour bitmaps, without changing them.
Theoretically using opengl would be faster than software-rendering, but I never got far enough to test that assumption, and rendering the game itself is obviously a lot more complicated than a flat image, and might require a decent amount of restructuring.
So yeah, I don't know how helpful this is, or whether that's even a direction you'd want to go in, but I thought it's better to actually share this than just leaving it rotting on my HDD. (Maybe you already know graphicsy stuff, so I really hope this doesn't seem patronising!) The whole repo is at https://bitbucket.org/AtkinsSJ/glunatic (Not github because it was private until just now and github doesn't have free private repos and I am cheap. Sorry.) Feel free to yell at me if you have any questions.
Is there a way to compile these games and have them as actual executables or do you have to use the run file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.