28 January, 2024

52 Pickup: The First Four

Weeks 1-4 have been an interesting ride.  My progress has been slower than I expected, but that is because I am understanding more than I thought I would and am making what I think now are significant improvements to software I haven't really touched in two or three years.

I often hear veteran programmers say that they don't recognise their old work when the look back on it, and find ways to improve or rewrite it that their younger selves couldn't have grasped.

I want to be extremely clear that I never have been and am not now "a programmer" and I have literally not touched a single line of code either professionally or as a hobby in the years since I paused my roguelike tutorial work.

I'm not sure where this new insight is from, except possibly from hibernating on it and waking up with new ideas.

Another ambition that I have is that I could use this software framework to build a simple game on for this year's 7 Day Roguelike game jam.  It is the 20th anniversary of the jam, which is amazing to me, and would be my first time entering it.

I think this is super-outlandish given my proficiency level, but I'm trying my best to get this ready for it.  I have about a month to go.

For my regular weekly activities, I have been cataloguing my progress over on the r/roguelikedev Sharing Saturday threads, and will summarise here:


Week 1

Cleaned up a bunch of old repos. Cloned my 2022 RL tutorial code-along project and started to refactor some of the systems to use a common composition model.

Week 2

Definitely still "baby learns to code" time.  Some things I was struggling with two years ago finally clicked and I was able to clean up some pretty fundamental stuff with modules.

Next week hoping to improve how I was handling render order / layers.

Week 3

I hoped to implement rendering layers this week, but I discovered that the pattern I implemented last week to compose my display didn't work as well as I thought it did, and I had to roll it back to a more monolithic design.

It is still a lot tidier than it was originally, so I'm happy with how it is going, but I also remembered that I don't actually know how asynchronous JS works and the external asset loaders I had put in were totally bodged placeholders and I really need to fix it before I build anything else on top of it.

Next week: figuring out WTF ever promises are, I guess.

Week 4

Second week in a row of failing to implement display layers, but I did manage to get the basic setup of the canvas and rendering context working in a way that I both understand and am happy with.

I was able to majorly improve how fonts (and potentially any assets) are loaded, and I have the beginnings of an understanding of how promises work. I've been doing rudimentary JS noodling for years, but have always just copied code for async functions whenever I needed them, without really understanding what was going on.

Now I have at least a tenuous grasp on the call stack and job queue and have at least half an idea of what is going on there.

I also put the foundation down for scene composition, and I think that will be really useful if it comes together how I hope.

Next week: Using the scene composition system to finally render a multi-layer display

No comments:

Post a Comment