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

5h 47m 20s logged

I know it doesn’t look like much, but this represents a lot or work and progress.

I spent almost 6 hours to refactor my code to use a much cleaner ownership system that should completely prevent memory leaks and have much better separation of the static parts of simulation vs. parts that area ctually getting simulated.

In a nutshell, what I did was make two classes, Layout and Simulation. Layout always exists and is the thing that is drawn on screen. Layout doesn’t have any cars or moving stuff and you can edit layout. When you start a simulation a NEW simulation object is created with all the cars which can simulated it. The clean split makes it a lot easier to know everything and edit/save stuff which might be usefull later.

I had to do a lot of changing and if you look at the git commit basically every file was modified, but now the architecture is much cleaner.

Next, I’ll work on adding the Simulate button and making a new window show up with the cars to simulate it.

0
43

Comments 0

No comments yet. Be the first!