pacman.zig

Simple Pacman clone written in Zig. (by floooh)

Pacman.zig Alternatives

Similar projects and alternatives to pacman.zig

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better pacman.zig alternative or higher similarity.

pacman.zig discussion

Log in or Post with

pacman.zig reviews and mentions

Posts with mentions or reviews of pacman.zig. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-08-04.
  • Porting My JavaScript Game Engine to C for No Reason
    6 projects | news.ycombinator.com | 4 Aug 2024
    Yes, for instance this is mixed Zig/C project (the C part are the sokol headers for the platform-glue code):

    https://floooh.github.io/pacman.zig/pacman.html

    The Git repo is here:

    https://github.com/floooh/pacman.zig

    ...in this specific project, the Emscripten SDK is used for the link step (while compilation is handled by the Zig compiler, both for the Zig and C sources).

    The Emscripten linker enables the 'embedded Javascript' EM_JS magic used by the C headers, and it also does additional WASM optimizations via Binaryen, and creating the .html and .js shim file needed for running WASM in browsers.

  • Zig and WASM
    11 projects | news.ycombinator.com | 13 Jul 2022
    For a somewhat more complete example which runs in browsers, check out my little pacman.zig toy project [0]. This is cheating a bit by using Emscripten toolchain as 'sysroot' (needed for the Emscripten headers), and the Emscripten linker to create the html+js+wasm output file, but the actual code is all compiled with the Zig compiler.

    The interesting part is that the platform abstraction is provided by the sokol headers [1], with auto-generated Zig bindings [2]. It's interesting because the C headers use "Emscripten magic" (mainly embedding Javascript snippets in the C sources via the EM_JS() macro), and the Zig compiler is able to compile this (when it has access to the Emscripten headers).

    It would be nice if the "Emscripten platform" could get the same type of cross-compilation support as the desktop platforms eventually, but apart from bundling the Emscripten headers, this would also require to implement some of the "Emscripten magic" in the linker step.

    Maybe projects like WaJIC can help with this (this basically implements the "Emscripten magic" of embedding Javascript snippets in C/C++ source code, but without Emscripten (only the wasm-opt tool is needed AFAIK).

    Anyway... it's a lot of fun to tinker around with this stuff in Zig, and watch how it's all taking shape :)

    [0] https://github.com/floooh/pacman.zig

  • Cross-platform build with 3rd-party libraries?
    3 projects | /r/Zig | 17 May 2022
  • To Learn a New Language, Read Its Standard Library
    9 projects | news.ycombinator.com | 24 Oct 2021
    My advice would be: to learn a new language, start writing some non-trivial projects in it (a few thousand lines of code or so). In some languages (like Python), the standard library is the actually important feature, in other languages (like C), it better to mostly ignore the stdlib. Example: I started learning Zig by writing a Pacman clone (https://github.com/floooh/pacman.zig) and a home computer emulator (https://github.com/floooh/kc85.zig), the Pacman clone doesn't use any Zig stdlib features at all, and the emulator only minimally for parsing command line args and loading data from files.

    Zig's stdlib is much more useful than C's, but it's still entirely possible to write useful programs without it and instead focus on learning Zig's language features first.

    But on the other extreme, the whole point why I learned Python was its "batteries included" standard library.

  • A note from our sponsor - SaaSHub
    www.saashub.com | 15 Oct 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic pacman.zig repo stats
4
235
7.2
about 1 month ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com