Tuesday, December 22, 2020
Plethora of Bugs
Merry Christmas! I bet you are reading this post to read about my progress on PlumeriaSC 4. The truth is that this whole month has been a bug nightmare. My philosophy has always been that when I write code I fix any bugs I find right away. Even if I decide not to use the code later. The reason I do this is that it becomes harder to track down other bugs in the code that I might discover later. PlumeriaSC 3 has come a long way from when it was supposed to be released in December 2015 (nine months from the real release).There were some great ideas but creating objects and tasks was crazy. It used no tables so everything had to use popover buttons or number sliders. I realized that there were some great ideas but tables were going to be essential. In July 2016 I finally released PlumeriaSC 3 with my first game named Wacky Ball. The physics engine was falling apart so Wacky Ball was the perfect name for it. PlumeriaSC 3 was so crippled back then that there was no way to make even a pong game. The rest is history. PlumeriaSC 3 went on to not only have a working physics engine but some really nice games too (including an Apple Pong game).
Monday, November 9, 2020
1 Trillion Dollars
FYI Solar Fusion Software's website is sweet sixteen years old this year. Also, PlumeriaSC 4 is still in development and coming along well.
While I was searching the internet for inspiration I rediscovered an interesting article that stated that in 2016 a study of the largest companies in the world spent over 1 Trillion Dollars fixing bugs in software code. Rest assured PlumeriaSC 4 is being designed to stop bugs just like PlumeriaSC 3 and more. To show how easy it is to write bugs in software this last year I have used well over 50 percent of my development time rewriting code to fix bugs. The upside to this is that it has made me think of more creative ways to build the interface and write the code behind it.
Finally I have written about putting AI in PlumeriaSC before. This time Neural Networks look like something that would work out well for PlumeriaSC’s roadmap. I think it is safe to say the PlumeriaSC 3 interface is not going away anytime soon especially since it can encapsulate Machine Learning so well. Hopefully, you will see some of it in the months to come.
Monday, June 1, 2020
PlumeriaSC 4
I hope the title of this post got you excited! PlumeriaSC 4 just passed milestone 2. Work started about a year and a half ago and I have had two or three major rewrites. Yep, I have had to rewrite over 90% of the code two or three times for a pure JavaScript application. The last rewrite was probably the worst because I had one task to go and everything fell apart. Along the way I created my own architecture named CURE which greatly reduced bugs. I first tried the CURE paradigm with Galactic Space Junk Arena. Around that same time PlumeriaSC 4 started falling apart on me again so I tried it. It worked wonders on the stability of PlumeriaSC 4 and I have been using ever since. Probably the coolest thing I have learned recently is signed distance field font images (WebGL calls them textures). Pretty much you can use an image with a little pixel shader magic (again WebGL calls them fragment shaders) and it will be pixel perfect no matter how much you zoom into the image. You may remember I talked about Order Independent Transparency in an older post. I thought the computationally expensive OIT was the only way to get good looking characters with an image. Probably five years ago I had seen the original article on the SDF font technique but it never really explained the shader code. Here's the article that finally explained the shader code: Techniques for Rendering Text with WebGL
Below is an example of the shader code. The secret is using the "step" and "discard" functions in the fragment shader to get the pixel perfect look.
Vertex Shader Code:
attribute vec3 a_Vertices;
attribute vec2 a_TexCoords;
uniform mat4 u_ModelViewMatrix;
uniform mat4 u_ProjectionMatrix;
varying vec2 v_TexCoord;
void main()
{
v_TexCoord = a_TexCoords;
vec4 position = u_ModelViewMatrix * vec4(a_Vertices, 1.0);
gl_Position = u_ProjectionMatrix * position;
}
Fragment Shader Code:
uniform sampler2D u_Sampler;
varying vec2 v_TexCoord;
void main()
{
// This can be any channel color (RGB) since we are using a grayscale texture
float red = step(0.5, texture2D(u_Sampler, v_TexCoord).r);
if (red == 0.0)
{
discard;
}
gl_FragColor = vec4(0.5);
}
Below is an example of the shader code. The secret is using the "step" and "discard" functions in the fragment shader to get the pixel perfect look.
Vertex Shader Code:
attribute vec3 a_Vertices;
attribute vec2 a_TexCoords;
uniform mat4 u_ModelViewMatrix;
uniform mat4 u_ProjectionMatrix;
varying vec2 v_TexCoord;
void main()
{
v_TexCoord = a_TexCoords;
vec4 position = u_ModelViewMatrix * vec4(a_Vertices, 1.0);
gl_Position = u_ProjectionMatrix * position;
}
Fragment Shader Code:
uniform sampler2D u_Sampler;
varying vec2 v_TexCoord;
void main()
{
// This can be any channel color (RGB) since we are using a grayscale texture
float red = step(0.5, texture2D(u_Sampler, v_TexCoord).r);
if (red == 0.0)
{
discard;
}
gl_FragColor = vec4(0.5);
}
Monday, February 17, 2020
SFS Extreme Makeover
Yep, that's right Solar Fusion Software's website now has a modern look and feel. It's amazing to think that this is version 7.0 for our website. Also if you are a mobile user want no more because we are now using a responsive first layout with Bootstrap 4. Now everything should look stupendous even on a smart phone.
Subscribe to:
Posts (Atom)