Eat The Dungeon General Discussion

One way I can think of that may be a tad bit time consuming, is to give each character a KO portrait. That alone would help to notice at a quick glance which character is KO’d. Plus I’m sure there’d be some fun designs and poses each character can have for a KO

4 Likes

Would you mind making the canvas have a fixed size and instead use css to scale the canvas? I find it leads to better visuals, especially on mobile (compressed image previews don’t show the issue too well, try to view fullscreen):


Possible Fix

I implemented the fix above by making the input system work with any canvas size, patching:

// onmousemove
INPUT.mouse_screen.x = mouse.clientX - canvas.getBoundingClientRect().left;
INPUT.mouse_screen.y = mouse.clientY - canvas.getBoundingClientRect().top;

// ontouchstart
INPUT.mouse_screen.x = event.changedTouches[0].pageX - canvas.getBoundingClientRect().left;
INPUT.mouse_screen.y = event.changedTouches[0].pageY - canvas.getBoundingClientRect().top;

// ontouchmove
INPUT.mouse_screen.x = event.changedTouches[0].pageX - canvas.getBoundingClientRect().left;
INPUT.mouse_screen.y = event.changedTouches[0].pageY - canvas.getBoundingClientRect().top;

to

// onmousemove
INPUT.mouse_screen.x = ((mouse.clientX - canvas.getBoundingClientRect().left) / canvas.getBoundingClientRect().width) * canvas.width;
INPUT.mouse_screen.y = ((mouse.clientY - canvas.getBoundingClientRect().top) / canvas.getBoundingClientRect().height) * canvas.height;

// ontouchstart
INPUT.mouse_screen.x = ((event.changedTouches[0].pageX - canvas.getBoundingClientRect().left) / canvas.getBoundingClientRect().width) * canvas.width;
INPUT.mouse_screen.y = ((event.changedTouches[0].pageY - canvas.getBoundingClientRect().top) / canvas.getBoundingClientRect().height) * canvas.height;

// ontouchmove
INPUT.mouse_screen.x = ((event.changedTouches[0].pageX - canvas.getBoundingClientRect().left) / canvas.getBoundingClientRect().width) * canvas.width;
INPUT.mouse_screen.y = ((event.changedTouches[0].pageY - canvas.getBoundingClientRect().top) / canvas.getBoundingClientRect().height) * canvas.height;

I then removed the canvas resize logic:

