Search Unity

Engine 4 - Four dimensional gameplay in Unity

Discussion in 'Assets and Asset Store' started by WillNode, Apr 21, 2015.

  1. WillNode

    WillNode

    Joined:
    Nov 28, 2013
    Posts:
    300
    That's a very ambitious project.

    Sorry but I still didn't understand which part is "flaky"? Everything is working fine and smooth at my end. Maybe post GIF if that's help.

    Engine4 does not support multi viewers at this point. Internally those generated mesh are renderer using their own MeshFilter, and because one GameObject cannot have multiple MeshFilter, you can't create multi Viewers by that way.

    However I think I can lift the limitation by using Graphics.DrawMesh instead. I'll make a note.

    Engine4 uses its own rigidbody, named Rigidbody4. You can't mix regular Rigidbody with Rigidbody4. The physics system is broken when any of those objects has its transform (not Transform4) modified.

    Cylinder4 transforms any Mesh into 4D objects by extruding them like circle into flat cylinder. That's only one useful mesh generator that I can think of.
     
  2. Chunkboi

    Chunkboi

    Joined:
    Jun 11, 2018
    Posts:
    3
    Okay. My 4d FPS concept requires that I pass a conventional control input to the player character. So far, my plan is that the player can only move in 3 dimensions at a time, but they can alter which 3 dimensions they interact with. The control inputs boil down to a couple of vector 2's, one for linear motion (like the keyboard) and one for angular motion (like the mouse), which are then passed to the player motion script for translation into the appropriate motion.

    Can I remove the regular Rigidbody and only use Rigidbody4 for motion in this case?

    Can I get Transform4 to override regular Transform?

    Another question: I've been trying to set the viewer from within the game during test plays. I found a set of commands that work, and using the arrow keys, I can choose X, Y, Z, or W like I would from clicking the buttons on the Viewer4 panel in the Scene window:

    public static void AxisChange (Axis4 dimSel) {
    viewer = GameObject.Find("Main Viewer"); // object must be initialized at the start of the AxisChange subroutine
    switch (dimSel) // set the viewer's 4d orientation in euler angles based on the player input
    {
    case Axis4.W:
    {
    viewer.GetComponent<Transform4>().eulerAngles = new Euler4(0f, 0f, 0f, 0f, 0f, 0f);
    break;
    }
    case Axis4.X:
    {
    viewer.GetComponent<Transform4>().eulerAngles = new Euler4(0f, 180f, 0f, 90f, 0f, 180f);
    break;
    }
    case Axis4.Y:
    {
    viewer.GetComponent<Transform4>().eulerAngles = new Euler4(180f, 0f, 0f, 0f, 90f, 180f);
    break;
    }
    case Axis4.Z:
    {
    viewer.GetComponent<Transform4>().eulerAngles = new Euler4(0f, 0f, 0f, 0f, 0f, 90f);
    break;
    }
    }

    }

    Now this seems to work as expected, except that the transitions are instantaneous and quite jarring. I was trying to make the engine transition smoothly from one dimensional orientation to another, like it appears to do when I click one of the buttons on the scene window instead of executing this part of the script. Is there a way to do that, or will I need to write something to handle incremental transition of each number? What happens when I click the button versus when I just execute the command as I wrote it above?
     
  3. Chunkboi

    Chunkboi

    Joined:
    Jun 11, 2018
    Posts:
    3
    Addendum: I'm having trouble getting the scene to render. I used to be able to have solids, now I can't see anything when I run the game or editor in cross-section view mode. My viewer is set to W (viewing X, Y, Z space) with an R of 0, and the transform4 of all objects shows the W displacement and T, U, V rotations all at 0, so I should be seeing objects as if they were 3 dimensional. The objects are still there, as I can switch into Frustum view and still find them, but cross-sectional view shows nothing.

    Also: there's an error that keeps popping up in the console:

    SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
    UnityEngine.GameObject:AddComponent()
    Engine4.Physics.Physics4:get_main() (at Assets/Plugins/Engine4/Components/Runtime/Physics4.cs:61)
    Engine4.Physics.Rigidbody4:Synchronize() (at Assets/Plugins/Engine4/Components/Runtime/Physics/Rigidbody4.cs:68)
    Engine4.Physics.Rigidbody4:get_body() (at Assets/Plugins/Engine4/Components/Runtime/Physics/Rigidbody4.cs:46)
    Engine4.Physics.Collider4:Synchronize() (at Assets/Plugins/Engine4/Components/Runtime/Abstract/Collider4.cs:71)
    Engine4.Physics.BoxCollider4:Synchronize() (at Assets/Plugins/Engine4/Components/Runtime/Physics/BoxCollider4.cs:23)
    Engine4.Physics.Collider4:OnValidate() (at Assets/Plugins/Engine4/Components/Runtime/Abstract/Collider4.cs:86)​

    The code it refers to is in Physics4.cs:

    public static Physics4 main
    {
    get
    {
    return _main ? _main : ((_main = Viewer4.main.GetComponent<Physics4>())
    ? _main : (_main = Viewer4.main.gameObject.AddComponent<Physics4>()));
    }
    }​

    Is this going to get addressed in the next update?
     
    Last edited: Oct 31, 2018
  4. SentrySlime

    SentrySlime

    Joined:
    Nov 23, 2018
    Posts:
    1
    I'm having trouble with the editor script buttons not showing up, (the S4 view shortcuts) a lot of the content in your video is fairly outdated so it's hard to understand what everything does even with the documentation and manual although it defiantly helps. Perhaps you could upload another video where you go trough some of the different scripts.
    Other than that it's a great tool!
     
  5. WillNode

    WillNode

    Joined:
    Nov 28, 2013
    Posts:
    300
    Heyo. Long time no see.

    It's been around 4 years or more since I run and develop this asset.

    If you wonder why I haven't push new version lately, today I want to give you a good news.

    I'm taking a brave decision to move out entirely from Unity Engine. This means I'm switching focus on purely native (C++) form out of this asset. This solves a primary problem of this asset currently encounter: performance and portability.

    I believe this movement also benefits to us on creating more innovative games, as it will scales well on larger project too. By the time of this writing I have been succesfully converted all C# rendering and physics code to C++ even creating some demo examples out of it.

    And also, because C++ gives me low level operations, I can think some algorithms for next features, like UV textures, particle system, GPU accelerated projection, etc.. All core features that defines a Game Engine.

    I aware that this is one of my ambitious project I ever working on. So what are the good news?

    First. The library is open sourced - https://github.com/forth-engine/forth-library

    It's currently licensed as GPL but later I will dual-license the library when most features get complete. And for this asset? I will drop most the code and instead, provide a wrapper for the C++ engine. If you have already bought this asset previously, it's mean that you've bought the wrapper code including the commercial license of the library. I think that's a win-win solution for all of us.

    Stay tuned for updates!
     
  6. Alex_Sour

    Alex_Sour

    Joined:
    Feb 2, 2018
    Posts:
    3
    Hello! I'm wondering, will the Unity asset continue being updated even with Fourth Engine?
     
  7. WillNode

    WillNode

    Joined:
    Nov 28, 2013
    Posts:
    300
    My Answer is I don't know. Both development currently inactive due of lack resource from my side. Other than that I always keep tracking my assets to make it works with latest release from unity.
     
  8. Alex_Sour

    Alex_Sour

    Joined:
    Feb 2, 2018
    Posts:
    3
    K, that's good. I was thinking of buying the asset soon.
     
  9. BantamJoe

    BantamJoe

    Joined:
    Aug 18, 2013
    Posts:
    1
    I spent $35 on this asset yesterday and now I'm worried that I may have wasted my money if there are no more upgrades. I think this is a great product and would love to see it mature more. Please let me know if I have to sign up with you so that I can get your C++ wrappers for people like myself that just bought the product. Thank you.
     
unityunity