Nodules: Free Form Programmable Runtime .NET Compilation of C# 3D Scripts in Unity 6.x (2024)
Etymology: Root nodules are found on the roots of plants, primarily legumes, that form a symbiosis with nitrogen-fixing bacteria.[1] Under nitrogen-limiting conditions, capable plants form a symbiotic relationship with a host-specific strain of bacteria known as rhizobia.[2] This process has evolved multiple times within the legumes, as well as in other species found within the Rosid clade.[3] Legume crops include beans, peas, and soybeans.
Free Form programmable Nodules are software and cloud Containers programming/encapsulating an incomplete ensemble of smaller and lesser numbered source files coined as ‘scripts’.?
Rather than formal software/system integrations with more complex add-ons, scripting allows users to create and produce interactively without doing 'software development'. Indeed they can 'write a small block of code or script' as part of the application, and the engine can dynamically execute that interactively created code.
Free Form Nodules originally resides in several cloud systems and already accepting scripts multiple programming languages. Upon request by human users or system events, Nodules Stream into the target remote application binaries.
Nodules form a microcosm of short-lived applications in the target, with minimal software design, software support and engineering with focus on the required application with competent web services.?
All these are possible thanks to Dynamic Code Compilation also known as Runtime Compilation by Runtime Compilers.?
Process
Items 2-4 are completely implemented in Nodules and apropos of? item 5 unless surgical use of its methods used the reuse of the methods can easily be accomplished by more end-users? or custom Free Form grammars could easily reduce such labor.
Steps 1-2 are parts of the Serialization while steps 3-4 are parts of the Deserialization.
Free Form Augmentation!
Free Form Programming Language is used for all aspects of the Nodules in order to reduce the customary use of tiresome and bulky software engineering tools which take a life of their own!?
“I just want to write some C# classes to animate something, I do not want to become a .Net guru!"
While all end-users are brothers yet not all are equal! Depending on well known factors each end-user programs machines differently. In order to free the end-users from the daunting task of becoming professional competent software engineers, the Free Form Programming Language was designed as a super high level programming language to reduce the repetitive machination of the commercial programming and their IDE environments.
A Simple Nodule
C# classes in a Nodule are divided into two categories:
References: classes are called/referenced by other classes
Classes: standalone classes uncalled by others
Simple Class
C# class
using UnityEngine;
public class Example2 : MonoBehaviour
{
void Start ()
{
}
void Update()
{
GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube);
go.GetComponent<MeshRenderer>().materials[0].color = Color.red;
SpinLocal spin=go.AddComponent<SpinLocal>();
spin.yspin=3f;
Rigidbody rb =go.AddComponent<Rigidbody>();
rb.useGravity = false;
}
}
Class as text in Json
{
"text":"using UnityEngine; \r\n\r\npublic class Example2 : MonoBehaviour \r\n{ \r\n\r\n\r\nvoid Start ()\r\n { \r\n\r\n} \r\n\r\n\r\nvoid Update() \r\n{ \r\n GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube); \r\n\r\n go.GetComponent<MeshRenderer>().materials[0].color = Color.red;\r\n SpinLocal spin=go.AddComponent<SpinLocal>(); \r\n spin.yspin=3f; \r\n Rigidbody rb =go.AddComponent<Rigidbody>(); \r\n\r\n \r\n rb.useGravity = false; \r\n\r\n} \r\n\r\n\r\n} \r\n",
"class_name":"Example2"
}
Simple Reference
C# class
using UnityEngine;
public class SpinLocal : MonoBehaviour
{
public float xspin;
public float yspin;
public float zspin;
void Start()
{
}
void FixedUpdate()
{
transform.Rotate(xspin, yspin, zspin, Space.Self);
}
}
Class as text in Json
{
"text":"using UnityEngine;\r\n\r\npublic class SpinLocal : MonoBehaviour\r\n{\r\n public float xspin;\r\n public float yspin;\r\n public float zspin;\r\n\r\n \r\n void Start()\r\n {\r\n\r\n }\r\n\r\n\r\n void FixedUpdate()\r\n {\r\n transform.Rotate(xspin, yspin, zspin, Space.Self);\r\n }\r\n}\r\n",
"class_name":"SpinLocal"
}
领英推荐
Simple Free Form Script
In order to avoid tedious dependency tools and know-how, simple list structures programmed in Free Form language are in place building the final container for the Nodule which holds all the assemblies during the runtime.?
We can easily and effectively develop more sophisticated such containers as the usage cases expand with our clients and end-users.?
references's type is rerference;
references's list = {'SpinLocal};
classes's type set to class;
classes's list set as {'Example1, 'Example2};
save as hahaha;
Note: No limitation in sizes of the scripts nor in their number!
Construct: The Binary
Construct is a Unity application with additional software for Json streaming in and out of itself to communicate with multiple cloud systems which are required to support the Nodules containers and their contents and applications.?
If the Nodule a) found and b) can be compiled at runtime then the scene is changed to a new one where the application starts.
Binary is available for limited distribution, please contact the author for details.
Free Form Editor
Free Form Editor is available for limited distribution, please contact the author for details.
Example: 'hahaha' Nodule
The references and classes's assembly container was saved as a Nodule called 'hahaha'. This where the Nodule is formed and configured identified.
references's type is rerference;
references's list = {'SpinLocal};
classes's type set to class;
classes's list set as {'Example1, 'Example2};
save as hahaha;
During the runtime session the Free Form scripts could externally be edited and streamed into the running Nodule with no difficulty.
Simple examples below were easily obtained by minor changes to the classes C# code and where streamed and compiled in the Nodule container without stopping the running application.?
Click on image to view the video
Click on image to view the video
Click on image to view the video
To Be Continued ...
Next Issue: 29th of May 2024
Free Form Programming Language
9 个月Each week we shall add some more ope source C# code to Nodules empowering the Free Form programmers to create impressive applications; we like to introduce them widely to benefit the creators.? For example, we are scheduled to release Enemy AI C# classes to allow any Free Form programmers to enjoy deploying autonomous walkers. Swarming or crowd algorithms to name a few.? First, we need to release some Cinemachine 3.x Nodules for procedural runtime creation of advanced camera systems.? Second, add the code for instantiating a Player with its own Daemons :)? Be Free! Be Free Former!
Designer at Darvideo Animation Studio
9 个月??