Activity

e

[Click to play the video, which shows a full demonstration of the changes!] Added even more documentation, fixed bugs involving player/camera/viewport, made camera position an integer and added better interpolation handling, improved logger handling for vectors, and simplified TypeScript logic! Also made the build script more robust. Wireframe rendering is also a bit prettier. :)


I also learned how to set up global keyboard shortcuts for VSCode (see second image), which is nice. Since Zig often requires you to do a lot of casting, these will probably save me a lot of time in the long run! Now, I plan to work on making sure that chunk generation is correct in the other corners of the map and making sure the fractal architecture actually works before moving on to making a ModificationStore (which stores whenever the player modifies a block).

Attachment
0
e

[Click on video to play!] Worked on smoother, cleaner camera movement that’s similar to Celeste, and added custom debug logging methods. You can now render text directly to any of the 4 corners of the screen!

===

Also changed build.zig logic to be more performant and only write to enum data if important files were actually changed. This has…improved build times by about ~600ms…and took me an hour. But at least it’s significantly faster!

0
e

Added a few new sprites, improved rendering, completely redesigned chunk system, fixed bugs and issues, made constant use more consistent, and also various misc changes. Changed a BUNCH of logic behind the scenes and fixed some bugs, I’ll add it to the README once it’s fully finished! Progress has started getting significantly faster :)

Attachment
0
e

Revamped chunk generation is coming along slowly, going to make more assets over time! Started working on a planning drawing with Excalidraw in Obsidian and looked into what others have made.
Turns out, there’s surprisingly little on the concept that I have, which is mainly water-focused and uses fairly repeating 16x16 textures. Only time will tell if that concept turns into reality successfully!

I’ll probably have to change the way I’m drawing with Aseprite [not included in Hackatime], currently I’m just messing with the filters and I should probably find a more robust way to do things, while using a color palette. Considering the mushrooms took me about 3 minutes it’s probably not as daunting as I thought to restrict to ~8-12 colors per sprite.

Attachment
Attachment
0
e

Started working on procedural generation! (Yes, it looks super weird right now, but I’ll need to actually start making sprites).

Attachment
0
e

Did some misc things! Improved rendering, switching to OKLAB and better constants for rendering, and removed zig build test in favor of robust native testing.

Attachment
0
e

Added some more block types to make testing nicer! Also added documentation on how to build the project.

Attachment
Attachment
0
e

I finally got rendering working (it was due to a sprite ID bug and operations that clamped to edge in WebGPU)! I’ve also added wireframes for debugging. Now, I can start implementing the chunk cache logic :D

Attachment
0
e

Camera panning is now smooth [see video] with friction! Also started designing the datatype and system that will and looked at how WebGPU works (not counted in time). Currently working on a new Chunk algorithm. Basically, I’m currently working on an implementation (hence the broken sprites) where chunks are 16x16. The most difficult part is passing this data to TypeScript as I’ve already finished the datatypes.
@@@@@
See the second attachment for my current updated plan. After I’m done with that part of the plan, I’ll probably start working on some sprites and ask others for advice.
It turns out that making your own game engine with low-level languages is quite hard 😭

Attachment
1

Comments

e
e 11 days ago

(The specific bug here turned out to be that the sprites’ coordinates were going into the hundreds of thousands because I had initialized the sprite IDs wrong in Zig. It was very weird visually with all the y-axis stripes though!)

e

Made a bunch of changes, below:


Batch 1: Fixed native builds and build location, changed ColorRGBA to use vector internally
Batch 2: Worked on Vite build, changed JS/TS spacing to 4, added WGSL minifier
Batch 3: Added seeding options, fixed Vite more, fixed color_rgba, added more types to start sending keyboard data, actually fixed ColorRGBA
Batch 4: Added robust player and keyboard logic, in-place scratch buffer reallocation, connected tick() code between WASM and JS, better type generation


Basically, the way the keyboard logic (inputManager.ts) works is it maps multiple keys (such as W, Space, Up all to “up”) to one direction. It also has an advanced system for Simultaneous Opposing Cardinal Directions. If you press LEFT, then RIGHT, then lift RIGHT but LEFT is still held down the LEFT key remains. This code also does all of that with advanced bitmasking to get sent to Zig.


For the scratch buffer logic, I have a run_scratch_allocation_tests() function that tests scratch buffer expansion strategies in zig/memory.zig. The scratch buffer starts off at 256KiB but may in-place memory copy, saving precious WASM memory resources. I’ll never have to worry about data transfer again.


