December Adventure! Link to heading

2024 Link to heading

This is a cool tradition/idea that you can read more about here.

SUN MON TUE WED THU FRI SAT
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

Goals? Ideas? Link to heading

  • Finish my UXN implementation
  • Paritcipate in 7DFPS
  • Render at least one SDF with SDL_gpu
  • Draw a bit
  • (Maybe) Figure out how to properly host RSS on this site?
  • (Maybe) Post some of my audio collages here?
  • Write more (like catch up with my side projects here)!
  • (Maybe) Write some Swift?
  • (Maybe) Write some Ocaml?

1 Link to heading

Because Thanksgiving isn’t a holiday in Germany, this was the day we actually celebrated with some friends here. It was great. I did manage to stub out unit tests for the UXN opcodes to guide my implementation and keep me on course. And earlier in the morning I had a helpful conversation/guided explanation with Devine regarding the proper semantics of the stack at the heart of UXN. At which point my unit tests all passed.

It is always interesting to stumble on something you thought was very straight forward. In my case it was the whole thing where you can PUSH/POP a byte or a short, but at the end of the day the stack is just a ring buffer of bytes.


2 Link to heading

Today I began implementing unit tests for my UXN opcodes that have already been implemented. I decided as well that I’d embark upon the remainder of this process in a TDD fashion. I’m not a big proponent of tests for the sake of tests, yet this is one of those specific activities where framing everything in tests makes perfect sense because you’re working against a specification.

As I sit here and plod along, it’s funny to wonder why exactly I’m even doing this in C# other than “Because I’ve been enjoying learning C# lately”. But the entire motivation was to embed UXN into the roguelike I keep day dreaming about. Having multiple little computers living in the world and being programmable is super interesting to me and hopefully it will be to others as well.


3 Link to heading

Ok… I have 20 opcodes remaining for the core UXN implementation…

But instead I started the day getting salty about Rust and Cargo. :( The problem with that is two-fold: a) I can’t change anything b) instead of finding joy and creativity I get lost in a sour outlook and end up not making things. So, to hell with that.

Back to the good stuff. I’m finding that rather than writing tests and opcodes hand in hand, I’m doing a little of one and then the other. Some opcodes are simply defined, so the implementation goes quick now. The proper setup of a test will be more work so I’m trying to optimize my ADHD proclivities.

Decided to install OPAM / Ocaml today

I created the public repo for uxn-sharp.

Status at the end of the day:

Test summary: total: 258, failed: 151, succeeded: 103, skipped: 4, duration: 0.6s

4 Link to heading

Implemented all opcodes, only a handful of tests remain now.

Test summary: total: 258, failed: 32, succeeded: 222, skipped: 4, duration: 0.6s

5 Link to heading

All tests finally implemented. Now there is a solid foundation to develop the various “devices” of the VM. To start the goal is only to develop what is needed to build uxncli.

Test summary: total: 258, failed: 0, succeeded: 258, skipped: 0, duration: 0.7s

6 Link to heading

Today marks the beginning of 7dfps! I want to make something tiny but interesting to make. I’m not holding myself to any expectation of building a fun game or anything. I mostly want to explore the interaction and renderer because I can’t realistically do much else in 7 days (and even this is a stretch I think).

Art style? I dunno. Hand drawn 3D sprites/billboards probably. World will likely just be blocks, but I have imagined taking the quake bsp loader from Celeste64 (or delve engine) to build some stuff. Delver is an inspiration here. My ideal scenario would be to make a version of Brogue rendered in the style of Delver.

I’ll be starting by just making a copy of SMVC in it’s current state.

Grabbed the latest state of Cosmonauts GGJ2024 and got a bit lost in the weeds trying to massage the environment into a shape where it would work. I fully intended to spend the morning getting my uxncli to run hello world instead… :facepalm:

And by hacking it together ever so slightly, I managed to acheive “hello world” with my nascent uxncli.

/home/chipc/workspaces/slowgames/depot/dotnet/uxn/uxncli/bin/Debug/net9.0/uxncli hello.rom
==== UXN /sharp/ ====
hello
5

Process finished with exit code 0.

7 Link to heading

Not much today. A bit of tinkering with my 7dfps project, as well as with uxn-sharp.


8 Link to heading

Switching into 7fps mode! … except I didn’t really. Today was Bohdi Day and I sorta just did other stuff like read, listen to music, cooked, and kept the fire going in the fireplace.

There were some minor things done in my personal repo. I moved my UXN stuff to it’s own repo finally, and I noticed and plugged up a memory leak in SMVC. My plan is to essentially copy SMVC whole hog into a 7dfps project. There might be better or quicker ideas but :shrug:


9 Link to heading

Some thoughts this morning about what I might realistically expect to be able to do for 7dfps. Essentially, I’d work out a “simple” type of “dungeon walker” akin to Etrian Odyssey. Quite possibly, I’d make a tilemap in Aseprite and build a map by mapping a tile id to some geometry.

The geometry would start simply (cubes, planes, sprites). The lighting would be … no lighting or maybe just a phong headlight or something.

But what could I do? Battle, collect, explore? I have no good ideas. Everything beyond walking and looking requires some amount of work I’m not sure I have the bandwidth for.

If I acheieve any of that before the week is over then I’d see about stretching it.

