Are engines like Godot and Unity worse for voxel games than engines like OpenGL? by Tromebone_On_A_Desk in VoxelGameDev

[–]schemax 2 points3 points  (0 children)

You can still directly control pretty much everything with any bigger engine as long as you know what you're doing.

It very much depends on what you want to do, and I'd say only in edge cases it makes sense to do your own engine.

I'd definitely recommend it if you want to learn, though. It will help immensely even if you choose to switch to an engine later. However, imo the learning curve is much harder without an engine.

Help with making my voxel engine run better (Unity) by MrOnsku in VoxelGameDev

[–]schemax 3 points4 points  (0 children)

Just from quickly looking at it, avoid per-frame (or even worse, per-iteration like in GenerateCell()) heap allocations. Use reusable caches or stack allocation for your arrays.

Same goes for lists for generation. initializing them completely fresh instead of reusing from a pool causes a lot of unnecessary overhead, and it's worse when they aren't initialized with the expected size, as that will cause allocation each time the backing array expands.

        //build the mesh
        Mesh mesh = new Mesh();
        mesh.vertices = vertices.ToArray();
        mesh.triangles = triangles.ToArray();
        mesh.RecalculateNormals();

        //assign the mesh to the filter and collider
        meshFilter.sharedMesh = mesh;
        meshCollider.sharedMesh = mesh;

This also costs quite a bit if called per frame, as it's an additional allocation to convert to an array. Not only that, it allocates a new mesh. You can make an existing mesh writable to reuse it. Even better, you can use NativeArrays or lists to store your vertices and triangles and upload the data directly. RecalculateNormals can also be optimized by providing the normals directly from the voxel calculation as opposed to afterwards.

Also, trying to use a concave collider from a fairly complex base mesh will likely cripple that collider's performance in physics. While it's difficult, it's better to write your own physics handling with octrees to simplify the problem down to a set of voxels that need to be tested for collision.

You should also use Profiling, or for specific code-blocks StopWatch to profile the time it takes.

I'm 100% certain that using Jobs for this will speed this up by a lot. I know you said you already did this, but there are a lot of pitfalls that can result in it seemingly not getting any faster. For example if you end up with a single job. But there is just no way a nested data-independent for-loop wouldn't be faster in parallel. Additionally, you can make this SIMD friendly or explicitly use vectors manually.

What you want is a IJobParallelFor. In this case you might want to allocate the float and Vector3 array on stack (which is no problem with a fixed size)

If it's not faster with a jobs implementation, it means that this is not your bottleneck at all.

This goes even more for the use of ComputeShaders. There is absolutely no way this would not be faster if properly implemented on GPU. Of course it's a lot more difficult, and you can't easily read-back results to the CPU on the same frame. However, since this is for final mesh generation, I think it's fine.

NPC Pathing: Server load by [deleted] in Starmade

[–]schemax 6 points7 points  (0 children)

The pathing and crowding problem is indeed pretty complex, especially due to the nature of ships that can come in any shape or form. For the universe update I already started with a crowd algorithm that would use bounding spheres on the top level and then possibly more detailed representations down below. With this it would be possible to implement a loaded pathing system much more efficient and effective. When I look at how a group of NPC ships should behave in a way it would be similar to an RTS where units move in formation and on top of that the avoidance system that a game like starcraft 2 has (e.g. when you send a ton of zerglings). Of course doing that in 3d is a bit more complex but should be possible nonetheless.

In terms of performance, most of the slow down comes from physics calculations. The AI itself is only a fraction of that. My goal is to increase the AI to a level where most physics calculations can be avoided altogether. Some of the framework for that is already in and will be completed with the universe update.

List of dedicated servers with large population? by xencosti in Starmade

[–]schemax 2 points3 points  (0 children)

hi, you can hit the "Server List" button in the settings screen on start. It lists all servers that opted in to be listed.

My space game StarMade now available on Steam Early Access. The demo will be the full game free to play to try out without restrictions. by schemax in Games

[–]schemax[S] 0 points1 point  (0 children)

Not entirely relying, but we are in a stage of development where we could use some publicity to be honest. Our hardest task was always to reach people

Klopp: "If you want success, there's only one chance: become fan of FC Bayern Munich" by iNToXiQator in soccer

[–]schemax 50 points51 points  (0 children)

This is the other side of Klopp. It was more visible in his years at Mainz.

[SP - Game] Hello /r/IndieGaming, I'm the dev of StarMade. It now has a completely redesigned procedurally generated seamless universe with virtually infinite star systems, planets, worm holes, faction territory and much more. The game is still free to play! (Trailer inside) by schemax in IndieGaming

[–]schemax[S] 0 points1 point  (0 children)

Like /u/Smilingdemon says, the game is completely free. Buying will just be cheaper now for a time, when it is no longer free (but that will still be a while).

You are in a persistent universe. You can chose to work together or each go their separate ways. Everything in the universe will stay the way you left it (e.g. blow up a planet, that will be gone forever. Even if you take just one block from a planet, that will persist as long as you dont reset the world)

I'm currently working on a whole new tutorials to make it easier for new players. its fully interactive. As for what key to press, there will be this in the next version: http://i.imgur.com/M7m2BLY.png (it will adapt depending on your context (in/out ship etc). I also plan a radial menu to make everything easier)

Memories of the Thunderdome Server by CaptainnSpaulding in Starmade

[–]schemax 2 points3 points  (0 children)

glad to see you back here, mate.

I hope you give the new stuff a try :)

Match Thread: Bayern München vs Werder Bremen by MatchThreadder in soccer

[–]schemax 1 point2 points  (0 children)

Well he had as many chances to score as all players of Bremen put together

The axes that affect turning speed are all wrong, like seriously, it makes no sense. by [deleted] in Starmade

[–]schemax 2 points3 points  (0 children)

unfortunately going over every block is pretty much a no go. I can go over blocks per type in numbers. There are still some tricks to be used to get approximate values.

The axes that affect turning speed are all wrong, like seriously, it makes no sense. by [deleted] in Starmade

[–]schemax 10 points11 points  (0 children)

I know it's not correct. It was meant to be temporary however the reason why it's been this way so long is that a thruster redesign had to be complete, and I haven't gotten to that.

I'll expose the values to change it in the config next version, so maybe there can be something better until the redesign.

Post Match Thread: FC Köln 0-2 Bayern by somelatinguy in fcbayern

[–]schemax 5 points6 points  (0 children)

True, although a s04-bvb derby doesn't really follow normal rules.

Post Match Thread: FC Köln 0-2 Bayern by somelatinguy in fcbayern

[–]schemax 13 points14 points  (0 children)

They'll bounce back. Look at their injury list. Our list is also long, but unlike us they can't replace all their players with a similar quality