JSLegendDev 8 hours ago

Hi everyone! I'm the dev behind this work-in-progress game.

This post was intended for my existing audience and I didn't expect for it to be posted on HN.

Anyway, now that it's here, feedback on performance is still very much appreciated!

The reason I'm not making this web playable despite being built using web technologies is that I'm targeting Steam for this game. Therefore, I need to make sure the game works well when installed as an executable on Mac, Windows, Linux.

There was already trust established between me and my audience so that's why it felt appropriate to tell them to download executables.

I understand why HN users not familiar with me, would be wary of downloading random executables from the internet. It's a good instinct to have!

  • lukan 3 hours ago

    "The reason I'm not making this web playable despite being built using web technologies is that I'm targeting Steam for this game. Therefore, I need to make sure the game works well when installed as an executable on Mac, Windows, Linux."

    If it runs on the web, it should run the same as an executable, otherwise your exporter is broken. I would likely debug on the web first (just to get access to chrome dev tools including the profiler and performance meassurement tools). Is there some way to do comfortable debugging/profiling with the way you export via GemShell?

    • TylerE 2 hours ago

      That should is doing a lot of potentially very painful heavy lifting in your statement.

      • lukan 2 hours ago

        Yes, but before checking the tools and compilers for bugs, it usually makes sense checking and verifying the own code first in a controlled setting.

andrewf 35 minutes ago

Firefox runs the game well on the Mac, while the Neutralino build (presumably using the WebKit shipped with Safari) experiences some performance issues. Can you replicate the performance issues with Safari? If so you might be able to glean some insights from https://webkit.org/web-inspector/timelines-tab/

When profiling, it can often be useful to compare profiles of "working well" versus "not working well". So you could record a 10 second timeline when things are going smoothly, then a 5 second timeline when perf is bad - things that jump out on the second timeline are worth looking at.

gwbas1c 10 hours ago

