foxnne / aftersun

Top-down 2D RPG
MIT License
230 stars 10 forks source link

This seems cool, doesn't run on zig 0.11 or 0.10.1 #7

Closed jeffbdavenport closed 1 year ago

jeffbdavenport commented 1 year ago

I wanted to check this out, but doesn't run on windows 10.

I get closest with zig 0.11, when I build I get:

$ zig build
zig build-exe Aftersun Debug native: error: the following command failed with 1 compilation errors:
C:\Users\Jeff\bin\zig11.exe build-exe C:\projects\zig\aftersun\src\aftersun.zig -lole32 -ldxguid -ldawn -cflags -std=c++17 -fno-sanitize=undefined -- C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\dawn.cpp -cflags -fno-sanitize=undefined -- C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\dawn_proc.c C:\projects\zig\aftersun\zig-cache\o\d08d17c2044d13e960fb9d2ff020cce5\zglfw.lib -lgdi32 -luser32 -lshell32 C:\projects\zig\aftersun\zig-cache\o\8ac08956a73d2dbdaef218fbad6f10a2\zstbi.lib C:\projects\zig\aftersun\zig-cache\o\583c3317334831cb86a37003375337e5\zgui.lib C:\projects\zig\aftersun\zig-cache\o\aa98fb93dc3ed63d068dbb65e92cb886\zflecs.lib -lws2_32 -lc++ -lc --cache-dir C:\projects\zig\aftersun\zig-cache --global-cache-dir C:\Users\Jeff\AppData\Local\zig --name Aftersun --mod zgui:zgui_options:C:\projects\zig\aftersun\src\deps\zig-gamedev\zgui\src\gui.zig --mod zgpu:zgpu_options,zglfw,zpool:C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig --mod zpool::C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\main.zig --mod zglfw::C:\projects\zig\aftersun\src\deps\zig-gamedev\zglfw\src\zglfw.zig --mod zgpu_options::C:\projects\zig\aftersun\zig-cache\c\29e356e0b490461ab2d836668693280b\options.zig --mod zmath_options::C:\projects\zig\aftersun\zig-cache\c\5792e23c853e02a54d22bc95149cc585\options.zig --mod zflecs::C:\projects\zig\aftersun\src\deps\zig-gamedev\zflecs\src\zflecs.zig --mod zstbi::C:\projects\zig\aftersun\src\deps\zig-gamedev\zstbi\src\zstbi.zig --mod zmath:zmath_options:C:\projects\zig\aftersun\src\deps\zig-gamedev\zmath\src\main.zig --mod zgui_options::C:\projects\zig\aftersun\zig-cache\c\7b8eb73ffa0cf35d78ecd9860ade3d2d\options.zig --deps zstbi,zmath,zpool,zglfw,zgpu,zgui,zflecs,zgpu_options -I C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\libs\dawn\include -I C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src -I C:\projects\zig\aftersun\src\deps\zig-gamedev\zflecs\libs\flecs -L C:\Users\Jeff\AppData\Local\zig\p\1220f9448cde02ef3cd51bde2e0850d4489daa0541571d748154e89c6eb46c76a267 -L C:\projects\zig\aftersun\src\deps\zig-gamedev\system-sdk\windows\lib\x86_64-windows-gnu -fno-lto --listen=-
Build Summary: 8/11 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
├─ zig build-exe Aftersun Debug native 1 errors
└─ install Aftersun transitive failure
   └─ zig build-exe Aftersun Debug native (+11 more reused dependencies)
