Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Twisted Webbe

21
Posts
11
Topics
1
Followers
5
Following
A member registered Jul 24, 2019

Recent community posts

Well I've submitted! It honestly could use some more work.... but between having some computer problems and  running out of mobile data this month I was in a pinch for a bit. Still, this is totally playable, and it will keep track of your high score. 

I have a full list of screenshots on the Itch.io Page, so please check it out! (Android and PC Currently. The Google Play version is under review as it has just been submitted.


Yup! Mobile and PC! Nothing too fancy for now though. 

I mean, as I said above, I started already but I plan to finish early. It's only been a few days since I got the old backup up and functional.

I have a Go! Though it probably won't see much use once the Quest 2 arrives. Not sure what engine you use, but I recently tried to resurrect a little project I only ever had working on my own Go, but when I went to try to update it I discovered Go support in the Oculus tools for Unity was nearly gone, and the camera support no longer worked. When I tried to revert to an older version I discovered my scenes could no longer be opened... so I gave up. If you are in the same situation you might want to try your PC game instead. It could save you a LOT of headache.



Here's my story: I started this game in 2017 right after going to BitSummit and trying VR for the first time. I wanted to make something that felt kind of like a VR game but I didn't have  VR headset, so I learned how the gyroscope worked on my phone and made a game where you hold your device out in front of you and point it in 360 degrees (any direction), and you can even tilt your device and it will stay rotated correctly.

My problem was that it wasn't really fun. It was like a cool tech demo, so I kept dropping it and picking it up again. The last time was in the second half of 2019, in which I tried to turn it from a shooter into a vaguely tower defense type game using satellites that you place in orbit around you. Then... well a combination of burnout, me ruining some important code, and my version control COMPLETELY failing on me and I just gave up, sometimes around December of 2019. Then last month I found an old backup on an old laptop from mid-2018, and copied that to my current computer and updated it in Unity.

Here are the questions: I had this in Early Access on Google Play, but never anything really advanced enough to call more than a tech demo, and no one really played it.  Is this acceptable for not being officially released? Also, I saw Revival Jam was announced and that is what inspired me to pick it up and just finish some version of the game once and for all. I started before the start date, is that ok?  I'm hoping to not do this until the end of the month either way.


Thanks for the inspiration.

Cute ending!

So... is there no way to save a mesh to your scene? Same for materials. I could have sworn I managed it in the past for materials, but now I can't seem to do even that. I would REALLY recommend an export to prefab script of some sort.

As far as I can tell, if I change the container size (especially Y) to anything other than 1 it breaks, either giving the error on Freeze Mesh or spitting out.... about 50 copies of the mesh on a grid all as a single object.

It seems tied to Container Size

Heya! I've been using Clayxels to build stuff for a gamejam, but I ran into this error when trying to freeze to mesh. This was after seven or so successful freezes of different objects, so I'm not sure what I did differently for this one:

ArgumentException: ComputeBuffer.GetData() : Accessing 26595132 bytes at offset 0 for Compute Buffer of size 25165824 bytes is not possible.
UnityEngine.ComputeBuffer.GetData (System.Array data) (at C:/buildslave/unity/build/Runtime/Export/Shaders/ComputeShader.bindings.cs:227)
Clayxel.generateMesh () (at Assets/Clayxels/Clayxel.cs:358)
ClayxelInspector.OnInspectorGUI () (at Assets/Clayxels/ClayxelInspector.cs:120)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

AHHH That explains it! I was also only getting the errors when trying to build an apk. I thought something else in the package was conflicting and didn't have the time to fully confirm it yet.

So I got a load of errors when I tried loading the newest download into a new project. Did I forget a step? Or is something new not included?


I think you have to convert it to a mesh and all that jazz 

I've been doing some testing and if you try to save a Clayxel (raw or in frozen mesh form) it appears to lose the material, which then throws errors if you try to spawn a clone and turn it into a mesh. One workaround for now is to make a custom Material in your file structure and add it manually to the MeshRenderer, then drop the prefab in your scene and reload it. This seems to save the changes made to the material so you don't lose your changes.

I've been toying around with a way to generate a mesh and merging all of the individual parts, instead of turning each part into a separate mesh. If you want to try it out I will put the script below. One warning though: If you've been trying to save prefabs of your Clayxels they will lose their Material and any mesh generation will throw out errors, so you may want to manually create a separate Material for any prefabs you work with and attach it before attempting either this script or the original mesh generation button.

One more note: Once this is done you can delete all of the child objects. I tried doing it myself but something else is generating new children and it interfered with my attempt to remove children in the function.

How to add:

In Clayxel.cs add this below the generateMesh() function after the closing }

    public void generateUnifiedMesh()
    {
        this.meshCached = true;

        if (this.gameObject.GetComponent<MeshFilter>() == null)
        {
            this.gameObject.AddComponent<MeshFilter>();
        }

        MeshRenderer render = this.gameObject.GetComponent<MeshRenderer>();
        if (render == null)
        {
            render = this.gameObject.AddComponent<MeshRenderer>();
            render.sharedMaterial = new Material(Shader.Find("Clayxel/ClayxelMeshShader"));
        }

        render.sharedMaterial.SetFloat("_Glossiness", this.materialSmoothness);
        render.sharedMaterial.SetFloat("_Metallic", this.materialMetallic);

        this.gameObject.GetComponent<MeshRenderer>().enabled = true;

        ComputeBuffer meshIndicesBuffer = new ComputeBuffer(this.chunkMaxOutPoints * 6, sizeof(float) * 3, ComputeBufferType.Counter);
        Clayxel.claycoreCompute.SetBuffer((int)Kernels.genMesh, "meshOutIndices", meshIndicesBuffer);

        ComputeBuffer meshVertsBuffer = new ComputeBuffer(this.chunkMaxOutPoints, sizeof(float) * 3, ComputeBufferType.Counter);
        Clayxel.claycoreCompute.SetBuffer((int)Kernels.genMesh, "meshOutPoints", meshVertsBuffer);

        ComputeBuffer meshColorsBuffer = new ComputeBuffer(this.chunkMaxOutPoints, sizeof(float) * 4);
        Clayxel.claycoreCompute.SetBuffer((int)Kernels.genMesh, "meshOutColors", meshColorsBuffer);

        List<Vector3> totalVertices = new List<Vector3>();
        List<int> totalIndices = new List<int>();
        List<Color> totalColors = new List<Color>();

        int totalNumVerts = 0;

        this.mesh = new Mesh();
        this.mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;

        this.switchComputeData();

        for (int chunkIt = 0; chunkIt < this.numChunks; ++chunkIt)
        {
            ClayxelChunk chunk = this.chunks[chunkIt];

            meshIndicesBuffer.SetCounterValue(0);
            meshVertsBuffer.SetCounterValue(0);

            this.computeChunkPoints(chunk);

            Clayxel.claycoreCompute.SetInt("outMeshIndexOffset", totalNumVerts);
            Clayxel.claycoreCompute.Dispatch((int)Kernels.genMesh, 16, 16, 16);

            Clayxel.claycoreCompute.Dispatch((int)Kernels.clearChunkData, 8, 8, 8);

            int numVerts = this.getBufferCount(meshVertsBuffer);
            int numQuads = this.getBufferCount(meshIndicesBuffer) * 3;

            totalNumVerts += numVerts;

            Vector3[] vertices = new Vector3[numVerts];
            meshVertsBuffer.GetData(vertices);

            int[] indices = new int[numQuads];
            meshIndicesBuffer.GetData(indices);

            Color[] colors = new Color[numVerts];
            meshColorsBuffer.GetData(colors);

            totalVertices.AddRange(vertices);
            totalIndices.AddRange(indices);
            totalColors.AddRange(colors);
        }

        mesh.vertices = totalVertices.ToArray();
        mesh.colors = totalColors.ToArray();
        mesh.triangles = totalIndices.ToArray();

        this.mesh.RecalculateNormals();
        this.gameObject.GetComponent<MeshFilter>().mesh = this.mesh;

        meshIndicesBuffer.Release();
        meshVertsBuffer.Release();
        meshColorsBuffer.Release();

        this.releaseBuffers();

        MeshFilter[] meshFilters = GetComponentsInChildren<MeshFilter>();
        CombineInstance[] combine = new CombineInstance[meshFilters.Length];

        int i = 0;
        while (i < meshFilters.Length)
        {
            combine[i].mesh = meshFilters[i].sharedMesh;
            combine[i].transform = meshFilters[i].transform.localToWorldMatrix;
            meshFilters[i].gameObject.SetActive(false);

            i++;
        }
        this.transform.GetComponent<MeshFilter>().mesh = new Mesh();
        this.transform.GetComponent<MeshFilter>().sharedMesh.CombineMeshes(combine);
        this.transform.gameObject.SetActive(true);
        

       /* //THIS LEAVES TWO CHILD OBJECTS FOR SOME REASON
        foreach (Transform child in this.transform)
        {
            DestroyImmediate(child.gameObject);
        }
        */
        /* //THIS FREEZES THE EDITOR
        while (this.transform.childCount != 0)
        {
            DestroyImmediate(this.transform.GetChild(0));
        }*/
    }

Then in ClayxelInspect.cs add this :

       
            if (GUILayout.Button("Generate Unified Mech"))
            {
                clayxel.generateUnifiedMesh();
            }

Put that RIGHT BEFORE:

    }
}

[CustomEditor(typeof(ClayObject))]
public class ClayObjectInspector : Editor{
void Awake(){


And if you want to clean this up and add it officially I wouldn't mind.

Thanks! I'll give that a shot.

As the question says, I am curious about how to animate what I make.

Clayxels community » clayshowcase · Created a new topic Brick Block

My first experiment! I'm not sure how to animate it yet, but I have a special block inside of what you can see which I can use to make the block explode or suck into nothingness, which looks pretty cool. Uploaded the fbx for anyone who wants it: https://my.pcloud.com/publink/show?code=XZlEfjkZgJJ3t6cpDcFNgLI3OzjFQ57c1XcV

I'd like to be able to make things fade, but the transparency portion of the color doesn't seem to apply to the shader.

I'd like to be able to select multiple solids in the editor and adjust their settings at the same time.

Simple request: If I make more than one Clayxel object in a scene and move the second away from World (0,0,0) it still spawns new solids at world (0,0,0) instead of the local (0,0,0)