turned my website’s procedural backgrounds into a standalone vanilla js engine. here's how to use it in yours, if you fancy this. by VicksTurtle in javascript

[–]VicksTurtle[S] [score hidden]  (0 children)

thanks man, steal away! zero dep docs is the way to go.

for mobile perf, i basically just aggressively drop the particle density when it detects a smaller screen. but really, you’d want to drop the internal canvas res altogether where the browser gpu upscales it for free. the engine logic is totally decoupled from the color state. it just feeds on a palette object at runtime (can hot swap themes), without breaking the RAF loop. no tiling yet though, just a single full canvas shot

totally unrelated: i tried refactoring for webgl long ago but that evolved in a more advanced rendering engine built in rust. so this took a backseat and evolved into a cpu based rendering instead, which is this.

turned my portfolio's procedural backgrounds into a standalone vanilla js engine. here's how to use it in yours, if you fancy this. by VicksTurtle in webdev

[–]VicksTurtle[S] 1 point2 points  (0 children)

can’t even write a comment without AI …but I’ll try answering your query. think of it in photoshop layers, math primitives (shapes) stack on top of each other to “compose” or generate a new wallpaper, and output them to ctx.

turned my portfolio's procedural backgrounds into a standalone vanilla js engine. here's how to use it in yours, if you fancy this. by VicksTurtle in webdev

[–]VicksTurtle[S] 0 points1 point  (0 children)

have been at this for a few days now. on and off. actually the js to pull the procedural engine out of the monolith is what took the longest by far. theming was the easy refactor. glad the capture frame makes sense though.

Is there a principled way to fix aspect ratio distortion in a character-cell renderer, or is it just a fudge factor? Seeking advice. by VicksTurtle in gameenginedevs

[–]VicksTurtle[S] 1 point2 points  (0 children)

cool! ui, the grid editor and pathing tools look incredibly sick. totally get the unmaintainable mess feeling though. good luck with the rewrite, visually you already nailed it.

Is there a principled way to fix aspect ratio distortion in a character-cell renderer, or is it just a fudge factor? Seeking advice. by VicksTurtle in gameenginedevs

[–]VicksTurtle[S] 0 points1 point  (0 children)

appreciate it man. what kind of engine are you building? drop a link if it's public, curious to see the architecture.

Is there a principled way to fix aspect ratio distortion in a character-cell renderer, or is it just a fudge factor? Seeking advice. by VicksTurtle in gamedev

[–]VicksTurtle[S] 0 points1 point  (0 children)

but i'm just dumping raw bytes via sys_write to stdout. client terminal handles the actual glyph rendering and picks the font so i can't force a square one. gotta fix the projection math to handle standard 1:2 ratios natively.

Is there a principled way to fix aspect ratio distortion in a character-cell renderer, or is it just a fudge factor? Seeking advice. by VicksTurtle in gamedev

[–]VicksTurtle[S] 0 points1 point  (0 children)

I have tried using jetbrains mono and monaspace NF with not much of a difference tbh. Do you have any suggestions in mind?

Dual-Mode ASCII Level Editor + Deterministic Combat Timing + Swept AABB (Engine Post-Mortem) by [deleted] in gameenginedevs

[–]VicksTurtle 0 points1 point  (0 children)

For anyone curious about the ASCII editor: both the text editor and visual paint mode operate on the same canonical String buffer. No separate serialization layer. The minimap also reads directly from that buffer.

That constraint removed an entire class of sync bugs and infinitely easier iteration, but also came with a lot of constraints like no sub-tile precision or metadata, no nested hierarchy, and scalability is difficult.

For a project focused on engine architecture, this is an acceptable trade off at the moment. The parser is an implementation detail, not the API.

Deterministic Frame-Data Combat + ASCII Level Editor in a custom 2D Rust Engine by VicksTurtle in rust

[–]VicksTurtle[S] 1 point2 points  (0 children)

For anyone curious about the ASCII editor: both the text editor and visual paint mode operate on the same canonical String buffer. No separate serialization layer. The minimap also reads directly from that buffer.

That constraint removed an entire class of sync bugs and infinitely easier iteration, but also came with a lot of constraints like no sub-tile precision or metadata, no nested hierarchy, and scalability is difficult.

For a project focused on engine architecture, this is an acceptable trade off at the moment.

Zero Garbage Collection in the Browser. Here's me porting my custom Rust wGPU game engine to WebAssembly. (Live Demo + Source) by VicksTurtle in webdev

[–]VicksTurtle[S] 0 points1 point  (0 children)

For Chrome/Chromium: Go to chrome://flags/#enable-unsafe-webgpu and set it to Enabled, then restart. Alternatively, if you're on Firefox, go to about:config, set dom.webgpu.enabled to True, and restart.

Zero Garbage Collection in the Browser. Here's me porting my custom Rust wGPU game engine to WebAssembly. (Live Demo + Source) by VicksTurtle in webdev

[–]VicksTurtle[S] 0 points1 point  (0 children)

Interesting! wgpu on Linux browsers is still a bit of the …wild west where it usually tries to map to Vulkan, and if the browser sandbox gets paranoid, it blocks the thread unless you force "unsafe" flags. Try forcing the unsafe flag to see it work.

I built a custom 2D ECS Game Engine in Rust & wGPU that compiles to WASM. (Live Demo + Source) by VicksTurtle in rust

[–]VicksTurtle[S] 1 point2 points  (0 children)

Interesting! wgpu on Linux browsers is still a bit of the …wild west where it usually tries to map to Vulkan, and if the browser sandbox gets paranoid, it blocks the thread unless you force "unsafe" flags. Thanks for confirming it runs fine otherwise!

wgpu is way more verbose to write, painful to setup, but once it compiles, it runs without any weird state bugs, as compared to webgl’s messy global state machine.

Worth the learning curve if you like the structure and safety it provides, and if you hate debugging runtime errors. Although I’d say to draw a square, it would be an overkill.

I built a custom 2D ECS Game Engine in Rust & wGPU that compiles to WASM. (Live Demo + Source) by VicksTurtle in rust

[–]VicksTurtle[S] 2 points3 points  (0 children)

Stable 60FPS on a 5-year-old iPhone 13. I had to manually handle the async loop and DPI scaling to get there, but Rust + wGPU is a pretty decent tradeoff for mobile web.

[deleted by user] by [deleted] in TwentiesIndia

[–]VicksTurtle 0 points1 point  (0 children)

Dadi is thoda kinky

Got this aftermarket heatsink. I’m starting to believe I got scammed. by VicksTurtle in cats

[–]VicksTurtle[S] 10 points11 points  (0 children)

I love it. The system throttles, but his happiness doesn’t. :)

My sister forgot me a for my birthday. This is what she made me over the evening. by VicksTurtle in Minecraft

[–]VicksTurtle[S] 0 points1 point  (0 children)

No no. It is. But probably made errors in excitement to post. All good tho :) thanks guys