Why are you worried about performance for a 2D game that's basically moving a few sprites around the screen? A game like this shouldn't be taxing for modern hardware; and should even run cleanly on pretty much any computer made in the last 15-20 years. (Or even older, if you weren't using Javascript.)

As some of the other comments imply that there are some performance issues; more than using a profiler, I would make sure that your mental model of the event loop from your framework is correct. If all you're doing is moving some sprites around the screen, you need points where your code pauses because it has nothing to do. This could either be awaiting something from the framework, or putting most of your logic in callbacks that are triggered by the framework.

A different way to say it: Between frames, there's not that much calculation that your game needs to do when you're just moving a few sprites around in 2D. The event model that you hook into should be something where your game does its calculations, and then waits between frames.

  • lloeki 9 hours ago

    > Why are you worried about performance for a 2D game that's basically moving a few sprites around the screen? A game like this shouldn't be taxing for modern hardware

    > As some of the other comments imply that there are some performance issues

    Because there's nothing implied and they experience perf issues first hand? TFA:

    > I’ve been experiencing performance issues

    > I’m using a Macbook Air M3 with 16GB of RAM

    • asveikau 4 minutes ago

      The fact that they experienced issues on a relatively powerful machine is some kind of commentary on modern software development. The screenshots look like something you could have played on a typical 1998 machine or even older.

BugsJustFindMe 11 hours ago

> is it just my machine? I’m using a Macbook Air M3 with 16GB of RAM

Using one of the singularly most powerful personal computers ever made. It's probably not the machine if they don't notice everything else being unexpectedly bad too.

  • Lord-Jobo 10 hours ago

    Well. That’s a bit misleading.

    A real example: MacBook Pro m4 will have absolutely god awful performance on certain web based games * (compared to windows or even android), regardless of the browser or any browser performance settings. This is not the hardware explicitly, obviously it’s a very high performance chipset, but it’s definitely the hardware in terms of what the OP is asking. Because that particular hardware is falling down all over the place in this scenario when others are not.

    Fixing it? Sure that’s almost certainly on the games side, some kind of inefficient process or element that doesn’t work right in that environment and needs to be hammered out or replaced.

    But for diagnosis? Yeah, “it’s the hardware” is the right answer. And you can’t fix it without diagnosis.

    *replicated on latest chrome, Firefox, safari, and Brave, with the games: Idlescape and (now dead)osrsIdle ~8 months ago

    • jesse__ 10 hours ago

      > Well. That’s a bit misleading.

      Uhh .. wut?

      The game appears to be similar to a point-and-click adventure game, which were popular in the 80s, and ran just fine.

      In 1988, a CRAY Y-MP supercomputer had "64 megawords of memory". I have no idea how large a word was on those machines, but by todays standards, that means 128MB. Let's go with that. The Y-MP was the size of two massive fridges.

      Now, the Macbook air OP owns, which is smaller than a toaster, has 128 TIMES as much memory in it as a supercomputer did back in 1988. Similar story for processing power, storage, etc. Point and click adventure games haven't changed all that much, and even back then didn't require a supercomputer to run.

      > But for diagnosis? Yeah, “it’s the hardware” is the right answer.

      Given the above, how you came up with this is beyond me.

      • SAI_Peregrinus 9 hours ago

        Cray Y-MP had a 64-bit word size. They came with 32, 64, or 128 MWords. So 256, 512, or 1024MiB.

      • moron4hire 9 hours ago

        No, it's true. There can be defects in the graphics driver that make certain, specific functions in GLSL or WGSL either completely broken or woefully inefficient.

        It can be very dependent on hardware generation, too. One of my past projects was a very simple, photosphere-based learning environment. Photosphere rendering is incredibly simple. But on Intel processors with Iris Xe integrated GPUs used by one particular year of iMacs (I don't remember which, it only impacted 2 users and it was several years ago), I couldn't use the standard cube sampler because it was just broken. I had to split my photospheres into 6 cube faces and render 6 quads separately to be able to use the not-broken 2d sampler. The issue didn't appear on any other generation of Iris Xe on macOS and it didn't appear on any generation of Iris Xe on any other OS. It was very specifically the combination of macOS and that generation of GPU.

        • jesse__ 6 hours ago

          > There can be defects in the graphics driver

          Yes, video drivers are, generally, buggy and unreliable. The hardware they're hooked up to is fucking amazing.

          Also, I can 99.9999% guarantee that this guys' problem is not a driver bug, so trying to nerd-snipe me with "but driverzzz broroooooo" is pedantic and annoying. The guy is drawing like 100 quads; it should run at a bazillion frames a second on literally a toaster.

          • thaumasiotes 2 hours ago

            > The guy is drawing like 100 quads

            I'm curious about this. I always had the impression, mostly from reading Shamus Young, that there's no such thing as drawing something other than a triangle.

            Blender guides tell you to divide your model into quadrilaterals. Though I did find one reddit post saying "I imported this model from a console game and it's all triangles. I thought models were supposed to use quads." The answer was "that model is finished, so it's in triangles because that's what you actually draw".

            What's going on? Is there such a thing as drawing polygons with more than three sides? Why is the current advice "use quads" to the point that people don't even realize they're drawing triangles?

            • ClimaxGravely 2 hours ago

              It's built of triangles so a quad is 2 triangles etc.

              The advice about using quads I'm not sure is really a tautology. I tend to work with quads until one of the quads is non-planar then I cut it so that when I bring it into a game engine the import/bake step doesn't triangulate the mesh in a way I didn't want it to.

              • meheleventyone 2 hours ago

                Building out of quads is more about overall topology and the aesthetic result.

            • jesse__ 2 hours ago

              The base primitive a GPU draws is triangles; they are the fastest primitive for math-y reasons, but the basic premise is that you can subdivide any triangle into two right-angle triangles, which have favorable properties for scanline-based rasterization.

              Now, software modelling packages can represent geometry in any way they want, as long as that software package can somehow eventually transform that representation into triangles for the GPU to rasterize to pixels (barring custom software rasterizers).

              My comment referred to quads, but at the end of the day, a quad is 2 triangles. Same goes for arbitrary polygons. The GPU speaks triangles.

          • moron4hire an hour ago

            Jesus, dude. I was just pointing out that graphics driver defects very much can result in any number of difficult to diagnose issues. Yes, even decreasing performance over time, if the driver isn't releasing memory correctly and the system is starting to hit swap. There really is no telling for certain what is going on with graphics without having a deeper analysis across multiple, varied system configurations. Which is nigh inaccessible to hobbyist developers.

            I guess I just wasn't willing to assume OP was basically incompetent and hadn't already done a basic algorithm review if their post about not being able to debug this issue made it this far.

        • shkkmo 9 hours ago

          > There can be defects in the graphics driver

          Which is software, not hardware. Just not the software written by this dev.

  • aleph_minus_one 10 hours ago

    > > is it just my machine? I’m using a Macbook Air M3 with 16GB of RAM

    > Using one of the singularly most powerful personal computers ever made.

    Some arbitrary PC Master Racer: "Hold my beer, and I will show you a powerful personal computer." :-)

b1tshift 10 hours ago

On an M2 Mac with 24GB the game went smooth for a few fights and then went down to around 10fps and got slower with every attack an enemy did in the fight. The longer I played the slower it got. CPU and memory usage was stable all the time.

  • doyougnu 10 hours ago

    Not a game dev. Besides profiling, I would create game scenarios that exercise certain parts of the game engine.

    For example, I would create a game fight scenario where the player has infinite health and the enemy just attacks super fast at some settable rate. That way you could monitor whats happening in extreme abnormal conditions with the hypothesis that if the game works in extreme conditions then it will work in normal conditions.

    Another example. If you have random encounters like in old school JRPGs then I would create a scenario where a fight happens per step of the player, the fight loads, then the enemy immediately dies, rinse wash and repeat. That should allow you to asses how the game performs after 100s of fights quickly.

    The idea here is to create tests that improve your signal to noise ratio. So you create a scenario that will create a large signal so that then you can more easily diagnose the performance issues.

  • godshatter 9 hours ago

    It can't be hardware, as others have noted these kinds of games have been working great on machines that are magnitudes slower than the OPs machine. Maybe it's some kind of search that is running linearly on an assumed small dataset and it gets bigger than imagined, instead of it running a binary search or something. Maybe some of the data is unreasonably large for what it contains and can't get cached as easily.

    And, as others have mentioned, if you really want to know, profile.

  • svnt 10 hours ago

    This is the future of troubleshooting: where did the LLM decide to introduce recursion based on calculation that draws on an otherwise unused global counter and a separate timer initiated at launch for absolutely no reason.

  • golem14 7 hours ago

    Isn’t the glaringly obvious problem Garbage Collection?

    I’d try digging into this first. Try to completely disable VC and see if there are any slowdowns before you run out of memory. Go from there.

    • golem14 4 hours ago

      Hah, keep disabling VC, but also disable GC.

  • whizzter 10 hours ago

    Sounds like the culprit though, could be tons of small objects added for effects or something that still don't show up in memory usage but adds iteration time?

magicmicah85 10 hours ago

Without downloading the exe (work laptop right now, can try later), have you followed the optimization suggestions in KAPLAY's guides?

https://kaplayjs.com/docs/guides/optimization/

Assuming it's capable of running in your browser, I'd suggest using chrome's dev profiling tools to help with finding the optimization areas. Based on feedback from everyone else, sounds like something is not cleaning up as the game keeps running.

  • beepbooptheory 2 hours ago

    Yes and it is extremely straightforward to find the right thing to look at profiling it: what does your `requestAnimationFrame` look like?

sionisrecur 10 hours ago

I'd suggest getting a SteamDeck and use it as the lower limit on performance. If it runs there, it will run everywhere else.

  • Narishma 7 hours ago

    Even a Steam Deck is overkill for a game like this. This is NES-levels of graphics.

    • sarchertech 2 hours ago

      The NES isn’t spinning up objects for every bullet on the screen or a million other ways a novice developer can blow up a GC.

    • WhyOhWhyQ 2 hours ago

      No this doesn't look like NES graphics at all. This is more like the SNES era.

lukan 9 hours ago

A bit offtopic, but if it would have been playable in the browser I would have tested it, but I don't want to download and install a (for me) random exe.

(and I don't see how performance could be an issue unless a major screw up, but like others have said, use a profiler. Sounds like memory leak from what was shared here)

mvkel 11 hours ago

> performance issues

What kind? It would be helpful to know what you're experiencing, attempts you've made to fix, etc.

Or is this a thinly veiled "I've been working on this for a while and it's taking longer than I thought and want some encouragement." Which is fine! It's a great thing to ask for.

xantronix 9 hours ago

Related to the initial poor performance of Electron on macOS Tahoe?

https://github.com/electron/electron/issues/48311

  • ceigey 9 hours ago

    That was my gut feeling too, or at least something Tahoe related. I reckon they’re using Gemshell based on the game icon, which they’ve also been talking about on their YouTube channel.

    On Gemshell’s store page (https://l0om.itch.io/gemshell) it seems they’re in turn using Neutralino JS, which should be using a Webview, like Tauri.

OhMeadhbh 2 hours ago

can confirm. very slow. here's the output I got on Debian 13 on an older i5, but it doesn't look like it's telling us very much.

   ./Small-RPG 
   libEGL warning: DRI2: failed to authenticate
   VMware: No 3D enabled (0, Success).
   libEGL warning: egl: failed to create dri2 screen
   VMware: No 3D enabled (0, Success).
   libEGL warning: egl: failed to create dri2 screen
   
   ** (WebKitWebProcess:2822): WARNING **: 14:52:20.184: The GStreamer FDK AAC plugin is missing, AAC playback is unlikely to work.
butz 9 hours ago

You can use developer tools in the browser to simulate slower CPU. Use performance profiling to find which functions are taking up the most time. Try switching to battery saving mode, it might throttle your CPU a bit too. If you really want to dive deep in performance improvements, you should purchase lowest end laptop with integrated GPU, if budget allows. And how about providing an embedded web version of your game, because downloading unsigned executables these days should be considered a no-no.

duttish 11 hours ago

Do you have a profiler at hand?

If you have a friend who is encountering the performance problems enable profiling report export and ask them to send that over to you. Hopefully that'll show you what is taking so many cycles.

balamatom 42 minutes ago

Not running a random "Linux build" (which is probably not going to find some lib anyway) - in 2025 the baseline should really be an AppImage.

jesse__ 10 hours ago

First off, yay for making games! I love working on games, and have spent many, many hours doing it, so welcome to the club :)

Second, let me introduce you to my good friend, the profiler. A profiler is an absolutely indispensable tool for making games. Find one that you like, and learn to wield it with laser-guided precision.

Generally, there are two things you want a good profiler to tell you about; execution speed, and memory. Finding a profiler that tells you about execution speed is pretty easy (basically all of them at least nominally do that), and finding one that also profiles memory (in a useful way) is somewhat harder. I'm not sure of the state of profilers for Javascript, but maybe the tool you're using (KAPLAY) has one built-in?

From my long-forgotten days of programming javascript, one thing you want to look out for (which is difficult to spot without a profiler), is creating memory leaks. Memory leaks in Javascript can be a double-edged sword; you're both using more memory than you should, and the garbage collector has more pressure on it. Over time, this can bring an application to a crawl as the GC spends more and more time traversing leaked objects.

Good luck friend. It's dangerous to go alone, take this :sword:

tithos 6 hours ago

You may want to add instructions to the game currently it is unplayable

casey2 an hour ago

Why not consult with industry professionals rather than random people on the internet? Gaming is a huge industry worth billions and have many people who have dedicated themselves to the craft. They not only can diagnosis common problems and future problems, but can help effectively change your processes, ultimately identify and solve these similar problems yourself. All for not that much money, you are in a good position to capture a bunch of value if you are serious.

calebjmatthews 11 hours ago

Just downloaded and tried it on my M1 Mac and the performance was what I'd expect for a game like this, both in and out of battle. Totally smooth and ~15% of CPU usage in both cases. By the way, I love the pixel art, and the gameplay has potential, it's a style I've never personally played before but I could see it being compelling.

  • JSLegendDev 8 hours ago

    Thanks for the feedback! Very much appreciated!

yomismoaqui 9 hours ago

Forget about performance, specially in a 2d game like this one. Focus on making it fun (really-really fun is possible).

I have played games that didn't performed so well because they were so fun. Games are about fun, anything else (narrative, performance, sound...) is secondary.

  • debo_ 9 hours ago

    If frames are dropping, it's likely not fun.

DeathArrow 9 hours ago

If it wasn't for Javascript, that kind of game should have been able to run on a 2Mhz 8086 and 640kb of RAM.

  • pqtyw 9 minutes ago

    If you can't get a simple game like that perform well even when written in JavaScript on a semi-modern PC you wouldn't be able to do it in any language. It's certainly not the issue.

  • o11c 8 hours ago

    Even with Javascript, there should only be a 10x performance penalty at worst, and getting to 2x penalty is feasible.

    We do need to scale based on screen size though - copying pixels around is expensive.

    But a low-end machine from 10 years ago should be mandated for all developers.

  • aleph_minus_one 9 hours ago

    PC was ridiculed for its bad graphics capabilities by fans of other home computers. Only over time PC's capabilities for graphics and video games improved piece by piece until after many years PC fans had the last laugh.

zyx321 8 hours ago

Intel i5-9350, UHD Graphics 620, Windows 11 v25H2

Completely unplayable. It runs fine at first, and then suddenly drops to below 1FPS for no discernible reason. This happens regardless whether I am on the world map or combat scene. I am running the exe, couldn't find the browser version.

On an unrelated note, I am surprised to see a JS program working without the usual 200MB NW.js runtime (as seen with RPG-MV)

VegaKH 10 hours ago

[flagged]

  • petercooper 10 hours ago

    This is absolutely fine for someone to request on their personal blog to a group of followers who may well be interested in the game and support the author. People have used their blogs for this sort of thing for decades.

  • recursive 6 hours ago

    It wasn't posted by the developer.

    • VegaKH 5 hours ago

      I didn't realize that this wasn't posted by the dev, and that it was only meant for his normal subscribers. So my criticism is a little harsh here.

  • thaumasiotes 2 hours ago

    > Here is the link to where you can download it, and also maybe, you know... PAY FOR IT?

    Why criticize someone for hosting their in-progress game on itch.io? That's... a completely normal thing to do.