Skip to content

Major refactoring#2

Open
fdch wants to merge 20 commits into
mainfrom
restructuring
Open

Major refactoring#2
fdch wants to merge 20 commits into
mainfrom
restructuring

Conversation

@fdch
Copy link
Copy Markdown
Collaborator

@fdch fdch commented May 13, 2026

I've decided to do a major restructuring of the code, so that we avoid code duplication and are able to make some improvements. The external is meant to be backwards compatible with the previous version (ie, one can still use [boids2d] or [boids3d] with the same interface --hopefully i did not miss anything). The main object now, however, is [boids], which can be configured to 2, 3 or other dimensions. Neighbors can be dynamically set to be any number of neighbors (not just 0-4, as before), and I'm planning to include more additions like different edge behaviors.

I've split the codebase with the object, the parameters (boids-params) and a vector utility (vec) that is meant to simplify things. It ended up, naturally, increasing the complexity as we now have more files that do different things. Anyhow, I think it is more practical as it is easier to debug. No tests though, unfortunately, as I'm not really sure how tests would look like on an external.

Next steps will be to test the CI pipeline and publish to deken. However, before this, I wanted to put this out there and maybe a generous soul can have a look at the code and maybe test it if they have time. I've added and modified examples, cleaned up help files, and I've also added a few nice abstractions to be shipped with the lib.

I've only tested on debian for now, but plan to work on the CI soon.

@fdch fdch requested a review from umlaeute May 13, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant