Published on

Devlog #26 - Pink parade

Quests will be enabled in 24-48 hours. Life happens.


One huge advantage of browser app development is iteration time https://en.wikipedia.org/wiki/Iteration. In the context of programming, it's the time it takes to make a change and see the result. With this BabylonJS project when I hit ALT/CMD+S in VSCodium and ALT/CMD+TAB to Chrome, the project has already reloaded and I can already see the changes.

Compare that with Unity where every single time you make a change the entire project has to do a "Domain Reload" which is an unfortunate problem with the .NET runtime and Unity's core design.

Let's learn about the hell of Domain Reloading.

"Domain Reloading resets your scripting state, and is enabled by default. It provides you with a completely fresh scripting state, and resets all static fields and registered handlers each time you enter Play Mode. This means each time you enter Play Mode in the Unity Editor, your Project begins playing in a very similar way to when it first starts up in a build.

Domain Reloading takes time, and this time increases with the number and complexity of the scripts in your Project. When it takes a long time to enter Play Mode, it becomes harder to rapidly iterate on your Project. This is the reason Unity provides the option to turn off Domain Reloading."

https://docs.unity3d.com/Manual/DomainReloading.html

So not only is it slow, the iteration time increases with the amount of C# code in your project. This sounds like a trap. They have been trying to fix this for over a decade so I have little faith it will ever be fast.

They actually added the option to turn it off due to so many complaints but no one ever turns it off due to the side effects.

Here's one real world example:

https://www.reddit.com/r/Unity3D/comments/xcgaz2/reload_script_assemblies_taking_half_of_my_day/

That's just way too slow! Domain reload alone has cost millions of hours of dev time!

Looks like BabylonJS is already 10 years old. https://en.wikipedia.org/wiki/Babylon.js

Some guy made a voxel engine with BabylonJS and Mojang used it to port Minecraft Classic. That was 4 years ago. https://github.com/fenomas/noa https://classic.minecraft.net/

So the BabylonJS past and future looks very bright.

That being said... the BabylonJS team at Microsoft accepts code from the public... code like the SpriteMap. And since FO2 has to be pixel perfect everywhere, I've had to make many modifications to the SpriteMap that has uncovered a whole slew of bugs. I started my massive SpriteMap bug thread on the BabylonJS forums on May 18th and it's still going.

https://forum.babylonjs.com/t/scroll-a-spritemap/40955

I'm about a 5 out of 10 when it comes to fragment shader programming so this has been a rough journey for sure. The positive part is that the SpriteMap only uploads all textures once and then it renders completely on the gpu. An entire SpriteMap is only two triangles. That's pretty dang cool.

We have a new art domain/host at https://art.fantasyonline2.com/ and it's so awesome. I only have to set one header and I get all this caching goodness for free https://vercel.com/docs/concepts/edge-network/caching. It even works on function outputs which is amazing for the player sprite sheet composer. All art from GUI, to sprites, to icons, is all hosted and available from https://art.fantasyonline2.com/. So far the cost is negligible but we'll see if Vercel tries some kind of sneaky charging. https://news.ycombinator.com/item?id=35507814

Patreon continues to try to kill me but I'm hot on the trail of this mystery. Patron pledge create, upgrade, downgrade, delete are all covered. It seems Patreon decided to stop sending recurring subscription webhook posts to me! How dare they. It sucks but it's been fun to see all the new names on Discord in the #bugs forum. Most Patrons don't ever talk on Discord or in game! So in summary, I have added tons of debug code to try to find the cause of all this. Let's cross our fingers.

boshed was a boshed this week.

LighterThief did a lot of art I haven't been able to get in yet because I'm slow.

Pinkcrown has come on the scene with a quest bonanza.

I will make a post when quests are turned on. Not long now.

See you soon.

Have Fun & Keep Gaming!