You can play my entry here https://alexswan.info/js13k-2023/ You can enable debug mode by using this link
And the source on GitHub
I’ve noticed that after only a couple minutes of hanging out in this area, especially in VR, the framerate tanks and input gets laggy. I would love some help figuring out what I’ve done to make it go bad so quickly.
I’m preparing this entry for the js13kgames.com game jam, so there’s a few hacks in there to keep the source code small, like everything is built out of primitive shapes and textures from html canvas elements.
Since this is a puzzle game, I’ll let you try it out yourself if you wish. For quick access to the second area, use debug mode above or use the code: 3 5 4
The most apparent issue is the statue over the water in VR mode. After solving a puzzle or two the statue will spin. It seems that each eye is seeing a different orientation of the statue. I had originally thought it was because the eyes weren’t rendering fast enough to display the same position. I realize that I am animating it with a registerBeforeRender event. Is registerBeforeRender
called once for each eye, making my eyes see two different frames in its animation?
There’s a few things that might be worth looking at:
Banner.ts - This is a waving banner that updates the vertices of a Plane every frame with a sine wave based on the Date.now(). Is calling Date.now()
going to affect performance, or invoking the sine function of an ever increasing number start taking more and more time?
Animation.ts - I set up my own animations so I could say where I wanted a mesh and when and had it do the lerping for me. I filter out animations when they’re done and only have one registerBeforeRender function that handles all animations, so I don’t think this would be the source of a memory leak, but if anyone sees something weird there I’d love to know.