▲ 0 r/rust_gamedev+1 crossposts

Project executable is not running when clicked on, but is running when I use the './project_name' command

Hello I am a semi-new rust programmer who has started making games using low level tools such as raylib for c/c++ and recently switched over to learning macroquad and rust. I enjoy using the language and come across a few headaches when try to compile a test game to run on other Os and got it that kinda working and wanted to try an export test just to do something different.

I was able to zip the executable no problem for both Mac Os and windows (linux is being a problem child that I'll save for another day) and when I went to check the Mac Os file I would click to run but that forces the program to abort before it even runs. I was trying to figure out what went wrong and tried to use the './project_name' command just to see if I could replicate the error but it ran just fine (as if I used 'cargo run' on my main file for this project).

I don't know how to exactly describe it other than I double click to run the program it crashes but if I use './project_name' it works.

I would like to have an idea of how to solve this problem before committing to try to using rust as my main programming language because I would like to publish my projects I make.

reddit.com
u/Professional_Top_544 — 8 days ago

How do I get concepts working on my file?

Hello I am trying to get concepts working in my file but I keep getting the error "Unknown type name concept" when I'm just trying to get a simple concept working. It is getting that this tool that I would like to use isn't here for some reason and I would like to know how to get it back. I think this a problem with my neovim config because I don't get this error in Vscode as well I am using

this file to compile and it compiles just fine.

g++ --std=c++20 -Wall -Wextra -Wpedantic -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL -Llib -Iinc -lraylib src/main.cpp -o build/main



#include <cstdint>
#include <unordered_map>
#include "../inc/raylib.h"

namespace ECS {

  using Entity = std::uint32_t; 

  struct Transform{
     Vector2 Position {};
  };

  struct Circle{
     float Radius {};
     Color Color {};
  };

  struct Movement{
     Vector2 Direction {};
  };

  template <typename T>
  concept ComponentConcept = 
    std::is_same_v<T, Movement> || std::is_same_v<T, Circle> ||           std::is_same_v<T, Transform> ; //error here
  class Current{
     public:
        Entity CreateEntinty(){
            return m_next_entity++;   
        }
     private:
        template<typename Component>
        class Storage{
           public:
           private:
              std::unordered_map<Entity, Component> m_storage{};
        };
     private:
        Entity m_next_entity { 1 };
  };
}
reddit.com
u/Professional_Top_544 — 1 month ago
▲ 5 r/neovim

Help With SDL3

Hello. I have been using neovim (basic Lazyvim config) for a bit now for c/c++ and rust game development. But currently I am having issues where my SDL/SDL3 libraries are not connecting in neovim

Here I am showing the same file in both Neovim and VsCode and as you can see neovim is producing an error that is not there in VsCode.

VsCode

NeoVim

The file structure in this project is like this

PROJECT/
  build/
    main
  src/
    main.c
  CMakeLists.txt

Is there something I'm doing wrong here and if so what can I do to fix it?

reddit.com
u/Professional_Top_544 — 2 months ago
▲ 6 r/raylib

Hello, I want to work with raylib but I was wondering how to implement normal maps into a 2D game? Is it possible with raylib? It is the case that I want to use 2d lighting in the game and good pixel shading.

reddit.com
u/Professional_Top_544 — 4 months ago