We are now at the final stage. When looking for a detour in the direction blocked by the map boundary and failing to find one, the program attempts exploration on the opposite side. It's getting very close to being complete.
25 karma · joined September 30, 2024
We are now at the final stage. When looking for a detour in the direction blocked by the map boundary and failing to find one, the program attempts exploration on the opposite side. It's getting very close to being complete.
Is the final HTML and JavaScript code generated clean and without unnecessary bloat? As always, minimizing the resources that a first-time visitor has to download is one of my main goals as well.
P.S. Are you a web front-end specialist?
I'll definitely need to take a proper look at the solutions you mentioned this time. I also remember Konva being very useful in the past. Thank you for the detailed and kind response.
I really like TypeScript as well. In fact, the back-end of this project is developed with .NET 8.0, and since TypeScript gives off a similar vibe to C#, I genuinely enjoy using it.
I've already made the web front-end open source: https://github.com/Farer/breathingworld_client_web
Even though I’m using Vanilla JavaScript for personal preference and to minimize performance issues, I’ve also been concerned about potential challenges when collaborating with others in the future. I’m currently looking for collaborators, but it hasn’t been easy. Honestly, I might be going against the trend, but that’s a possibility I’m aware of.
But when it comes to web front-end development, I often feel that frameworks and libraries shift too much focus away from actual development, making you worry about things that aren’t really necessary. After all, JavaScript in browsers isn’t compiled like other languages. The main thing that reduces loading times is using cache, right?
I also agree that optimizing the canvas for GPU usage is something that definitely requires more research. Since I plan to add more plants and animals, it will be crucial moving forward.
Thanks again for your valuable input!
Actually, when zooming in or out quickly, there’s a momentary effect where what was previously rendered lingers for a bit. I don't see this as a major issue, considering it aligns with the concept of eventual consistency.
Also, what exactly is the large-scale solution you mentioned? Regarding the movement of the rabbits’ coordinates, it might not appear smooth when zoomed in significantly. This isn't necessarily a performance issue but rather something related to how the animals' coordinates are processed. I plan to improve that part in the future.
Anyway, thanks for your interest. I'll definitely consider your feedback!
On the server side, you can compensate with better server specifications and resources, but with web front-end development, it's essential to ensure compatibility across various browsers while using minimal resources. This is how you can provide the best possible experience to the largest number of people.
Of course, if you want to avoid relying on other solutions, it's true that you need to be very familiar and experienced with Vanilla JavaScript.
As a side note, I was never really fond of jQuery, even when it first came out, and it ended up becoming almost obsolete. Lately, I'm also not entirely happy with the direction React and Next.js are heading. It could just be because I've grown so accustomed to Vanilla JavaScript.
I also want to mention that the map size is 245,760 x 138,240, which is exactly 128 times 1920 x 1080. I’ve managed to make that enormous map, along with the data for hundreds of thousands of weeds and countless rabbits, run smoothly without issues. It even works perfectly on mobile phones.
If I get the chance, I'll integrate Kafka and set up servers abroad.
You can find the client-side source code here on GitHub: https://github.com/Farer/breathingworld_client_web
Feel free to reach out, share feedback, or ask questions. Let’s build something exciting together!