Remember me
You are here: HomeForumCyberix3D ForumGeneral Discussion
Welcome, Guest
Username: Password: Remember me

TOPIC: Cyberix3D Builder - AI

Cyberix3D Builder - AI 2 years 2 months ago #3181

  • ViraX
  • ViraX's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 160
  • Thank you received: 125
-= Cyberix3D Builder AI =-

Using OpenAI technology, I created a 'GPTs' which is capable of understanding code and generating Cyberix3D code.

For the moment there are still some modifications and improvements to be made before we can share it. :evil:

Subsequently I would like to implement this 'Cyberix3D Builder AI' via another model, such as 'Mistral AI' which will be free to use (Hugging chat). ;)

It's just for fun B) , but the results seem promising ! :woohoo:



Do not hesitate to come and discuss the project here, I will try to answer all your questions and requests for information.
Last Edit: 11 months 2 weeks ago by ViraX.
The administrator has disabled public write access.
The following user(s) said Thank You: cyberix3d, Symbiotic Interactives

Cyberix3D Builder - AI 11 months 2 weeks ago #3493

  • ViraX
  • ViraX's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 160
  • Thank you received: 125
Progress Update on the Cyberix3D Builder AI Agent

After completely rebuilding the dataset, redefining the AI’s conditioning, and adopting a more advanced model, tests now demonstrate a much better understanding and assimilation of the xml-cyberix3d language. The application of rules and standards is more precise, and the generated code is noticeably more advanced than before.

Tasks that were previously unattainable have now become feasible.
For example, “create a door system that opens and closes when the player presses the Space key” was not possible with the previous version (the prototype), for several reasons:

The previous model, while effective at generating text and acceptable with familiar programming languages, often hallucinated because it had never intrinsically learned the structure and logic of the xml-cyberix3d language.

The dataset quality was inferior to the new one, with less clear organization and less relevant examples.

The conditioning was heavier: it was essentially verbal, adding an extra layer of complexity to understanding and correctly applying the language.

Spatial logic handling was nonexistent: as is often the case with text or code generation models, correctly creating spatially coherent structures in 3D and generating consistent assemblies within a 3D space is extremely challenging.

Improvements and New Features:

The new version of the Cyberix3D Builder AI agent now relies on:

A more powerful model

A more readable, structured, and richer dataset, designed specifically for learning xml-cyberix3d

Lighter conditioning, no longer overburdening the model and promoting a direct understanding and faithful application of the language’s standards and rules

Tests show:

A far superior understanding of instructions, language constraints, and expected logic

Much more coherent and functional generated algorithms

Improved spatial handling, though the creation of complex 3D structures and object animations remains a challenge

Today, Cyberix3D Builder AI is capable of solving advanced scenarios and implementing robust interactive systems—such as the door controlled by a key press—where the previous version consistently failed.