I also finally got camera panning working in the final version! (Not really a screenshot, so not shown in attachment). Attachments show:

  1. the log of keyboard bits (which are powers of two) working per-frame
  2. a screen-shot of the (dynamically generated!) enums.ts code on the left, which is starting to really pay off; it generates the memory addresses automatically between Zig and TypeScript! quite proud of this one
  3. my notes in Obsidian (great app for planning!)

Since the camera logic works and base logic is set in-stone, I’ve learned a LOT about Zig, how to make an actually robust program, and can hopefully enjoy the documentation I set for myself later on. (This is more fun than just using Godot/Unity, right??)

Attachment
Attachment
Attachment
0
e

Removed optimized float mode (as it’s not needed for this game), added proper buffer string reading/writing, changed seeding algorithm, improved enum auto-generation, and did a bunch of other changes!

From the first attachment, you can now see that there are plenty of new properties, including more exports! I should be able to implement the command system fairly easily by just giving some data for SCRATCH_INFO_VIEW through an enum.
The second attachment shows the dynamically generated enum file from Zig! Zig is awesome :)

Attachment
Attachment
0
e

Made comments more consistent, fixed Zig export location, made zoom property and added aspect ratio enforcement! As you can see from the image, the Canvas is now “logically” 480x270 but shaders still work with higher resolutions and factor in devicePixelRatio.
Should be able to start working on implementing a command buffer to communicate between TypeScript and Zig, camera, drawing test player, and having Zig generate some test tile data next.

Attachment
0
e

Worked on getting WGSL working and planned out my next steps for this project! (See second attachment)

Attachment
Attachment
0
e

Shipped this project!

Hours: 26.06
Cookies: 🍪 559
Multiplier: 26.59 cookies/hr

Finally finished this iteration of RuntimeFS! Although StreamSaver was too complicated to implement in time, I’m still really happy that I managed to make some behind-the-scenes improvements.

Hoping the idea of a localhost in the browser is super interesting and practical, I’ve probably used this project for well over 50-100 hours to program and play games :D

e

Fixed some issues where the UI would sporadically break that had been bothering me for a while now. Project should finally be stable enough.

Shown in screenshot: also learned PvZ Gardendless works on Chromium now and started playing it a lot! There’s a lot of peak things you can easily do with RuntimeFS.

Attachment
0
e

Added more functions and started working on memory management! Really getting the hang of Zig now, gonna tackle getting to know WebGPU well next :)

Attachment
0
e

Finally finished getting Zig to properly log things with stack traces, and got the hang of what I’m doing :D (Yes, this took 5 hours.)
Trying an approach with this project where everything is clearly documented to minimize technical debt. It’s now time for me to implement pixel art rendering with BMP files!

Attachment
0
e

Performed even more fixes and added a new clearData feature to LittleExport! Also got rid of onsuccess entirely in favor of…just returning the blob from await? (Not sure how I didn’t think of that lol)

Next I’ll hopefully be able to start working on implementing StreamSaver to LittleExport to allow non-Chromium browsers to still export large amounts of data (and not be stuck with just being able to import).

Attachment
0
e

Just applied even more changes; now the logs from outputting are finally fully fixed with no funny numbers! Also fixed some edge cases in LittleExport. I think this project might finally be fully complete :D

[Attached: README shows just how many options there are with LittleExport!]

Attachment
0
e

Added a bunch of new stuff!

  • LittleExport now uses PAX (still USTAR) to allow for huge file sizes and unlimited file name sizes
  • Fixed more RAM-consuming issues
  • Improved performance of CBOR for importing/exporting by using custom cbor-x flags
  • Made file uploading better and faster
  • Made logs and errors more consistent across the codebase
  • Fixed a few crashes

Attached image shows a small portion of the in-house result of unsafeObjectToReadableJS, an optional new way to “encode” instead of using CBOR. It literally converts a complex JS object into an async function string generator, while supporting many sophisticated types.
This makes data such as from IndexedDB much more readable; see documentation here: https://github.com/plasma4/LittleExport

Attachment
0
e

Shipped this project!

Hours: 7.11
Cookies: 🍪 54
Multiplier: 7.54 cookies/hr

Worked on a bunch of stuff to clean up the homepage and fixed some of the older games I have on my site. :)

e