var w = Math.min(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.min(document.documentElement.clientHeight, window.innerHeight || 0);

// If statement
canvas.height > h -  25

// Border resizing
canvas.width = (w - 25);
canvas.height = (w - 25) *  600 / 1080;

to

var w = 1080;
var h = 600;

// If statement
false

// Border resizing
canvas.width = w;
canvas.height = w *  600 / 1080;

Then just slapped some css to the canvas:

window.canvas.style["max-width"] = "100%";
window.canvas.style["max-height"] = "100%";
window.canvas.style.margin = "auto";
window.canvas.style.border = "unset";
2 Likes

when looking at the Characters, i notice that we have 5 Fruit, Veggie and Candy Heroes but only 3 Meat and Milk Heroes and under the 3 Heroes is a big blank space Maybe for new heroes or a great spot to put a Gallery Button At?

2 Likes

Honestly, those quality of life proposals look really bloody useful. Sometimes I just wish to extract the girls to have a snake team that can attack once per minute, which does admittedly get a bit tricky when it goes from Trapped! to the city that inexplicably reminds me of Anor Londo after every round.

Honestly curious, what NPCs were people’s favourites in the new update? Was personally quite fond of the Gnome (Regret putting her in Trickster rather than Alchemist), Cryomancer, Lich and feel genuinely sorry for the Eldritch girl who just wanted a hug.

3 Likes

Hi! been following the game since around 2019 and finally got to play the newest update! games looking great! is there anywhere where i could find the image assets for the game? (like the weight gain/ stuffing levels) and would i be allowed to use them as reference for a personal thing im working on?

1 Like

if your curious im semi-new to blender and have been wanting to practice making character models that have different instances (i.e. gaining weight) and id love to maybe practice using characters from the game.
but gnabbing a shot of every possible weight gain level and stuffed belly level is… tedious to say the best
ill gladly share here when i get to it :stuck_out_tongue:

2 Likes

In order to make this work, I’d probably have to make KO sprites for multiple different weight levels for each character. Its a cool idea but I don’t think I’ll be able to make this kind of time investment anytime soon.

I’ll look into this

There are three more adventurers planned for the game: The Spy, The Raider, and The Beastkin. I haven’t picked favorite food types for them yet, I’ll take this into consideration when I do.

By the time the game is done you’ll be able to unlock the ability to extract 4 times per level.

The isn’t an in-game gallery yet but if you’re clever you can look through the website’s directory and find the files.

https://www.bewilderedgames.com/img/adventurer/

4 Likes

Im sure not clever, but youtube guides are :open_mouth: thenkss

2 Likes

I am noticing significant slowdown with some of the new-ish effects, is there any way those could be toggled?

2 Likes

I just wanted to say that I’m really impressed by this. It’s really fun to play and pretty well made. I’m excited for the next update, especially if it lets you zoom out on the map. That would make navigating it a lot easier. Also, I started playing this in incognito mode; is there any way to close down the window and still keep my save progress?

Incognito mode doesn’t allow websites to store persistent data to your device to reduce tracking. This includes game saves. You’ll want to switch to the normal browsing mode if you want to have persistent saves.

If you are comfortable with the dev tools, you can use the console tab to save and restore the saves at will, even in incognito mode. I wrote a small script that did something to that effect a while ago:

Script
function saveLocalStorage() {
    let object = {};
    for(let i = 0; i < window.localStorage.length; i++) {
        let key = window.localStorage.key(i);
        let value = window.localStorage.getItem(key);
        
        object[key] = value;
    }
    
    let json = JSON.stringify(object);
    let file = new Blob([json], {type: 'application/json'});
    
    let a = document.createElement('a');
    a.href = URL.createObjectURL(file);
    a.download = 'localStorage.json';
    a.click();
}

async function loadLocalStorage() {
    let openFileDialog = new Promise((resolve, reject) => {
        let input = document.createElement('input');
        input.type = 'file';
        
        input.addEventListener('change', (e) => {
            resolve(input.files);
        });
        input.click();
        setTimeout(() => {
            reject("timeout");
        }, 30 * 1000);
    });
    
    let list = await openFileDialog;
    
    let fileString = new Promise((resolve, reject) => {
        if(list.length != 1) 
            throw "invalid length";
        
        let reader = new FileReader();
        reader.addEventListener('load', (e) => {
            resolve(reader.result);
        });
        reader.addEventListener('error', (e) => {
            reject(e);
        });
        reader.readAsText(list[0]);
    });
    
    let dataString = await fileString;
    let json = JSON.parse(dataString);
    
    let jsonKeys = Object.keys(json);
    for(let i = 0; i < jsonKeys.length; i++) {
        let key = jsonKeys[i];
        localStorage.setItem(key, json[key]);
    }
    
    return json;
}

By pasting this into the console, hitting enter, then running saveLocalStorage(), you’d get a save file saved to your downloads. To load it, open the game to the title screen, paste run run the script, run loadLocalStorage(), load your save file, then refresh the page. Going past the title from there should use the new save data.

1 Like

Thank you so much. This is super helpful.

I have just about every character unlocked in the new update, but cannot for the life of me find the Druid or Alchemist. Can anyone help me with that?

1 Like

The meat gym south of where you got the Psychic. If you have the Magus, you should already have the stages unlocked for Druid and Alchemist.

1 Like

I appreciate it! I didn’t have Magus or the others in that area either, as a matter of fact I didn’t even realize that was an area lmao!

2 Likes

Alright, after a painfully long 6 hours, I finished the ENTIRE game. (unless there’s a secret continuation beyond the time witch part) I have no words except it’s very good. I really like the character designs and unique “weight gain areas”. Rating; 8-8.6/10, some honing around the story would do well, and some elaborations on certain things (and mechanics), like how running enemies and such work, off the top of my head. The experience itself is great. I’m writing this at 2AM, so I might have missed something.

-This fat idiot

4 Likes

1-7-25-1

Read the post on patreon here!

Play the latest version here!

Hello! I have climbed out of the Depression Hole™ long enough to test and post the QoL update! How long until I fall back into it? Let’s find out together!

This update is mostly Quality of Life upgrades for ease of use, but also includes new player character sprites and even a few cutscenes! Read the patch notes below for an exact list.

If you encounter any bugs you can contact me via any website I’m on. Be sure to include what platform and browser you’re using! I tried to test every combination I could, but I might have missed one!

For the next few weeks I will be putting up some polls for new characters. Please look forward to them!

0.16 Patch Notes:

  • Gameplay Changes:
    • Favorite food bonus is now x4 instead of x2
    • Shield provided by the Armor ability can now stack 3 times
  • Quality of Life Improvements, including:
    • You can now input by clicking a character/item and then clicking the target, in addition to the old click/drag input.
    • In team selection, elements like food types and defense types will be highlighted if currently selected characters have them.
    • Several improvements to World Map navigation.
    • All current characters now show up on the title screen!
    • You can sort all your characters by various criteria.
    • A KO icon so you can tell who’s knocked out!
    • An info button on the party screen that repeats the explanation for stats
    • Favorite food bonus is now x4 instead of x2
    • Best Time display now shows the team that you used to get that time
    • The window should scale better on small screens like mobile devices (Special thanks to matiastorres on weightgaming.com for their help with this)
  • New cutscenes and npcs, including an intro cutscene you can view at the tutorial level.
  • All the sprites for the Druid, Alchemist, and Magus characters
12 Likes

I’m not sure if this is just my computer being stupid or not but I’ve found that after completing a level that I have previously completed that I cannot select a character to extract fat from them or leave that screen, however if you close that screen right away it seems to be fine.

3 Likes

There’s something wrong with the window, it’s stuck at a small screen.

5 Likes

Nice to see you back! I’m enjoying the update so far, thanks!

That’s my fault, sorry. I wasn’t expecting a direct copy+paste of what I wrote earlier. If I’d known, I’d have spent more time on making it better/testing it properly; I was just trying to get the general idea across.

Here’s a better solution which should hopefully be copy paste:

Fix

When I typed out the window.canvas.style stuff earlier, that was copied directly from the server thing I made and I was too lazy to format it properly. CSS stuff should generally be in a style tag. You can also center the canvas in the screen so the black bars appear on both sides. Here’s the style tag for that:

<style>
html {
    /* make the html tag take up the entire page */
    width: 100%;
    height: 100%;
}

body {
    /* Remove padding */
    margin: 0;
    
    /* Make the body tag take up the entire page (within the html tag)*/
    width: 100%;
    height: 100%;
    
    /* Center child tags vertically and horizontally */
    justify-content: center;
    align-items: center;
    display: flex;
}

canvas {
    /* Limit the max size, so the canvas will shrink if it is too big to fit on the page. */
    max-width: 100%;
    max-height: 100%;
}
</style>

Just add it to the <head> tag:

<html>
    <head>
        <style>
            ...css
        </style>
    </head>
...rest of document

As for the small size issue, I forgot to account for screens larger than the static canvas size with what I wrote earlier. I’ve been rendering the canvas at 2160 by 1200 which is larger than all of the screens I have.

As a better fix, you could use devicePixelRatio. It’s a property I learned about somewhat recently that essentially lets you know how much bigger than normal your canvas should be for mobile displays. You could set the canvas size in the loop like before while multiplying the target width and height by the scaling factor, changing this:

CANVAS_WIDTH = canvas.width = 1080;
CANVAS_HEIGHT = canvas.height = 600;

To this:

// Get scaling factor
var scalingFactor = window.devicePixelRatio || 1;

// Get target width and height
var targetWidth = document.documentElement.clientWidth;
var targetHeight = document.documentElement.clientHeight;

// Calculate the target scaling ratio for each dimension. 1080:600 reduces to 9:5.
var targetWidthRatio = targetWidth / 9;
var targetHeightRatio = targetHeight / 5;

// Calculate final ratio, incorporating the scaling factor and rounding up to the nearest whole number.
var targetRatio = Math.min(targetWidthRatio, targetHeightRatio);
targetRatio *= scalingFactor;
targetRatio = Math.ceil(targetRatio);

// Set the canvas size, multiplying it by the scaling factor.
CANVAS_WIDTH = canvas.width = (9 * targetRatio);
CANVAS_HEIGHT = canvas.height = (5 * targetRatio);

This sets a canvas size that is always the right size or slightly bigger (taking into account the scaling factor), relying on the canvas max-width/max-height to downscale slightly and fit perfectly on the page.

Since mobile support is a goal, you probably also want to add this meta tag to your <head> tag (See Viewport meta tag - HTML: HyperText Markup Language | MDN):

<meta name="viewport" content="width=device-width, initial-scale=1.0">

From my basic testing, these 3 changes should make mobile look nice while also letting desktop users have a full screen game.

If you run into any issues or need help, I’d be happy to assist as best I can. Thanks for your hard work!

Hope it’s helpful.

4 Likes