Here is the code fully generated by Cyberix3D Builder AI:
prompt : "create a door system that opens and closes when the player presses the Space key"
<GameMaker3D>
  <Comment comment="=== 1. LIGHTS AND MATERIALS - Always declare these at the top ==="/>
  <PointLight name="PointLight1" radius="250" fallOff="300" x="0" y="200" z="0"/>
  <Material name="mat_door" color="0x884400" lightPicker="PointLight1"/>
  <Material name="mat_floor" color="0xCCCCCC" lightPicker="PointLight1"/>
  
  <Comment comment="=== 2. FLOOR - Large static cube as the ground ==="/>
  <Cube name="floor" width="500" height="20" depth="500" x="0" y="0" z="0" collision="1" static="1" texture="mat_floor"/>
  
  <Comment comment="=== 3. DOOR WITH REALISTIC HINGE ==="/>
  <Comment comment="The door must rotate around its left edge, not the center."/>
  <Comment comment="To achieve this, we use a Group as the hinge (pivot point)."/>
  <Comment comment="The Group is placed at the left edge of the door. The door (cube) is offset to the right inside the group (x = door_width/2)."/>
  <Comment comment="When we rotate the group, the door swings like a real hinged door."/>
  <Group name="door_pivot" x="0" y="110" z="0">
    <Cube name="door" width="100" height="200" depth="10" x="50" y="0" z="0" localRotationY="0" collision="1" static="1" texture="mat_door"/>
  </Group>
  
  <Comment comment="=== 4. CAMERA & PLAYER CONTROL ==="/>
  <Comment comment="First-person camera, flying enabled so it doesn't fall through the floor."/>
  <CameraController controllerType="firstPerson" collisionShape="Box" characterHeight="120" flyMode="1" name="player" collision="0"/>
  <SetCamera x="0" y="100" z="-300" rotationX="10" rotationY="0" rotationZ="0"/>
  
  <Comment comment="=== 5. DOOR STATE VARIABLES ==="/>
  <Comment comment="door_state: 0=closed, 1=open"/>
  <Comment comment="isMoving: 1=door currently animating (prevents input spamming)"/>
  <Comment comment="door_angle: current angle of the door (degrees)"/>
  <Comment comment="door_target: target angle to reach during animation"/>
  <Var var="door_state" value="0"/>
  <Var var="isMoving" value="0"/>
  <Var var="door_angle" value="0"/>
  <Var var="door_target" value="0"/>
  
  <Comment comment="=== 6. MAIN TOGGLE FUNCTION - Called whenever player presses 'Space' ==="/>
  <Function name="toggle_door">
    <Comment comment="Only allow toggling if door isn't already moving"/>
    <If var="isMoving" eq="0">
      <Set var="isMoving" value="1"/>
      <Comment comment="If door is closed, set target to open (90deg). If open, set target to closed (0deg)"/>
      <If var="door_state" eq="0">
        <Set var="door_target" value="90"/>
        <Call funcName="open_door"/>
        <Else>
          <Set var="door_target" value="0"/>
          <Call funcName="close_door"/>
      </Else>
      </If>
    </If>
  </Function>
  
  <Comment comment="=== 7. DOOR OPEN ANIMATION - Smoothly rotates the group to open angle ==="/>
  <Function name="open_door">
    <Loop>
      <If var="door_angle" ls="door_target">
        <Wait seconds="0.02">
          <Comment comment="Increment the angle, but clamp if above target"/>
          <Increment var="door_angle" value="3"/>
          <If var="door_angle" gt="door_target">
            <Set var="door_angle" value="door_target"/>
          </If>
          <Comment comment="Apply the new angle to the door group (realistic swing)"/>
          <Set var="door_pivot.localRotationY" value="door_angle"/>
        </Wait>
      </If>
      <If var="door_angle" eq="door_target">
        <Comment comment="Update state: now open, unlock input"/>
        <Set var="door_state" value="1"/>
        <Set var="isMoving" value="0"/>
      </If>
    </Loop>
  </Function>
  
  <Comment comment="=== 8. DOOR CLOSE ANIMATION - Smoothly rotates back to closed position ==="/>
  <Function name="close_door">
    <Loop>
      <If var="door_angle" gt="door_target">
        <Wait seconds="0.02">
          <Comment comment="Decrement the angle, clamp if below target"/>
          <Increment var="door_angle" value="-3"/>
          <If var="door_angle" ls="door_target">
            <Set var="door_angle" value="door_target"/>
          </If>
          <Comment comment="Apply the new angle to the door group"/>
          <Set var="door_pivot.localRotationY" value="door_angle"/>
        </Wait>
      </If>
      <If var="door_angle" eq="door_target">
        <Comment comment="Update state: now closed, unlock input"/>
        <Set var="door_state" value="0"/>
        <Set var="isMoving" value="0"/>
      </If>
    </Loop>
  </Function>
  
  <Comment comment="=== 9. KEY INPUT HANDLING - Watches for 'Space' key and toggles door ==="/>
  <Loop>
    <IfKey key="Space">
      <Wait seconds="0.05">
        <Call funcName="toggle_door"/>
      </Wait>
    </IfKey>
  </Loop>
  
  <Comment comment="=== 10. DOOR STATUS LABEL - Shows current state on the UI (for debug) ==="/>
  <Label name="doorlabel" x="0" y="0">
    <Loop>
      <If var="door_state" eq="0">
        <Set var="text" value="CLOSED"/>
      </If>
      <If var="door_state" eq="1">
        <Set var="text" value="OPEN"/>
      </If>
    </Loop>
  </Label>
