|
|
| (29 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| '''ProtoGraph''' is a declarative programming language designed to work with [[ProtoFlux]] in the [[Resonite]] ecosystem. It allows creators to write logic in a clean, readable text format that compiles directly into ProtoFlux nodes—making it easier to build, test, and maintain complex systems.
| | [[ProtoGraph]] |
| | |
| == Overview ==
| |
| * '''Paradigms''': Declarative, Modular
| |
| * '''Family''': ML: Caml: OCaml: F#
| |
| * '''Designed by''': [[User:Papaltine|Papaltine]], [[User:Kittysquirrel|Kittysquirrel]]
| |
| * '''Developer''': [[User:Papaltine|Papaltine]]
| |
| * '''Stable Release''': N/A (Currently in Alpha)
| |
| * '''License''': AGPLv3
| |
| * '''Target Platform''': Resonite (via ProtoFlux)
| |
| * '''File Extension''': <code>.pg</code>
| |
| * '''Compiler Tool''': <code>flux-sdk</code>
| |
| * '''Repository''': [https://git.samsmucny.com/ssmucny/Flux-SDK Flux SDK]
| |
| * '''Compiled Format''': <code>.brson</code> (Resonite Record)
| |
| * '''Influenced by''': F#, Elm, Python, Haskell, Odin
| |
| | |
| == Who Should Use ProtoGraph? ==
| |
| * Creators who want to move beyond visual scripting
| |
| * Developers building modular, reusable systems
| |
| * Teams collaborating on large-scale Resonite projects
| |
| | |
| == Benefits ==
| |
| * '''Readable''': Clean syntax that mirrors ProtoFlux visually
| |
| * '''Modular''': Encourages reusable code through modules and packages
| |
| * '''Safe''': Compiler checks help catch errors early
| |
| * '''Accessible''': Friendly to those familiar with ProtoFlux as a first programming language
| |
| | |
| == Building and Using in Resonite ==
| |
| | |
| [https://git.samsmucny.com/ssmucny/Flux-SDK/wiki/Getting-Started Getting Started]
| |
| | |
| # Write your <code>.pg</code> file
| |
| # Compile it:
| |
| <syntaxhighlight lang="bash">
| |
| flux-sdk build MyModule.pg
| |
| </syntaxhighlight>
| |
| # Import the <code>.brson</code> file into Resonite
| |
| # Inspect the generated ProtoFlux under the corresponding slot
| |
| | |
| == Example: Cross Product Module ==
| |
| <syntaxhighlight lang="fsharp">
| |
| module CrossProduct
| |
| | |
| where {
| |
| let Ax, Ay, Az = Unpack_Float3(A);
| |
| let Bx, By, Bz = Unpack_Float3(B);
| |
| | |
| let Cx = (Ay * Bz) - (Az * By);
| |
| let Cy = (Az * Bx) - (Ax * Bz);
| |
| let Cz = (Ax * By) - (Ay * Bx);
| |
| | |
| Pack_Float3(Cx, Cy, Cz);
| |
| }
| |
| </syntaxhighlight>
| |
| | |
| == See Also ==
| |
| * [https://git.samsmucny.com/ssmucny/Flux-SDK/wiki/Home Language Guide]
| |
| * [https://git.samsmucny.com/ssmucny/Flux-SDK Git Repository]
| |
| * [[ProtoFlux]]
| |