Hacker News new | past | comments | ask | show | jobs | submit | more TrevorSundberg's comments login

Fixed: https://github.com/raverie-us/raverie-engine/commit/aa7e1b6c...

Had to take into account the mouse coordinates too since they were not scaled.


Why does a WASM > NES translator actually sound fun to write...


I'll for sure list issues there. I also need to move the docs from here:

https://github.com/zeroengineteam/ZeroDocs/blob/master/getti...


That's something you'll have to code up yourself, however to get you started this script checks for pressing the W key and moves forward:

https://pastebin.com/8kMTCu3Y


Hugely helpful, thanks! I really did give it a few minutes and look for docs/examples before asking. I promise!


Also hopefully these docs can be of use. They're a bit of a mess as they were never properly ported to GitHub wiki: https://github.com/zeroengineteam/ZeroDocs/blob/master/getti...


The transfer of image data only happens when we yield inside the engine which only occurs when you hit a breakpoint in script. Otherwise we're just rendering to the OffscreenCanvas and letting the normal flow blit it to the screen (not doing any copying).

I just did some profiling on Firefox and I feel like the profiling result doesn't quite make sense but it's saying that the majority of time is spent calling Performance.now() from the clock calls in C++. I'm wondering if that's because we're calling it too many times and maybe we should just call it once per frame.


FWIW my poor performance is in Chrome on Apple Silicon not Firefox.


Really want this to be a great learning tool!


To be honest I haven't spent much time in Unity. Back in the day you either had to parent objects to the camera to make UI, or use a completely different UI system. It sounds like now Unity scenes can be overlaid on top of each other, is that correct?


Yes, multiple Unity scenes can be loaded at the same time overlaying each other. Physics can optionally be local to a single scene too.

You also don't need to parent objects to the camera for UI. Not sure how it used to be in the past.


I'd be curious if it runs any better under Chrome. Seems a lot of people are hitting Firefox issues. I'll be sure to test Firefox regularly though.


Because of these questions, I have now downloaded and tried:

Firefox Developer (119.0b1), Chrome (117.0.5938.92), Opera (102.0.4880.56), Edge (117.0.2045.43).

Turning off all other programs (without crashing Windows), ranking for trying to drag the selection square ~2 inches x 2 inches (on a 1920 x 1080 laptop with the above noted characteristics) without doing anything else. Did the drag back and forth TL-BR, BL-TR 5-6 times to get a feel for general timing (cannot claim I used a stopwatch):

Edge: ~1 sec response before square changes

Chrome: ~1.5 sec response before square changes

Opera: ~1.5 sec response before square changes

Firefox: ~2 sec response before square changes

From my super low-end perspective, Edge is surprisingly responsive (maybe optimized for Windows?)

Edit: From another perspective, looking at the Dev Tools (what I actually care about), Edge is pretty hilarious, it has 72 errors on its default landing page (including this is not a "TrustedScriptURL"). Opera only has 2 "Uncaught (in promise)" and both Google and Firefox have 0.

There's something comforting about the idea that Microsoft still does not trust Microsoft. ("Left hand meet right hand. Begone fool, we have no hands!") The more things change...


It was completely unusable on my M1 MacBook on Chrome, I suspect it's hitting some degenerate webgl/driver edge case.


Strange, was super responsive on my m1 MacBook Pro under Firefox.


Interesting. M1 Pro Macbook Pro (14" 2021) w/ Firefox, massive lag - to the point rotating the view is unbearable.

For the dev, FF 117.0.1 on macos 13.4.


Same here on M2 MacBook Air.


AFAIK, Firefox has all around awful webgl and webgpu performance.

I know personally, anything 3d in Firefox is a slideshow, even with a 4090


It's running quite well here on Firefox in Fedora 38 with a AMD Radeon 6700 XT.


I have an AMD 6700xt.

It was laggy in Windows and under X11 on linux, but under Wayland I get 60-80fps and it's very usable.

Not sure what the cause is

EDIT: Under Chromium (compiled from AUR) the performance is roughly the same


Works fine for me running Firefox in Windows with a 3090. Also already have Unreal open on another screen. So lots of my GPU memory is already being eaten up.


In Firefox on a 12th-gen Framework i5-1240P, Fedora 38, integrated graphics at 2256x1504, it works and looks fine for me.


If you hit space bar to bring up the command selector and hit Edit In Game, you should get a view that shows you all the debug draw, gizmos, etc. Hopefully this answers what you're referring to.


oh wow that's perfect! In fact, this does something a little extra I wish Unity could do - because I can play the edit scene and game scene side by side, I can modify experimental properties at runtime, then copy+paste them into the edit scene on the fly (in Unity it's a lot of copy+paste into notepad, stopping the game and hoping you didn't forget anything and pasting back in).

Thanks Trevor!


I really yearn for this myself. I would love to see a “pure wasm” browser where the pages are just wasm and the “browser” just provides a bunch of platform imports like WASI. I agree with you though, seems like it’s not a priority for them. One of these days…


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: