Skip to content

GraphX Alpha Seven - External References & More!

Latest

Choose a tag to compare

@Electron7-7 Electron7-7 released this 07 Mar 01:35

External References (and a GraphXTheatre Overhaul!)

What's New?

External References

You can now use external .obj model files for custom Mesh objects! Yes, this means that when making a .gt file, you can import whatever models you like, as long as they're in the .obj format! Oh, also all the vertex positions have to be between -1 and 1; I'm planning on writing some custom code to scale vertex positions automatically as well as avoiding floating point errors, but for now that's your responsibility. An easy way to do this in Blender is to make a default cube and then make sure your model is scaled down to be inside that cube (then, of course, delete the cube before exporting, lol).

An Upgrade to the GraphXTheatre File Format

Some major changes happened under the hood, but only some of those changes directly affect how you make .gt files. Those changes include:

  • The aforementioned "external reference" variable type, which is a file path written between double-quotes (" "). File paths can be either absolute or relative to the executable file. Absolute paths start with / on Linux, or any drive letter on Windows (C:/, D:/, Z:/, etc.). Relative file paths are relative to the folder that the executable is in. You can use ../ to navigate out of that folder in the path, but files won't get processed unless their extension is supported, which should hopefully stop any exploits using this feature.
    • Currently, only .obj files are supported, but I plan on supporting textures, shaders, and more later on down the line. In the meantime, try setting a Mesh's MeshData to an external .obj file!
  • When copying a variable from another object using a Theatre reference (i.e: using < >), it no longer matters which object comes first! This does still apply, however, when referencing an object as a variable.
    • For example, when using a Theatre reference like this: Position <SomeThing> or this: Color <SomeOtherThing>, you don't need to care about where "SomeThing" or "SomeOtherThing" are in relation to the object that's referencing them.
    • But when using a Theatre reference like this: Mesh <MeshThing> or this: Material <MaterialThing>, then "MeshThing" and "MaterialThing" need to be above whatever object is referencing them.
  • Sandwiches can now be of any size and any variable type!
    • For example, this is now possible: Mesh:MeshData:Material <NotACube>:[GRAPHX_CUBE]:<Material_1>
  • Single-line, C++-style comments are now a thing!
    • The parser & interpreter will completely ignore anything that comes after // for the entire line
      • Be careful not to comment out variable values! That variable still needs to get set and it'll gobble up whatever value comes next!
        There might be a few smaller things that I'm forgetting, but every detail on the syntax will be written down in the Wiki! Check it out!