Zero Sugar Added Jam: the Zig gamejam!

Zero Sugar Added

A zig-only game jam, with a unique gimmick for each jam, focused on limiting you in fun ways!

A couple of months ago, me, @evaleek and @Sietse2202 decided we wanted to host a zig gamejam to show our love for the language, game development, and the community!

As said above, the jams will focus on limited environments; constraints that force you to
adapt in interesting ways, such as limited

  • resolution
  • audio frequency range or bitdepth
  • clock speed
  • rendering capabilities

This is done in large part via the target you’ll have to use. For the first jam, more on that down
below! For later jams it could be other fantasy consoles, specific libraries you have to use, or other limitations!

First edition

The first edition of this jam will take place from 2026-07-20T00:00:00Z until 2026-07-27T00:00:00Z and will require participants to make a game written in Zig using WASM-4; a simple console that runs on the web with good zig support.

For details on how to participate, how to get started, what zig-only exactly means, and the rules surrounding generative AI, more information can be found here!

Anyone is more than welcome to participate, even if you don’t plan on submitting!

32 Likes

me reading:

focused on limiting your fun in ways!

1 Like

Fun is, of course, reserved for those playing the games!

8 Likes

I won’t be participating, but I sure as hell would love to play any games that end up being submitted! Will those be posted here as well, or where should I be looking after the jam?

Best of luck with the event!!

4 Likes

Thank you! We will be making the list of entries available here on Ziggit, as well as other platforms like the main community Discord.

2 Likes

Looking forward to joining this!
I’m gonna be going into this with zero game dev experience, so wish me luck :​D
Hopefully the extremely limited platform will make it a bit easier to get into.

2 Likes

I used wasm4 in 2022, but then it was accessible to me, and I don’t have any experience in game dev either. So go for it, I’m sure gonna learn a lot.

4 Likes

I wrote TO THE CORE for the first WASM-4 jam! Later on teaching zig programming through Zoop Zoop Bee Adventures 7 in the same engine/fantasy console. It’s a fun one! I think the generated build.zig needs updating though.

2 Likes

Sounds fun, I will hopefully participate.

I hadn’t heard of WASM-4 before and it wasn’t super clear to me what it was, so if anyone was similarly confused it seems:

  • You write your zig application, using their tiny “library” for the platform bits (graphics, sound, input).
  • You build that for WASM, and end up with a my-game.wasm blob. This can be run with their binary with w4 run zig-out/bin/my-game.wasm.
    It’ll launch the game in your browser

In practice to get started from scratch:

  • Download w4
  • Run w4 new --zig my-game .
    This will make a new zig project with a (broken for 0.16 at time of writing) build.zig.
    The fix is very easy just replace the const exe declaration with
    const exe = b.addExecutable(.{ .name = "cart", .root_module = b.createModule(
        .{
            .root_source_file = b.path("src/main.zig"),
            .target = b.resolveTargetQuery(.{
                .cpu_arch = .wasm32,
                .os_tag = .freestanding,
            }),
            .optimize = b.standardOptimizeOption(.{}),
        },
    ) });
  • Then you should be to w4 run zig-out/bin/cart.wasm

edit: Oh and their docs seem good, one note is you can switch the snippets to be Zig instead of AssemblyScript

14 Likes

maybe an issue should be created for the wrong build.zig in the wasm4 repo, I know I am asking a lot and could do it myself.

Having said that, great that you provided the patch here. Thanks!

You’re right, thanks for the summary! We’ll provide instructions on how to get started in our next post.
If you’re interested, our own build script can be found in our template repository.

2 Likes

Don’t hesitate to toy with our template repo (link in my previous answer)! We wrote our own w4 wrapper and our own build script. We planned to announce that in the next post but I’m glad to see people are experimenting with it already haha

1 Like

We’re on fire. I plan to participate but can only do so in the evening, when I’m already tired. Or to be more precise, more tired than in the morning :wink:

Either way, thanks for all the work you put in there.

1 Like

Oh that’s much nicer, thank you :slight_smile: Sorry for jumping the gun!

1 Like

that’s nice, looking forward to participate!

2 Likes

I will try and participate. Thanks for organising!

2 Likes

It seems like binary size of wasm4 template is large enough to not fit into wasm4 emulator in ReleaseSmall.



seems like you just need to strip debug symbols and then its 398 bytes

    const game = b.createModule(.{
        .root_source_file = b.path("src/main.zig"),
        .target = target,
        .optimize = optimize,
        .imports = &.{
            .{ .name = "wasm4", .module = bindings },
        },
        .strip = true, // <---
    });
3 Likes

If you actually do --release=small or a similar command, it’ll strip debug symbols automatically and result in the same small size.
This possibly suggests that .preferred_optimize_mode is a lie.

2 Likes