2022 status check on my open source projects

I'm the big boss of open source projects on GitHub. This will be a short update what's going on with them - and what should be going on. 

When I started open source my projects I had no idea how fun it would be to see when people are using them - and learning from them. My goal is that my code should by as easy as possible for the users to understand by writing super clear code and comments because there's nothing worse than trying to understand code without clear comments. I wrote a book on a guy called Elon Musk, and I read somewhere that authors are the best at commenting code because they know how to express themselves clearly. And express yourself clearly is what you need when explaining code controlling for example path planning for self-driving cars.

I shall list all projects in order of popularity defined as how many stars each project has. A better way is to maybe define popularity as number of forks, but not all of them have any forks, so I will stick to number of stars.

Unity Programming (Design) Patterns. 704 stars. A few years ago I needed to learn how to structure a larger Unity project. A way to accomplish that is to learn your so called "patterns" - because they help you to structure your code. It will still take some time to understand what the code you wrote one year ago is doing, but it will be easier. Some people hate design patterns! I think they should be used when you need them, when they make your life easier, and not when they make your life more complicated. So far, two people other than me have contributed to the project by fixing bugs and adding alternative versions of a few design patterns. TODO: 

  • Add more practical examples showing how some programming patterns can be used. I've added some made up examples - not how I actually used the patterns in a real project. 
Computational Geometry Unity Library. 553 stars. This library consists of a various collection of algorithms, such as Delaunay triangulation, originating from a series of tutorials I wrote on the subject. The main problem you will encounter when coding computational geometry is EDGE CASES. How will you find all edge cases? The answer is that you will not! So to find more edge cases, I open sourced the library so users can find edge cases for me! This is working. Someone helped me find a bug in the constrained delaunay triangulation which I had missed. TODO: 

  • I have started implementing a mesh cutting algorithm, which isn't finished because it is slow and I got stuck trying to figure out how to make it faster. Maybe I can use DOTS? 
  • There are also a series of algorithms I want to implement.
  • Users have found more edge cases I have to fix. 
Self Driving Vehicle. 160 stars. This is one of the more popular libraries if you also take number of forks into account. The original plan was to build as much as possible of a self-driving car - but self-driving cars are complicated (we don't even have them yet - just attempts to make them), so the library consists of path planning for vehicles within an area of like 100x100 m. What I learned last year is that Tesla Motors is using something similar which they showed in one of their annual "AI Day" presentations. TODO:

  • Refactor code to make it less complicated to understand.
  • Try to make it less memory intensive. 
  • Add reversing for vehicles with one or several trailers attached to them. I have downloaded several reports on the topic. It turns out there's no simple solution to the problem, so it will take some time to implement. 

Unity Ballistics Tutorial. 41 stars. Unity has a built-in physics engine, but it turns out it is limited if you want to make something more realistic, like shooting bullets. Then you have to build your own physics engine, which is actually kinda simple when you know how - but not everyone know how so I wrote a tutorial on the topic. TODO:

  • I want to implement automatic aiming. With simple ballistics you can easily calculate the angle you need to hit a target. But if you add factors like wind, it will become more complicated. I think you can used gradient descent to solve this problem!
Unity Boat Physics Tutorial. 31 stars. I originally thought this project would be more popular because thousands of people have watched my YouTube video showing it off. This was the first Unity tutorial I wrote. From that tutorial I learned that it is a very annoying process to update the tutorial as you improve your code. So the plan with the Unity tutorials is to provide a working solution to the problem - but maybe not the most efficient solution. If you want the most efficient solution, go and download the open source code. Providing downloadable code will also prevent you from having to reply to people who have problems implementing your tutorials. TODO:

  • I haven't touched this code in several years, so I should upgrade it to latest Unity version.
  • I want to solve the problem of water wakes which I think people solve by using a render texture.
  • I want to learn how to make a more realistic water that also connects with the code used by the boat physics. The problem is that the GPU is updating the water and the CPU is updating the physics. The physics needs to know the water height at a certain coordinate, and I haven't found a solution for that yet because the CPU and GPU are not friends.  

Unity Rope Tutorial. 27 stars. Ropes and cables in games are difficult to make, and there are multiple ways to do them. But ropes are something you need to learn how to implement because when you know your ropes you can also make cloth, which is just connected ropes in a triangular pattern. TODO: 

  • In Tesla Simulator I have added Superchargers - but you can't use the Supercharges to charge your car only because I have no idea how move the cable in a realistic way. I don't think anyone else knows either because there's a reason you never see moving cables in games and the only rope you see are grappling hooks, which is just a straight line so they are easy to make.  

Select units within rectangle. 18 stars. When playing strategy games you drag with your mouse to select multiple units. I replicated this in a tutorial because the solution is simple when you find it. TODO:

  • Someone complained that when you scale the UI to different screen sizes, the rectangle gets distorted. I think the solution to that problem is to not scale the rectangle?  

Unity Custom Tools Tutorial. 9 stars. Custom tools are something you develop when Unity's editor is not providing for the needs you have. TODO:

  •  Tools are made to fit your needs so I don't think I need to fix something. 

Unity Stuff on grid Tutorial. 9 stars. When playing management games you snap building parts to the grid when constructing a house - this is what this tutorial is all about. TODO:

  • I recall that someone had an idea to simplify some calculations, so I should investigate that. 

Unity Tornado Simulator. 8 stars. No one has ever made a tornado game, so I thought I would give it a try. So I made a tornado but couldn't come up with a game idea around it. Anyway I learned a lot when making the tornado, including volumetric clouds interacting with the tornado. People on YouTube loved it, but for some reason I never open sourced the implementation even though it was just collecting dust on my hard drive. But this year I decided to open source it! TODO:

  • The tornado is basically using particles. There's a bug somewhere that shrinks the tornado as it changes direction, and sometimes you can also see particles spawn at the wrong place. A better implementation would maybe be to use some kind of fixed mesh and some scrolling textures...
Unity Control systems Tutorial. 7 stars. Control systems is how you make a quadcopter fly, and a Segway not tipping over, and they are also used in self-driving cars. This is a project I want to really update because control systems are kinda tricky and not popular around Internet, so I should find a market niche. TODO:

  • The quadcopter needs an update to make it more accurate to how an actual quadcopter is working. Hint: add more PID controllers.
  • The PID controller needs an update with some knowledge I gained when adding a PID controller in another project.  
  • Instead of a PID controller you can use a sliding-mode controller. I want to implement one of those and compare it with the PID controller. 

Earthquake Simulator in Unity. 1 star. Many years ago I experienced a smaller earthquake in Greece. But earthquakes from distance are not that exciting to look at, which is why the project is not that popular. But it's still interesting to learn how to simulate how buildings shake in an earthquake from a knowledge point-of-view. The code behind the Tornado project is a modified version of this project.   

Malik Bendjelloul's Speech. 0 stars. You can put other projects on GitHub than just code. I added a translation of a Swedish radio show where Malik Bendjelloul, who was the director of the documentary film "Searching for Sugar Man," talks about his life, future projects, and creativity. I recently added this project - it used to be a part of my portfolio but I realized it didn't really fit in there anymore, so I moved it to GitHub. TODO:

  • I think the speech is very inspirational so I need to do some marketing to make it more popular. Searching for Sugar Man won an Oscar so I think an English speaking audience would enjoy it - I don't think the information is available elsewhere. 
I also have a few other very old open-source projects. I planned to delete them but they might as well continue to live on in case someone needs them!     

Comments