First devlog for Magix :D
Basically, fixed a few bugs involving certain trial Seraphins being inaccurate, resolved a mod loading bug among other things (https://github.com/plasma4/magix-fix/issues/18), fixed a bug where pressing Use Magix twice would break things and removed some old logic.

Not included in dev time, but I had some communication with the rest of our small dev team on next steps.

Attached image: did you know this project has documentation? Yeah! Check it out at https://github.com/plasma4/magix-fix/blob/main/DOCS.md (there’s so much the Basics alone take up most of the screenshot lol)

Attachment
0
e

So much new stuff!
I redesigned the homepage, made sure Cloudflare Fonts was working, and started work on some incomplete (yet-to-be-published) blogs. Also figured out how to get Prism working, which renders code, and made the blog look better by capping the width of the text. (The blog will primarily focus on programming-related topics!)

Note: since I’m using submodules, a significant chunk of the commits were at this link: http://github.com/plasma4/my-site

You can see what I specifically did with the clock game here: https://galaxy.click/play/315
Attached is the sneak-peek to the new blog post I’m making. Hopefully it’ll be done soon; also planning another one :)

Attachment
0
e

A few small cleanup changes here and there; MB is now 1000000 instead of 2^20, added per-file logging, and fixed a few sources of crashes.

[Attached image: you can explore the exported data and even upload files from the rfs/ folder back into RuntimeFS! This acts as a cheeky way to let you mess around with files and extract lost data. Exporting data effectively acts as a snapshot back in time, and it’s really interesting to see all the local data you’ve built up over time.]

Attachment
0
e

Shipped this project!

Hours: 10.74
Cookies: 🍪 34
Multiplier: 3.2 cookies/hr

Fixed all the bugs (hopefully) that plagued the codebase, and made LittleExport easier to use with better documentation. Overall quite happy with how the project looks. Hardest challenge was figuring out the bugs by far, but I’m happy that I could make a practical and niche project that others might be able to use!

e

The features work now, and everything is quite performant! I think I’m basically done with the project. See the LittleExport repo at https://github.com/plasma4/LittleExport

Uploaded is an example of what you can do with RuntimeFS; I got terraria-wasm working with custom headers.

Attachment
0
e

Just fixed some issues with performance when importing a large .enc file in the GBs! Now, it’s time for me to tackle recursive crawling for LittleExport. The idea is to allow users of LittleExport, one of the components of RuntimeFS, to be able to more specifically choose what to export, all in a performant and unified manner.
Image attached shows the basic gist of things.

I’ll eventually add this to RuntimeFS to allow users to choose what to export (and maybe import), live with the async functionality, and also object presets to allow people to “export” their previous choices. This way, I don’t have to send 3GBs of data of my Terraria-WASM and other games every single time!

Attachment
1

Comments

jmw
jmw about 2 months ago

this seems really cool!

small note: on voting, the banner is cropped to a square for some reason, so the nice image you made mostly won’t show up there. do with this information whatever you want. also again, looks quite good!

e

Fixed drag-and-drop and made errors more consistent (so now they’ll use the same logging system, and will all reset the UI).

Attachment
0
e

Did a bunch of stuff!
Changed UI to use a more chill blue-ish theme to be easier on the eyes
Improved performance of a bunch of things, like exporting, importing, adding new folders
Fixed a bunch of failing edge cases
Documentation is a little more clear now
Also added hiding of non-supported buttons for some browsers and added a new feature to the plugin tool to clear the cache directly

Attachment
0
e

Shipped this project!

Hours: 3.49
Cookies: 🍪 100
Multiplier: 28.54 cookies/hr

Fixed a bunch of bugs and also improved performance of RuntimeFS, which I’ve worked on previously. Hopefully the last update necessary!

e

Just fixed a few edge case bugs with the code, improved performance, and cleaned up the code in general. No longer crashes when exporting!

Also made regex replacement MUCH easier for scripts by adding a custom {{SCRIPT}} text option, which automatically inserts at intelligently at the start of head, body, or HTML.

Attachment
0
e
  • Made a simple homepage to show my projects
  • Got my page published on Cloudflare and made image for my /projects page (not included in devlog time)
  • Worked on polishing up some button issues in the Simulation miniproject
  • Polished up some issues and fixed some CORS headers weirdness on FractalSky
    Next I’ll probably improve the projects page some more or add a ServiceWorker for sustained offline functionality.
Attachment
0