</GameMaker3D>

It still took three iterations to achieve this result:

1. The agent successfully created the scene—everything was coherent and functional, except the door, which opened around its central axis.

*I hadn’t specified in the prompt that I wanted the door to open from an offset axis (the side).

2. The agent made a first attempt to modify the algorithm; it didn’t cause any errors, but it still didn’t work as intended.

3. The agent used another algorithm, and this time everything worked.

*The agent even created functions and a debug display (“open/close”) without me asking for it in the prompt.

I believe that with a more precise and detailed prompt, it would have succeeded on the first try...


Of course, I ran several tests ranging from very easy to intermediate level, and most of them proved to be successful.

While improving and testing the Agent, I am also creating a web page that will allow everyone to try out Cyberix3D Builder AI. Very soon, I will give you access once a reliable version of the web page is ready.

Of course, we are still a long way from having a magical tool that can create coherent worlds—complete with scripts, effects, and animations—that all work flawlessly and without errors ! ;)
Last Edit: 11 months 2 weeks ago by ViraX.
The administrator has disabled public write access.
The following user(s) said Thank You: cyberix3d

Cyberix3D Builder - AI 11 months 2 weeks ago #3494

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 792
  • Thank you received: 797
Dear ViraX,

On behalf of the Cyberix3D team, we would like to sincerely thank you and express our deep appreciation for your remarkable work on the Cyberix3D Builder AI project.

Your integration of AI to generate Cyberix3D code—especially with such a clear structure, spatial logic, and functional gameplay mechanics—is truly impressive. The example you shared, including the door system that opens and closes via the Space key, demonstrates just how far you’ve taken this idea. We were especially amazed by the intelligent use of pivot groups, variable logic, and your ability to get the AI to generate readable and working code with minimal guidance.

It is exciting to see that you not only improved dataset quality and conditioning but also went through iterations to ensure accuracy. Your updates and your open explanation of the process are extremely valuable to the community.

We also want to let you know that we are planning to integrate a similar AI-based tool into the new version of Cyberix3D, and your project has already given us ideas and inspiration. The work you’ve done might significantly contribute to this direction and help accelerate the development of advanced AI-assisted creation tools for our users.

Please continue sharing your progress—your initiative is both fun and groundbreaking!

Warm regards,
The Cyberix3D Team
The administrator has disabled public write access.
The following user(s) said Thank You: ViraX

Cyberix3D Builder - AI 11 months 2 weeks ago #3495

  • ViraX
  • ViraX's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 160
  • Thank you received: 125
Thank you very much for your message ! :)

I’m really glad that you like this project. Since the beginning — about 10 years ago — I’ve always loved the Cyberix3D concept. From my very first projects with your engine, I was fascinated by how easy it was to create small 3D projects without any programming skills, while still allowing others to access and share the project’s source code if they wanted to.

Thanks to your support whenever I needed it, I now feel the same desire to share cool things here, help improve Cyberix3D, and make it more widely known.

Your project makes programming enjoyable both for younger users and for seniors — it’s truly a great project.

On my side, I’m currently developing (for myself, for now) an agent capable of generating a small Python project following strict PEP8 standards: it creates folders, .py scripts, unit tests (unittest), as well as readme.md files, makefiles, etc. It can even execute the project and automatically correct it if necessary — all fully automated, with just a simple prompt and no human intervention.

This gave me the idea to do the same for Cyberix3D: to create a complete project from A to Z automatically from a single prompt. For now, this project isn’t possible for several reasons — mainly because I don’t have an API to interact with the engine from outside. Perhaps this could be a feature in a future version of the engine.

So for the moment, a "simple but functional xml-cyberix3d code generator" (even at a beginner to intermediate level) is already very satisfying for me and gives Cyberix3D a fresh appeal.

It’s quite a challenging task, but I’m having a lot of fun with it. Maybe I won’t achieve the final result I have in mind, but I will share all possible information about this project along the way. ;)

Happy to hear from you again, and I can’t wait to try out the new version! B)
The administrator has disabled public write access.
Time to create page: 0.098 seconds