Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

82: Add a pure client build that leverages Nix #83

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

schonfinkel
Copy link
Collaborator

@schonfinkel schonfinkel commented Dec 13, 2024

Summary

image

it almost works, I just need to add the assets to the build as well.

Testing

  1. nix build .#client
  2. ./result/bin/lyceum-client

@schonfinkel schonfinkel self-assigned this Dec 13, 2024
@schonfinkel schonfinkel added bug Something isn't working enhancement New feature or request client Client-related issues labels Dec 13, 2024
@schonfinkel schonfinkel modified the milestone: v0.2.0 Dec 13, 2024
@schonfinkel
Copy link
Collaborator Author

schonfinkel commented Dec 14, 2024

@z-silver @EduardoLR10 I'm putting the assets in same directory ($out) as the executable.

INFO: TIMER: Target time per frame: 16.667 milliseconds
WARNING: FILEIO: [./assets/menu/connection/not-connected.png] Failed to open file
WARNING: FILEIO: [./assets/menu/connection/connected.png] Failed to open file
WARNING: FILEIO: [./assets/menu/music/03-Linear-B.ogg] Music file could not be opened
WARNING: FILEIO: [./assets/menu/logo.png] Failed to open file
WARNING: FILEIO: [./assets/menu/backgrounds/main.png] Failed to open file
WARNING: FILEIO: [./assets/menu/backgrounds/character_selection.png] Failed to open file
WARNING: FILEIO: [./assets/menu/font.otf] Failed to open file
INFO: FONT: Data loaded successfully (32 pixel size | 95 glyphs)
WARNING: FILEIO: [./assets/menu/sounds/buttons/select.ogg] Failed to open file
WARNING: FILEIO: [./assets/menu/sounds/buttons/click.ogg] Failed to open file
WARNING: FILEIO: [./assets/menu/sounds/error.ogg] Failed to open file
INFO: TEXTURE: [ID 3] Texture loaded successfully (280x280 | R8G8B8A8 | 1 mipmaps)
WARNING: FILEIO: [./assets/game/world/tiles/water/water.obj] Failed to open text file
WARNING: MESH: [./assets/game/world/tiles/water/water.obj] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/tiles/water/water.obj] Failed to load model material data, default to white material
WARNING: FILEIO: [./assets/game/world/tiles/water/water.png] Failed to open file
WARNING: FILEIO: [./assets/game/world/tiles/grass/grass.obj] Failed to open text file
WARNING: MESH: [./assets/game/world/tiles/grass/grass.obj] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/tiles/grass/grass.obj] Failed to load model material data, default to white material
WARNING: FILEIO: [./assets/game/world/tiles/grass/grass.png] Failed to open file
WARNING: FILEIO: [./assets/game/world/tiles/sand/sand.obj] Failed to open text file
WARNING: MESH: [./assets/game/world/tiles/sand/sand.obj] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/tiles/sand/sand.obj] Failed to load model material dat
a, default to white material
WARNING: FILEIO: [./assets/game/world/tiles/sand/sand.png] Failed to open file
WARNING: FILEIO: [./assets/game/world/tiles/dirt/dirt.obj] Failed to open text file
WARNING: MESH: [./assets/game/world/tiles/dirt/dirt.obj] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/tiles/dirt/dirt.obj] Failed to load model material data, default to white material
WARNING: FILEIO: [./assets/game/world/tiles/dirt/dirt.png] Failed to open file
WARNING: FILEIO: [./assets/game/world/objects/bush/bush.obj] Failed to open text file
WARNING: MESH: [./assets/game/world/objects/bush/bush.obj] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/objects/bush/bush.obj] Failed to load model material data, default to white material
WARNING: FILEIO: [./assets/game/world/objects/tree/tree.glb] Failed to open file
WARNING: MESH: [./assets/game/world/objects/tree/tree.glb] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/objects/tree/tree.glb] Failed to load model material data, default to white material
WARNING: FILEIO: [./assets/game/world/objects/chest/chest.obj] Failed to open text file
WARNING: MESH: [./assets/game/world/objects/chest/chest.obj] Failed to load model mesh(es) data
WARNING: MATERIAL: [./assets/game/world/objects/chest/chest.obj] Failed to load model material data, default to white material

@schonfinkel
Copy link
Collaborator Author

schonfinkel commented Dec 16, 2024

@carlotm @ratsclub can you test this version later?

@carlotm
Copy link

carlotm commented Dec 17, 2024

@schonfinkel same crash. tried on two different laptops with Debian 12.

INFO: Initializing raylib 5.0
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
WARNING: GLFW: Error: 65542 Description: GLX: No GLXFBConfigs returned
WARNING: GLFW: Error: 65545 Description: GLX: Failed to find a suitable GLXFBConfig
WARNING: GLFW: Failed to initialize Window
Segmentation fault

@carlotm
Copy link

carlotm commented Dec 18, 2024

@schonfinkel Progress!

Run the client crashes as before, but I was able to run the client with this command:

nix run --impure github:nix-community/nixGL -- ./result/bin/lyceum-client

I have found out that OpenGL apps have issues on non-nixos OSes.
More info at https://github.com/nix-community/nixGL

However, I don't see the assets, same as the screenshot you posted

Cheers!

@schonfinkel
Copy link
Collaborator Author

schonfinkel commented Dec 18, 2024

@carlotm great to know! The missing assets are part of another bug when running a pure client build, it seems, but that's progress! 🚀

I'll see if it is possible to integrate nixGL into our flake, so it becomes part of the devenv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client Client-related issues enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't start the demo client
3 participants