src\aftersun.zig:116:18: error: no field named 'is_pub' in struct 'builtin.Type.Declaration'
        if (decl.is_pub) {
                 ^~~~~~
C:\Users\Jeff\bin\lib\std\builtin.zig:438:29: note: struct declared here
    pub const Declaration = struct {

Declaration does not seem to have a field called is_pub, so if I comment out that line it builds, but when I run it I get a white screen for a millisecond and it crashes with this output:

 zig build && ./zig-out/bin/Aftersun.exe
Warning: DiscoverDefaultPhysicalDevices is deprecated. Call EnumerateAdapters or RequestAdapter instead.
info: [zgpu] High-performance device has been selected:
info: [zgpu]   Name: NVIDIA GeForce RTX 3080 Laptop GPU
info: [zgpu]   Driver: D3D12 driver version 31.0.15.3623
info: [zgpu]   Adapter type: discrete_gpu
info: [zgpu]   Backend type: d3d12
error(gpa): memory address 0x1df21670000 leaked:
???:?:?: 0x7ff6436189bf in ??? (???)
???:?:?: 0x7ff643619461 in ??? (???)
???:?:?: 0x7ff6436196e6 in ??? (???)
???:?:?: 0x7ff6435f5ba1 in ??? (???)

error(gpa): memory address 0x1df168b0000 leaked:
???:?:?: 0x7ff6435f4542 in ??? (???)
???:?:?: 0x7ff6435fabf4 in ??? (???)
???:?:?: 0x7ff643609903 in ??? (???)
???:?:?: 0x7ff64360e1fc in ??? (???)

error(gpa): memory address 0x1df168b0800 leaked:
???:?:?: 0x7ff64361d2af in ??? (???)
???:?:?: 0x7ff64361dd51 in ??? (???)
???:?:?: 0x7ff64361dfd6 in ??? (???)
???:?:?: 0x7ff6435f5fb1 in ??? (???)

error(gpa): memory address 0x1df168f0000 leaked:
???:?:?: 0x7ff643616c9f in ??? (???)
???:?:?: 0x7ff643617741 in ??? (???)
???:?:?: 0x7ff6436179c6 in ??? (???)
???:?:?: 0x7ff6435f5a01 in ??? (???)

error(gpa): memory address 0x1df216a0000 leaked:
???:?:?: 0x7ff64361a6df in ??? (???)
???:?:?: 0x7ff64361b181 in ??? (???)
???:?:?: 0x7ff64361b406 in ??? (???)
???:?:?: 0x7ff6435f5d41 in ??? (???)

error(gpa): memory address 0x1df16900000 leaked:
???:?:?: 0x7ff643617b2f in ??? (???)
???:?:?: 0x7ff6436185d1 in ??? (???)
???:?:?: 0x7ff643618856 in ??? (???)
???:?:?: 0x7ff6435f5ad1 in ??? (???)

error(gpa): memory address 0x1df21690000 leaked:
???:?:?: 0x7ff64361984f in ??? (???)
???:?:?: 0x7ff64361a2f1 in ??? (???)
???:?:?: 0x7ff64361a576 in ??? (???)
???:?:?: 0x7ff6435f5c71 in ??? (???)

error(gpa): memory address 0x1df216b0000 leaked:
???:?:?: 0x7ff64361b56f in ??? (???)
???:?:?: 0x7ff64361c021 in ??? (???)
???:?:?: 0x7ff64361c2a6 in ??? (???)
???:?:?: 0x7ff6435f5e11 in ??? (???)

error(gpa): memory address 0x1df216d0000 leaked:
???:?:?: 0x7ff6435f61a4 in ??? (???)
???:?:?: 0x7ff6435fad13 in ??? (???)
???:?:?: 0x7ff643609903 in ??? (???)
???:?:?: 0x7ff64360e1fc in ??? (???)

error(gpa): memory address 0x1df21700000 leaked:
???:?:?: 0x7ff6435f62a3 in ??? (???)
???:?:?: 0x7ff6435fad13 in ??? (???)
???:?:?: 0x7ff643609903 in ??? (???)
???:?:?: 0x7ff64360e1fc in ??? (???)

error(gpa): memory address 0x1df168e0000 leaked:
???:?:?: 0x7ff6436159df in ??? (???)
???:?:?: 0x7ff6436168b1 in ??? (???)
???:?:?: 0x7ff643616b36 in ??? (???)
???:?:?: 0x7ff6435f5931 in ??? (???)

error(gpa): memory address 0x1df168d0000 leaked:
???:?:?: 0x7ff64361c40f in ??? (???)
???:?:?: 0x7ff64361cec1 in ??? (???)
???:?:?: 0x7ff64361d146 in ??? (???)
???:?:?: 0x7ff6435f5ee1 in ??? (???)

error: FileNotFound
???:?:?: 0x7ff64367987a in ??? (???)
???:?:?: 0x7ff643621328 in ??? (???)
???:?:?: 0x7ff6435f7a79 in ??? (???)
???:?:?: 0x7ff6435f7546 in ??? (???)
???:?:?: 0x7ff6435f8644 in ??? (???)
???:?:?: 0x7ff6435fae2f in ??? (???)
???:?:?: 0x7ff64360993b in ??? (???)

How can I get it to run?

foxnne commented 1 year ago

Hi! Thanks for checking it out and giving it a shot. I haven't fully updated is as nightly just got some changes that my dependencies haven't gotten yet. I have it currently running using zig 0.11.0-dev.3986+e05c242cd Screenshot 2023-07-31 at 7 25 45 PM if you can track it down, and as soon as zig-gamedev updates to latest I'll update this project. I don't have a Win10 machine to test right now but it runs fine for me on Windows 11.

kamidev commented 1 year ago

if you can track it down, and as soon as zig-gamedev updates to latest I'll update this project. I don't have a Win10 machine to test right now but it runs fine for me on Windows 11.

Hi @foxnne! Zig-gamedev is now updated to work with zig 0.11.0-dev.4332. So you can probably update now.

jeffbdavenport commented 1 year ago

Thanks guys! I will try this very soon

jeffbdavenport commented 1 year ago

Just tried with the build 0.11.0-dev.3986+e05c242cd and below is the result for me. Still just a blank white screen for a split second

$ ./zig-out/bin/Aftersun.exe
Warning: DiscoverDefaultPhysicalDevices is deprecated. Call EnumerateAdapters or RequestAdapter instead.
info: [zgpu] High-performance device has been selected:
info: [zgpu]   Name: NVIDIA GeForce RTX 3080 Laptop GPU
info: [zgpu]   Driver: D3D12 driver version 31.0.15.3623
info: [zgpu]   Adapter type: discrete_gpu
info: [zgpu]   Backend type: d3d12
error(gpa): memory address 0x1e141780000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5840f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf58ea2 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf59106 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35b91 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e141720000 leaked:
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:205:42: 0x7ff6cdf3451e in create (Aftersun.exe.obj)
        const gctx = try allocator.create(GraphicsContext);
                                         ^
C:\projects\zig\aftersun\src\aftersun.zig:138:49: 0x7ff6cdf3a9e4 in init (Aftersun.exe.obj)
    const gctx = try zgpu.GraphicsContext.create(allocator, window);
                                                ^
C:\projects\zig\aftersun\src\aftersun.zig:846:21: 0x7ff6cdf4964b in main (Aftersun.exe.obj)
    state = try init(allocator, window);
                    ^
C:\Users\Jeff\bin\lib\std\start.zig:507:101: 0x7ff6cdf4de44 in main (Aftersun.exe.obj)
    return @call(.always_inline, callMainWithArgs, .{ @as(usize, @intCast(c_argc)), @as([*][*:0]u8, @ptrCast(c_argv)), envp });
                                                                                                    ^

error(gpa): memory address 0x1e141720800 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5cc0f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf5d6a2 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf5d906 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35fa1 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e141760000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5674f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf571e2 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf57446 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf359f1 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e141750000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5551f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf56382 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf565e6 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35921 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e14c540000 leaked:
C:\projects\zig\aftersun\src\gfx\batcher.zig:39:43: 0x7ff6cdf36194 in init (Aftersun.exe.obj)
        var vertices = try allocator.alloc(gfx.Vertex, max_quads * 4);
                                          ^
C:\projects\zig\aftersun\src\aftersun.zig:147:41: 0x7ff6cdf3ab03 in init (Aftersun.exe.obj)
    const batcher = try gfx.Batcher.init(allocator, gctx, settings.batcher_max_sprites);
                                        ^
C:\projects\zig\aftersun\src\aftersun.zig:846:21: 0x7ff6cdf4964b in main (Aftersun.exe.obj)
    state = try init(allocator, window);
                    ^
C:\Users\Jeff\bin\lib\std\start.zig:507:101: 0x7ff6cdf4de44 in main (Aftersun.exe.obj)
    return @call(.always_inline, callMainWithArgs, .{ @as(usize, @intCast(c_argc)), @as([*][*:0]u8, @ptrCast(c_argv)), envp });
                                                                                                    ^

error(gpa): memory address 0x1e14c570000 leaked:
C:\projects\zig\aftersun\src\gfx\batcher.zig:40:42: 0x7ff6cdf36293 in init (Aftersun.exe.obj)
        var indices = try allocator.alloc(u32, max_quads * 6);
                                         ^
C:\projects\zig\aftersun\src\aftersun.zig:147:41: 0x7ff6cdf3ab03 in init (Aftersun.exe.obj)
    const batcher = try gfx.Batcher.init(allocator, gctx, settings.batcher_max_sprites);
                                        ^
C:\projects\zig\aftersun\src\aftersun.zig:846:21: 0x7ff6cdf4964b in main (Aftersun.exe.obj)
    state = try init(allocator, window);
                    ^
C:\Users\Jeff\bin\lib\std\start.zig:507:101: 0x7ff6cdf4de44 in main (Aftersun.exe.obj)
    return @call(.always_inline, callMainWithArgs, .{ @as(usize, @intCast(c_argc)), @as([*][*:0]u8, @ptrCast(c_argv)), envp });
                                                                                                    ^

error(gpa): memory address 0x1e141770000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf575af in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf58042 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf582a6 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35ac1 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e141740000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5bd9f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf5c842 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf5caa6 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35ed1 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e14c510000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5a0cf in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf5ab62 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf5adc6 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35d31 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e14c520000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5af2f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf5b9d2 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf5bc36 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35e01 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error(gpa): memory address 0x1e14c500000 leaked:
C:\Users\Jeff\bin\lib\std\multi_array_list.zig:422:51: 0x7ff6cdf5926f in setCapacity (Aftersun.exe.obj)
            const new_bytes = try gpa.alignedAlloc(
                                                  ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:179:42: 0x7ff6cdf59d02 in reserve (Aftersun.exe.obj)
            try self._storage.setCapacity(self._allocator, min_capacity);
                                         ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zpool\src\pool.zig:143:29: 0x7ff6cdf59f66 in initCapacity (Aftersun.exe.obj)
            try self.reserve(min_capacity);
                            ^
C:\projects\zig\aftersun\src\deps\zig-gamedev\zgpu\src\zgpu.zig:1373:43: 0x7ff6cdf35c61 in init (Aftersun.exe.obj)
            const pool = Pool.initCapacity(allocator, capacity) catch unreachable;
                                          ^

error: FileNotFound
C:\Users\Jeff\bin\lib\std\os\windows.zig:132:39: 0x7ff6cdfb8c9a in OpenFile (Aftersun.exe.obj)
            .OBJECT_PATH_NOT_FOUND => return error.FileNotFound,
                                      ^
C:\Users\Jeff\bin\lib\std\fs.zig:1241:23: 0x7ff6cdf60a69 in openFileW (Aftersun.exe.obj)
            .handle = try w.OpenFile(sub_path_w, .{
                      ^
C:\Users\Jeff\bin\lib\std\fs.zig:1120:13: 0x7ff6cdf379f6 in openFile (Aftersun.exe.obj)
            return self.openFileW(path_w.span(), flags);
            ^
C:\projects\zig\aftersun\src\tools\fs.zig:5:18: 0x7ff6cdf374d6 in read (Aftersun.exe.obj)
    const file = try std.fs.cwd().openFile(filename, .{});
                 ^
C:\projects\zig\aftersun\src\gfx\atlas.zig:13:22: 0x7ff6cdf384e4 in initFromFile (Aftersun.exe.obj)
        const read = try fs.read(allocator, file);
                     ^
C:\projects\zig\aftersun\src\aftersun.zig:149:19: 0x7ff6cdf3ac1f in init (Aftersun.exe.obj)
    const atlas = try gfx.Atlas.initFromFile(allocator, assets.aftersun_atlas.path);
                  ^
C:\projects\zig\aftersun\src\aftersun.zig:846:13: 0x7ff6cdf49683 in main (Aftersun.exe.obj)
    state = try init(allocator, window);
            ^
foxnne commented 1 year ago

Thanks for the update!

When you cloned the project, did you clone with --recursive? The assets folder is a submodule, and it looks like it's unable to find the atlas file. Please verify that the assets folder is present and has the files in it :) If not, run git submodule update --init.

The assets folder also uses git LFS, I'm unsure if that's a requirement to clone the project correctly?

kamidev commented 1 year ago

@foxnne, are the zig-gamedev libraries in src/deps updated to the latest? Some breaking zig changes were fixed as late as today.

foxnne commented 1 year ago

@kamidev No, last update from zig-gamedev I pushed into this project was 5 days ago, however, I'm currently running the project just fine on the zig version mentioned above. I will update this project's dependencies and everything to latest soon, just was hoping to wait long enough for mach to catch up as my other project uses that and I didn't want to juggle versions.

foxnne commented 1 year ago

But it looks like the issue here is FileNotFound and the other errors are leaks reporting from gpa when the program crashed from not finding the atlas file.

kamidev commented 1 year ago

I understand completely. Everything will probably be easier after the final zig 0.11 is released later this week.

Zig-gamedev builds and all tests pass using the latest zig as of today. And I know the Mach gang is working really hard to get on top of the latest zig, too. Perhaps the best thing to do is wait until this weekend?

kamidev commented 1 year ago

That said, the reported issue with assets may be unrelated to zig version. I just tried building a fresh clone of aftersun recursively, with Git LFS installed. The build failed with errors in zig-gamedev libraries that were not updated - no surprise there. But fetching the assets worked just fine.

foxnne commented 1 year ago

Thank you for the info! I'll let @jeffbdavenport confirm he has the assets folder, but hopefully its just a missing assets folder from not using --recursive, I know I forget to use that all too often. As soon as I'm unblocked from updating zig I'll get both Pixi and Aftersun updated to latest, I just am still working on both projects and using Pixi to update artwork for Aftersun so it would be a pain to have them not in sync. Usually mach is pretty quick to update so I wouldn't be surprised if I get to update everything tonight.

kamidev commented 1 year ago

Thank you! I am looking forward to play a little with both Aftersun and Pixi once things have settled down a bit. BTW - it's really cool to hear that you are using Pixi for Aftersun artwork.

foxnne commented 1 year ago

@kamidev by the way, if you ever want to give Pixi a shot, Aftersun is a great example of the workflow. Just run Pixi and open the Aftersun/assets folder. You'll have access in src to all the unpacked source art files. Then just navigate to the Packer tab and press Pack. You'll get a preview of the whole projects packed atlas, and can export it to the images asset folder.

If any of the packing changes the exported atlas data, there is a zig build option to "Process assets" which will update the generated zig code and get it all working in the game. It's a decently smooth workflow and I'd love to hear your opinion on Pixi's workflow and if anything would be better done another way :)

foxnne commented 1 year ago

Thank you! I am looking forward to play a little with both Aftersun and Pixi once things have settled down a bit. BTW - it's really cool to hear that you are using Pixi for Aftersun artwork.

Thank you! I really started out building Pixi just to use for this project but I think it might end up being helpful for others so I'm trying to polish it as much as possible and use this project as a reference to make the workflow as easy as possible. Dealing with tons of sprites can be a real headache.

jeffbdavenport commented 1 year ago

I tested it out, you were right, I just needed to clone the assets and everything works. This is well done so far! Personally I'm not a big fan of the camera movement, but everything else is great

foxnne commented 1 year ago

Thanks! Glad it worked! I'm still trying to just get all the rendering pipelines right still. I do need to rework the camera movement.