I had hoped to have an empty window to show here, but moonlibs aren’t being loaded. So tomorrow it will be.


10 Link to heading

AH HA! I figured out the issue with the moonlibs dll config not being read. Moonworks wasn’t using it when you build with AOT…

So yeah, today the goal is to load a glb file which I’ve created in Blender. The gist of the process will be adapting my TileSprite stuff from SMVC based on what I see Celeste64 doing…

What I got done is a lot of nice reimplementations, factoring common items into shared libraries. Nothing much to see otherwise.

Still listening to Indricothere - Extruded Nonlocality Immersion.


11 Link to heading

No progress that one would describe as a game. But so much progress in terms of getting a better idea about organizing a MoonWorks game/application.

I have imgui now factored into a shared library, and I’m “drawing” my floor tile mesh in so far as it’s all wrong but something is getting rendered however poorly and vulkan doesn’t report any errors.

screenshot

The issue here was two-fold. 1) I was specifying the wrong shape of vertex attributes. 2) The model was exported +Y-up

But boy oh boy I feel really good about how things are moving, no matter the outcome of the jam, this is easily a template for some future work.

Anyway, here are my results:

screenshot screenshot

Due to some late meetings, I had a bit of time for a stretch goal and got shader hot reloading working :D


12 Link to heading

Hopped downstairs to start figuring out some stuff.. and got sidetracked fixing SDL_shadercross with a 1-liner that let’s you get the error output from dxc when loading hlsl shaders. The PR is here.

So back to “slops”… (I really really need a better name). The lighting is wrong bad. I’m not going for anything complicated. Just the basic gourad stuff with vertex colors.

But instead I lost the day to Linux desktop issues and just losing my entire sense of direction and motivation.

I did manage to play some guitar.


13 Link to heading

Spent some time this morning refactoring all the sprawling places I was creating rendering related stuff. I walked back any vain attempt and building “systems” here and just decided to focus on “modes”. The “gameplay mode” is where that whole rendering related stuff is going to go because that’s just a thing.

Meanwhile I got rendering to texture working during all of this. I’m just using the high level gpu blit stuff for the moment but I’ll setup a proper pipeline later because I want full screen effects like a CRT shader and some chromatic abberation.

Now I have instanced tile/mesh rendering working but I have some jank when switching back and forth between game modes. (lighting is also still broken/unimplemented)

screenshot

(OK figured out that my issues with transfer buffers was just more misunderstandings surrounding the resource uploader)

My final act of the day was to attempt player input. Finally something fun. I’m out of time though, it doesn’t work at all yet.


14 Link to heading

Took the day off.


15 Link to heading

Well… this is it. The last day of 7dfps. I know that technically you are encouraged to make submissions until whenever you feel like it or finally get done. Perhaps even stretching the definition of “7 days” into “The moment when the actual amount of time you could spend on it was about 7 days”. But not really. It’s a very cool and laid back situation.

In either case, I’m at this place where I could get an Etrian Odyssey movement working, but I felt pretty inspired by my little tiled floor screenshot to go in a direction like Hyperdemon or Devil Daggers. Much simpler. Pay respects to a couple of really cool games where the simplicitly celebrates skill and practice.

No matter what, it’s clear that this is about as close to done as I’ll get for now.


16 Link to heading

Well, I took the extra day to actually make sure my 7dfps was indeed an fps by getting the player controller working.

And I added a gradient to the background to add some visual weight.

screenshot


17 Link to heading

So my stick inputs are following the “scaled radial deadzone” pattern described in the venerable post here. Towards the end they mention an advanced version of this called the “bowtie”. I sorta intended to implement that as well as fix the case where the the magnitude of the move input exceeds 1.0.

But I didn’t. Instead I worked on static meshes.

screenshot

For each set of meshes rendered I have a single instance buffer and I just use an offset into that when making draw calls.

This very cool model is by Adrian Marcastel.


18 Link to heading

Boy howdy. So I want the demons to follow me and turn to face me but there are a lot of issues with how I have managed to do that.

My plan was to try and drive the steering of the demons by using acos(dot(forward, target)) to get the delta angle needed to turn by. This seems ok, but I keep getting flips as you can see in this video.


19 Link to heading

Today was a bit less focused. I tidied up the steering and made it smoother. I no longer use the gap angle but instead just use the dot product with the perpendicular axis to determine how to adjust the yaw.

What I realized later was that the rage of values of the dot product with the forward vector would only be [0, 1] unless I’m behind the demon. This means that I’m only ever steering in the positive rotation direction and thereby getting these flips.

By using the dot product with the axis perpendicular to the forward vector the range of values would instead be from [-1, 1]. This then allows me to have proper steering left and right. (No more Zoolander demons).

By ignoring the gap angle, I instead set a maximum turn speed multiplied by the dot product and added to the current yaw.

I also stopped trying to perform a full yaw-pitch-roll using euler angles and instantly learned that I was experiencing gimbal lock. heh

You can see the results in this video.


20 Link to heading

Took the day off! Went to the christmas market. Got my covid booster shot.


21 Link to heading


22 Link to heading


23 Link to heading


24 Link to heading


25 Link to heading


26 Link to heading


27 Link to heading


28 Link to heading


29 Link to heading


30 Link to heading


31 Link to heading