You are browsing as a guest. Sign up (or log in) to start making projects!

Fawy2010

@Fawy2010

Joined June 5th, 2026

  • 19Devlogs
  • 5Projects
  • 1Ships
  • 15Votes
Open comments for this post

2h 4m 32s logged

Devlog 4: The Parser works!! (Somewhat)

SO now i’ve managed to get the parser working, in fact the thing wrong was that for my main function I called it “Main” instead of “main”, so it couldn’t find it.
I also had the problem that after running it, it returns a pointer to a that isn’t the one it should be, which I think I fixed now?
So now I have the problem that the values aren’t correctly passed through the objects, meaning the logic doesn’t work the way it should.

0
0
2
Open comments for this post

2h 29m 34s logged

Devlog 3: First Parser attempt

So I tried making a parser, but it hasn’t worked yet, but I think that’s probably because I kind of confused myself again and again with my own decisions.
So now, I’ll try to improve my parser to a working state, and in the worst case, change my approach.

0
0
1
Open comments for this post

1h 17m 34s logged

Devlog 2: Having made the classes.

I have now create two classes that my parser will be able to use to turn the written code into something that can be executed.
For my parser I’m going to have it build a tree out of NAND objects, so that when the root is called, the entire tree gets executed recursively. The kind of parser I wanna use is called a recursive descent parser, which starts at the first symbol of the text and moves through it left to right, and ends at the last symbol.

So now I’m going to start working on the exact grammatical rules of NANDSpeak, so I can then start working on the parser and tokenizer.

0
0
1
Open comments for this post

27m 28s logged

Devlog 1: Starting a new project

So I decided to make a programming language, where instead of writing code, you write hardware, in the sense that you can only connect NAND gates with each other and a few Input and outputs, and that would be the entire language.
I will probably also make something that allows you to input stuff into your creation and get the output, maybe even let your write code to run on what you created?
We’ll see, I have just begun after all.

0
0
1
Ship

I made a particle simulator, where every particle has a color and interact with other particles based on color.
I found it to be challenging, to find out how exactly compute shaders and shaders as a whole work, because I had to figure out stuff like the communication between CPU and GPU and what the syntax of HLSL, the language shaders are written in, is.
But now I'm proud of the result, even I with an laptop using an integrated graphics card, can simulate up to 60'000 particles at once, at a decent speed.
But for the people that want to test out my project, I think the best way to experience it, is to just try out different stuff and see if you manage to get something that you like.

  • 11 devlogs
  • 46h
Try project → See source code →
Open comments for this post

1h 14m 28s logged

Devlog 11: Fixed a Bug & Finished README

The bug I mentioned in my last devlog, the one where I couldn’t understand why it only happens when a number is odd, I still don’t understand it, but I managed to fix it.
In the shader I use for rendering, I used fmod(InstanceID, colorCount) for finding out what color a particle is, but in my compute shader i do it like this InstanceID % colorCount, and apparently those do something different with the same int input? I don’t know.

But now it’s fixed, and I added a Demo video to my README.
So now I can finally ship this.

0
0
7
Open comments for this post

7h 31m 54s logged

Devlog 10: Writing a README & finding bugs

So, I now pretty much have finished writing my README, only thing missing is a demo video, but before I can add that, I’ll have to fix a bug.
Because apparently when you input a odd number as the amount of colors, the values in the matrixes are not the one of the color shown, but of the color 1 to the left/up? But only for odd numbers, even numbers work fine?

But anyway, I also added a FPS counter to the simulation.
So now I’ll go to either try find out why that bug happens, or just add something that makes the bug invisible.

0
0
7
Open comments for this post

3h 7m 27s logged

Devlog 9: Input Validation & Bug Fixing

Knowing that I know my code to well, I gave a working version of it to my sister, to watch her try it, and see if there’s anything somebody could do, that isn’t really intended.
And it turns out there is!
It seems quite obvious now, but one thing you could do, but weren’t supposed to, was inputting any values you want, which is fine if you know what you’re doing, but most probably you won’t, so I had to add Input validation.
In some places it was more important than in others, because your GPU really doesn’t like it if you define a buffer with a negative size, which happend if you inputted a negative amount of particles.
I also cleaned up the files a bit, by taking all unused files, and putting them in a folder called… “Unused”, really clever name choice, isn’t it?

So now, I get to prepare for Shipping my project, although I’m not really looking forward to writing the README yet.

0
0
28
Open comments for this post

8h 5m 1s logged

Devlog 8: Matrix editing & Camera Movement

