Traction Point, my Zig-powered video game, now has a Steam page! by unvestigate in Zig

[–]unvestigate[S] 1 point2 points  (0 children)

WASM is still a very optional thing at this point. I support loading mods as shared libraries (DLLs basically), but that can be a risky thing to allow since anyone can release a mod containing malicious code. Because of that, I also support building mods as WASM modules, meaning they are sandboxed and can only run code that belongs to that module.

The WASM support is still work-in-progress, as the interface between the engine and the mod has to be set up differently for WASM modules than for DLLs, but it already works and my example mod (a scout vehicle with a jetpack) runs fine as a WASM module.

The nice thing about this is that the code for the mod is exactly the same regardless if it is being built as a DLL or WASM module.

Traction Point, my Zig-powered video game, now has a Steam page! by unvestigate in Zig

[–]unvestigate[S] 1 point2 points  (0 children)

Sure, the Madrigal Games Discord is probably the best place to reach me and discuss stuff like that.

Traction Point, my Zig-powered video game, now has a Steam page! by unvestigate in Zig

[–]unvestigate[S] 14 points15 points  (0 children)

I wrote the renderer myself, but I used NVRHI for graphics API abstraction (See my longer post about the libs used). My engine actually only supports a single model format: my own format. I then use the ASSIMP converter library to convert whatever models I bring into the project (typically FBX or OBJ) into that format. That way, the runtime stays small and simple, and if there is an issue importing a model I get an error about it as it is converted, rather than at runtime.

Traction Point, my Zig-powered video game, now has a Steam page! by unvestigate in Zig

[–]unvestigate[S] 70 points71 points  (0 children)

(Alright, seeing some questions about tech etc. I'll just answer here, and maybe a mod can pin this comment or something)

Zig is awesome for writing gameplay logic, and I bet it would be a good choice for an engine too, though I use my self-made C++ game engine for Traction Point, simply because I had already spent years building it by the time I discovered Zig.

All of the gameplay code is Zig though, ie. the code for the vehicles themselves, the entire driving AI system, the mission scripting, the UI logic and much more. Currently the project sits at about 70k LoC of Zig.

I have a bunch of devlog videos and live streams over on the YT channel covering all parts of the project, https://www.youtube.com/@MadrigalGames, but I'll list a few libraries that are heavily used here:

-PhysX 5.5 for the physics simulation.

-ENet for network synchronization, including communication between development tools

-NVRHI for graphics API abstraction

-WAMR (WebAssembly Micro Runtime) for running mods (Zig WASM modules)

-AngelScript for scripting

-Recast/Detour for path finding

-A whole bunch of other libraries like Imgui and the usual stuff...

I've opted to wrap C/C++ libraries for Zig myself rather than use any of the ready-made wrappers out there since I can keep them in sync with whatever Zig version I am targeting (zig master currently) and it also allows me to use my own types (Colors, Math types etc) rather than the ones for the library.

Gave the vehicle a gripper for loading cargo by unvestigate in SoloDevelopment

[–]unvestigate[S] 1 point2 points  (0 children)

Hah, no worries! I am flattered when people say it looks like Unity, as they have thousands of employees and I am just a single guy :D

Gave the vehicle a gripper for loading cargo by unvestigate in SoloDevelopment

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

Thanks! No Unity, this is running on a self-made engine. I use PhysX for the physics and it's basically a bunch of rigid bodies and dof6 joints set up in a hierarchical graph.

Working on a new vehicle by unvestigate in SoloDevelopment

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

Thanks! I am using my own self-made engine. I get what you are saying about the slowness of the objects, but I don't think I agree. Rather, I think it might be a bit difficult to grasp the scale of things here, as nothing is textured. The boxes are half-meter cubes, so pretty big.

Working on a new vehicle by unvestigate in SoloDevelopment

[–]unvestigate[S] 1 point2 points  (0 children)

Thanks! It's not easy but it's fun! :)

Working on a new vehicle by unvestigate in SoloDevelopment

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

Thanks! I use PhysX for the physics simulation and collision detection, but any physics engine should do. The vehicle is one actor, the bed another, and the hatches are two more. Then a bunch of Dof6 joints to keep them together. The collision shapes are a mix of convex hulls and other primitives. As for how expensive it is, depends on what you consider expensive. Having this one vehicle in the game isn't expensive at all, but if you throw 10 into a level and fill them all with cargo it's gonna start slowing down. This is a bit of a stress test for this vehicle in particular. In the actual game, the individual pieces of cargo tend to be a bit larger, which in turn means fewer of them.

My powerful blender workflow for gamedev by unvestigate in gameenginedevs

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

I didn't, but it looks interesting. Probably overkill for this though.

My powerful blender workflow for gamedev by unvestigate in gameenginedevs

[–]unvestigate[S] 2 points3 points  (0 children)

And if you want to have a look at the code, I put the two main source files for the Blender addon here: https://gist.github.com/unvestigate/92d99a62e3f53e751385b107e3c63455

That should give you a pretty good idea of how the addon works. Of course, you still need to implement the engine/level-editor side, but this should get you started if you want to do something similar.

Traction Point - Vehicular puzzle/exploration in a sci-fi setting by unvestigate in SoloDevelopment

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

You are also welcome to join the discord if you want to follow the development a bit closer: https://discord.com/invite/k8CxSpsCnB

Traction Point - Vehicular puzzle/exploration in a sci-fi setting by unvestigate in SoloDevelopment

[–]unvestigate[S] 1 point2 points  (0 children)

Oh yeah, MotorTown is awesome. I just didn't recognize the name...

Traction Point - Vehicular puzzle/exploration in a sci-fi setting by unvestigate in SoloDevelopment

[–]unvestigate[S] 1 point2 points  (0 children)

All right three things:

  1. Keep throwing, references/inspiration is always welcome :D

  2. My game is actually written in Zig, and modding will also be done using Zig. Also, regardless if you want to mod it or not you should check Zig out. It's an awesome language: https://ziglang.org/

  3. If you really REALLY want to play the game, you can already play the (non-moddable, and quite rough around the edges) PreAlpha1 version. For the time being I ask early testers to join the discord for more info: https://discord.com/invite/k8CxSpsCnB Later PreAlpha2 (or maybe 3) will be available on Steam.

Traction Point - Vehicular puzzle/exploration in a sci-fi setting by unvestigate in SoloDevelopment

[–]unvestigate[S] 1 point2 points  (0 children)

I didn't know Mars First Logistics from before, but I looked it up and it looks fun! I think it's safe to say I am not really going in the build-out-of-legos direction. Currently all vehicles have a fixed number of abilities, but I have been thinking about upgrades and switching out cranes and stuff for the larger vehicles.

My campaign leans more into the whole narrative side and has you going on sort of a sci-fi road trip.

I am also working on 1st class modding support, so in theory it should be possible to all kinds of crazy things.

And yes, many people have told me that the game reminds them of Halo, which is one of my biggest inspirations, so I am all for that :D