So I know I said in Devlog 7, I would only polish some stuff and get ready to ship, but I just couldn’t not add the ability to edit the Matrixes and move the Camera, the first of the two, I was able to do with the help the GridLayout Component, which automatically arranges all it’s children in a grid. I did that by dynamically adding an UI input Element for each Value in the Matrix, and putting in the corresponding Value. And now, you can change the values of each Cell, and when you’re finished, you can hit apply, and now you’ve changed the behaviour of the particles, yay!

Getting the Camera to zoom and move in a way I like, was really hard, probably because I was kind of tired, or maybe because I’m just stupid, who knows. But anyway, I’m using Unitys Input System to geth mouse movements and scrolling, so that I can then read out the value of those in my Script.
The zooming is works like this:

Zoom += Zoom * (ScrollValue/10);
CameraSize = OriginalCameraSize * Zoom

And the camera movement works by turning the mouse position an the screen into a position in the World Space, and multiplying it wiht the suqre of zoom, so that the movement gets slower and slower when you zoom in.

There is even more to it than this, but it would be a pretty long Devlog if I explained everything, so I guess next time I shouldn’t wait 8h to write a Devlog. (:

0
0
7
Open comments for this post

6h 0m 12s logged

Devlog 7: Adding a UI

I finally did it, I added an UI to it, it doesn’t include everything I wanted, but it doesn’t have to be perfect, especially seeing as Unity thought it had to nuke half my work an the UI, just as I wanted to save it, that was quite annoying.
But now you can control pretty much everything except the stuff that you can’t through the UI, like the amount of particles to simulate, some range values, physics variables, and of course the color of the particles.
So now I probably just need to polish some stuff and get everything ready to be shipped, and then I’ll probably ship it, we’ll see.

0
0
6
Open comments for this post

9h 7m 39s logged

Devlog 6: Compute Shaders!

So I know the next thing, and only thing left, on my To-Do list, as seen in my last Devlog, was to add an GUI/interface, but I wanted to improve on how many particles you can simulate at once, so I researched how shaders and compute shader work, and made one that could do everything my C# script could do too, but faster, as compute shaders run on the GPU, which is really good at doing things in parallel.
But it wasn’t easy, as I had no idea how both shaders and compute shaders work, and I still don’t really know how shaders work, but atleast I know how compute shaders work now.
But getting to this point, where it finally works, took me the entire day, with having to do research and having to keep trying new stuff to find something that works, but I think it was worth it.
But I was kind of too lazzy to implement a BitonicMergeSort to sort using the GPU, so I took that code from https://github.com/SebLague/Fluid-Sim, and slightly altered it, so it would work for me.

So now, I’ll just have to add an GUI or something like that, adjust some stuff, (like changing it so the particles don’t spawn in a symmetric grid, or particles don’t spawning inside other particles anymore), and clean everything up, and then I’d probably be ready ship it for the first time, depending on whether I wanna add more stuff first or not.

0
0
5
Open comments for this post

3h 12m 35s logged

Devlog 5: Speed up thanks to Spatial Partitioning

So now I’ve done it, the next thing on my To-Do list is completed, as seen in my last Devlog, it was to Optimize and Improve calculations, and I did that, mostly by implementing Spatial Partitioning.
How it works is that, if there is only a certain range around an particle, in this case the MaxRange, you can pretty much ignore everything outside of this range when calculating attraction, instead of having to check the distance to each particle, and getting the same result. To do that you split the area where the particles can be into squares(Cells) with length of MaxRange, and then assinging each particle a key, which you get like this:
key = someHashFunction(CellPos.x, CellPos.y) % ParticleAmount
And then with some sorting and such, you can calculate the attractions, only the Cell the particles in, and the 8 cells around it.

This was somewhat simplified, but I hope one could understand it.

And in the video below, you can see me simulating 4000 particles, at roughly 10 fps, which might not sound like a lot, but compared to before, where simulating 2000 particles resulted in about 5 fps, it certainly is.

To-Do:

  • Add interaction based on color and distance.
  • Optimize and Improve calculations.
  • Add an GUI / Interface
0
0
10
Open comments for this post

3h 30m 59s logged

Devlog 4: Getting to a working version

Like mentioned in my last Devlog, one thing I had to do was adding interaction based on color and distance, and hurray! I did both!
So I did it by having an array of floats, which contains the attraction matrix, but flattend, and did the same for the distance values, basically like this:
array[i + j * width] = matrix[i][j]
I also made a function that based on a minRange and maxRange around a particle calculates it’s attraction to other particles, if it’s closer than minRange, it gets pushed away, otherwise if it’s closer than maxRange, it gets attracted or repelled based on the attraction matrix.
I made it so instead of using Time.deltaTime it now uses a fixed value that you can change, and added friction, so the particles, making the particles alot more stable than they’d be otherwise.

So now, I’d have a usable version of Particle Life, but as you can see my To-Do list isn’t quite finished yet.
To-Do:

  • Add interaction based on color and distance.
  • Optimize and Improve calculations.
  • Add an GUI / Interface
0
0
7
Open comments for this post

1h 47m 45s logged

Devlog 3: Implemented some stuff

In Devlog 2 I wrote down what I planned to do next, and now I’ve done it.
I added an adjustable border that when crossed moves the particles back inside, and makes them bounce of by inverting their velocity, but dampening it a bit.
Then I made it so whenever you start, it arranges the amount of particles you choose in a grid, in the middle of the border, with adjustable spacing between the particles.
Then I made it so you can chose however many colors you want, and the colors will be equaly distributed to all the particles. I did this by basically doing this:
particleColor[i] = colorList[i % colorList.length]
Where the colorList[] is made up from the colors you input in the inspector.

To-Do:

  • Add interaction based on color and distance.
  • Optimize and Improve calculations.
  • Add an GUI / Interface
0
0
33
Open comments for this post

1h 12m 38s logged

Devlog 2: Changing my approach

I have now decided to not have each particle be a GameObject, but instead handle all of them from 1 Script that stores each particles position and velocity, to then calculate interactions and draw them. Right now I’m doing the drawing using Graphics.RenderMesh() for each individual particle, and I can already have them be attracted or repelled by each other.

What I plan on doing next:

  • Add a border, so the particles don’t escape.
  • Make it so the particles starting positions are spread out.
  • Add the possibility for particles to have different colors.
1
0
20
Open comments for this post

1h 32m 10s logged

Devlog 1: Starting my Project

So first I had to set up my Unity project, link it to a GitHub repo, and then installed HackaTime to track the time I work in Unity.
So I wanna create something based on Particle Life, but with a few changes and twists.
So up until now, I have already made a Script that gets all colliders in a certain range around the GameObject it’s attached to, by using Physics2D.OverlapCircleAll(), and then calculates and applies a certain force into the direction of that other Collider, by using RigidBody2D.AddForce().
But right now, they still act the same towards all other particles, not just those of the same color.
And now, I have also come to the conclusion that I will have to think about whether I wanna do this Project using the GPU for the calculations, or not, because I’ve realized that only using the CPU might not have the greatest performance, but the way I’m currently doing stuff, probably won’t work for a compute shader.

0
0
10
Open comments for this post

54m 13s logged

Devlog 4: Making the case for my Hackpad

So today I have finally begun the case for my CelePad, but I kind of made it more difficult for myself than I had to, because I just had to measure everything before I could be happy with it, and even then I still doubted whether everything was right or not.
But no I’ve done it, and the only thing left is the firmware and decorative stuff.

0
0
1
Open comments for this post

1h 31m 25s logged

Devlog 3: Fixing the wrong key matrix to be right.

Having to go back to your schematic and change stuff and the also needing to update the PCB to fit it, is certainly annoying, but I hope it is right this time, because I do not wanna have to do that again.
Because as someone kindly pointed out in the comments of my first Devlog, the diodes in my matrix wiring were wrong, so I fixed that, but then having to reroute my PCB to be correct too, as mentioned already, was annoying.
I also encountered the problem of having closed the website that directs you to the Lookout app, so at first i had no idea why my time wasn’t syncing, luckily I managed to find the right Site in my browser history.

0
0
13
Open comments for this post

3h 53m 53s logged

Devlog 2: Designing the PCB layout, and learning about LED’s

Designing a PCB for the first time is interesting to say the least, especially when you don’t yet know what excactly it is going to look like.
I experienced some difficulty getting everything into a position I liked and then routing the traces in a way I liked and that I thougt made sense.
I decided to do the LEDs last as I had no idea where to put them exactly, but by doing so I then had the problem that when I finally did do it, it messed up the already existing traces, so I had to redo some of them.
But before I finally put the LEDs where they are now, I first had to find out where exactly to put them, cause how are you supposed to know they are supposed to be put directly underneath the key switches?

0
0
34
Open comments for this post

2h 26m 13s logged

I’ve created the Schematic for my macropad, and began making the PCB.
At first I had difficulties understanding KiCad and Lapse, but it ended up working out.
At first I also had no Idea what exactly i wanted to create with my macropad, but I found that one out quickly enough.

2
0
122

Followers

Loading…