Premake | Game Engine Series

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 280

  • @TheCherno
    @TheCherno  6 років тому +44

    Thanks for watching guys, hope you enjoyed the video! Next episode is already available for Patrons on www.patreon.com/posts/22782104 ❤️

    • @pulkitkhagta4218
      @pulkitkhagta4218 5 років тому +7

      I am getting the same copy error message as in video again and again , can anyone help me with this ?
      I am using visual studio 2019
      And premake 5.0 alpha 14

    • @CODECREAFTERS595
      @CODECREAFTERS595 5 місяців тому

      @@pulkitkhagta4218 sAME

  • @TheKaosNano
    @TheKaosNano 5 років тому +196

    Out of curiosity - how much of your core engine development skill/knowledge experience would you say you learned at EA vs Through personal project?

    • @pieprzu0077
      @pieprzu0077 Місяць тому +1

      Sad he didn't answered. I wonder how his answer would change after all of his experience with writing something THAT big from scratch

    • @DanielMo0
      @DanielMo0 22 дні тому +1

      I'd say you learn most of these things in your sparetime an personal projects/investigation. At work you mostly have these kind of things in place already and your "daily" work within your region of responsibility which often doesnt allow you to play around much. So from my experience much knowledge comes self-taught - specifically things that need to be done rarely (like setting up whole new projects). But doesn't need to apply to Yan of course. (btw. Iam programmer at Ubisoft)

  • @siniarskimar
    @siniarskimar 6 років тому +81

    For anyone considering CMake vs Premake.
    Premake:
    * Workspaces, Projects
    * Just like setting project in Visual Studio. Project is this and that, these files are used in it
    * Uses Lua
    CMake:
    * 1 Project - Some Targets
    * More logic based. ifs, options, variables
    * Uses it's own syntax

    • @siniarskimar
      @siniarskimar 5 років тому +8

      @Jerry Waters CMake is not that complicated, it's more advanced and it takes time to get used to it.
      CMake is logic based (if this then that), in Premake you are just defining what your project looks like (these are my include directories, this is project name ... and so on)

    • @faei1897
      @faei1897 2 роки тому

      Premake is broken now, sadly.
      Cannot compile the source, cannot run the pre-built version.
      Intel's i9-10900F causes errors and/or refuses to load premake at all in relevant directories on Windows 11.

    • @anon3643
      @anon3643 2 роки тому +1

      I'd like to mention how CMake makes git submodules easier. With Premake you'll need to fork a repo and add your premake file then reference that repo, like Cherno did. Your forked repo could get stale real quick. With CMake you can maintain your submodules directly with the 3rd party repos within your project.

    • @caareystore5058
      @caareystore5058 Рік тому +1

      What about Scons?

    • @tomkohler1609
      @tomkohler1609 Рік тому +1

      A CMake project is a Visual Studio Solutions and CMake targets are Visual Studio Projects. It's not that complicated. It also makes more sense, because a „solution“ is really a „project“.

  • @CodeBotter
    @CodeBotter 3 роки тому +30

    As others have commented below you will have to get the newer version of premake if you're using vs2019 change the batfile to be vs2019 not vs2017. As a sidenote the startfile also changes back to Hazel which causes an error to fix this and make it automatic in the lua premake file write
    workspace "Hazel"
    architecture "x64"
    startproject "Sandbox"

    • @hazzardmaddison4971
      @hazzardmaddison4971 2 роки тому +2

      I had to delete the .vs file before startproject "Sandbox" worked using vs2022 and premake v5.0.0-beta1
      and thank you this solved my error

    • @ntgrindshard8506
      @ntgrindshard8506 2 роки тому

      @@hazzardmaddison4971 I need help. I'm wroking in vs 2022. And the problem that I have is that when I create a text document and start working on it in visual studio like cherno did. The code doesn't even get highlighted

    • @hazzardmaddison4971
      @hazzardmaddison4971 2 роки тому

      @@ntgrindshard8506 did you create the file from the file browser? Visual studio could be recognizing it as a .txt file instead of a .cpp file. Cherno has a really good intro series to c++ that goes over setting up visual studio

    • @johnraz99
      @johnraz99 Рік тому

      @@hazzardmaddison4971 Thank you! Had the same problem. I still don't have Hazel showing up under References in the Sandbox project but the code does run.

  • @marklinton4567
    @marklinton4567 6 років тому +54

    Don't know about others, but to me that 30+ minutes of video felt like 10 min. Really interesting.

  • @anbaralutfullaeva9440
    @anbaralutfullaeva9440 5 років тому +8

    I had to switch to VS2019, and for the premake I am doing vs2019, but I am getting no such directory exists. Is it premake issue i.e. wrong version possibly incompatible with vs 2019? or VS setup? THanks!

  • @qarlqubicle8121
    @qarlqubicle8121 6 років тому +34

    CMake can be overwhelmingly verbose but I would still recommend learning it since you will run into CMakeLists more often than other build scripts and is used in the vast majority of open source projects.

  • @shreksthongg
    @shreksthongg 4 роки тому +8

    I'm in university right now for computer science, and I have to say, there is so much that they don't cover in school, or at least haven't yet covered. A lot of what this guy is teaching is brand new to me. I'm glad I found this series.

    • @nailbomb420
      @nailbomb420 4 роки тому

      That's probably because they're not the same subject.

    • @cyqry
      @cyqry 2 роки тому +2

      @@nailbomb420 Probably, learning computer science doesn't teach you ever single thing, especially when you consider how wide of a topic it really is.
      However when I was at University and college prior to it both for games programming, in those 5 years I never once was taught how to actually use source control.
      Sometimes the things they don't teach are the most vital.
      I don't think I'd know how to use source control, link libraries or any of the more advanced stuff you'd be expected to use above junior grade if not for these sorts of tutorials. Got to hand it to the software engineers who actually take the time to explain things.

  • @fredhair
    @fredhair 6 років тому +8

    Nice, interesting video. Lots of useful information about premake and how to use it. I also thought it's good how much detail you put into showing the directory structure which is very important in any medium to large sized projects, but many tutorials will overlook the fact that it's very important to have a good build system and well organized and easily maintained file systems. Keep it up bro!

  • @Patrick-ro1xx
    @Patrick-ro1xx 2 роки тому +3

    I'm back over half a year later so I rewatched the previous episodes. I understand the project better and I was finally able to pass this segment!
    I had previously switched relpath to abspath (it was suggested in the discord), but it didn't fix my build issue. I now switched it back to relpath, and my code can run, and the .dll file is copied.
    So I really did nothing different, but the code works. I do however have a better grasp of how our project is assembled, so that's good!
    Edit: Patreon incoming

  • @CL-pg6iu
    @CL-pg6iu 4 роки тому +7

    unfortunately the copy postbuild command is not working for me :8 I am on vstudio 2019. I get error MSB3073.

  • @tamriel_x
    @tamriel_x 5 років тому +3

    omg wow, ok so this video actually solved the issue ive been having the entire time ive been watching the videos and been unable to solve why i couldnt get the project or solution files.... this is amazing!!

  • @darkmethods9149
    @darkmethods9149 Місяць тому +2

    I'm sure this is done in future videos but if you hate having to tell Visual Studio which is the startup project after you regenerate them using premake you can add the following just after workspace like the following:
    workspace "Hazel"
    architecture "x64"
    startproject "Sandbox"
    Easy as that... no more clicking on Sandbox and setting it manually.

  • @tmirror7053
    @tmirror7053 Рік тому +8

    For anyone who has problems with the postbuild commands (for example error code 2), try using the following instead:
    postbuildcommands {
    "copy /B /Y ..\\bin\\" .. outputdir .. "\\Hazel\\Hazel.dll ..\\bin\\" .. outputdir .. "\\Sandbox\\ > nul"
    }
    There seems to be an unknown issue with the premake token COPY, that it cannot differantiate between targetfiles and -directories. This should fix it. Be aware that this is only applicable for the windows configuration.

    • @lucaaaa6382
      @lucaaaa6382 Рік тому

      What a G... Thanks!!! I was struggling with this for the past hour. It kept saying I have problems with the functions in the log class and it turns out it was because of the missing dll. Then when I looked closer it said that the copy command was unsuccessful or smth so thanks for this it totally fixed everything:)))

    • @MaxPlayle
      @MaxPlayle Рік тому

      Legend! Thank you :)

  • @VoylinsLife
    @VoylinsLife 2 роки тому +9

    Finally reached episode 7 in this series after struggling for a long time. Really love the informative series you've made but it is very difficult for Linux users who are just starting out with C++ ^^"
    But with this comes my question: Why do you actually use an IDE? I've been using vs code and although it was figuring out how to use it in the beginning, with a simple 'make' system and a proper makefile, it is actually quite simple.

    • @aaronvancuren7946
      @aaronvancuren7946 2 роки тому +3

      Visual Studio IDE (VS) is just Visual Studio Code (VSC) with a bunch of packages installed already. I personally don’t like messing with all of the packages and I love the debugging capabilities of VS. really comes down to preference.

    • @todorsamardzhiev144
      @todorsamardzhiev144 11 місяців тому

      @@aaronvancuren7946 They're quite different pieces of software. In the long term, Microsoft will probably be looking to sunset VS, but for now we gamedevs are stuck with it.

    • @todorsamardzhiev144
      @todorsamardzhiev144 11 місяців тому +1

      He's using Visual Studio, because he works in AAA gamedev and he's used to it. The workflow is usually so tied to Visual Studio, that most studios even have it in the job requirements. I mean... nobody will stop you from using, say, Emacs, but you'll very often get stuck, and you'll be on your own when you do. Why do big game studios use Visual Studio? Videogame codebases are tremendously large. The "solution explorer hangs if you try to open the project" kind of large. The "intellisense would flat out refuse to index it" kind of large. In addition, they're usually written in a rush. And, C++ is an extremely tough language to parse to begin with. Long story short, you *NEED* custom tools for navigation, compilation, refactoring, autocomplete, documentation, debugging, testing, formatting, version control, large files, custom languages, etc. These tools are usually written over the last 20+ years specifically for Visual Studio.
      So, for the foreseeable future, AAA game studios have programmed themselves into a corner and are therefore stuck with the godawful trio of Windows, C++, and Visual Studio.

  • @aayushanand8285
    @aayushanand8285 2 роки тому +2

    my defines are not added when I build the project files using premake... I followed everything just as cherno did, but when I generate the project files and try to build the project then, I get an error: Hazel only supports Windows. Why could this be happening? I've to manually add the preprocessor defines myself later 😞

  • @LlucMolletBordas
    @LlucMolletBordas 2 місяці тому +3

    If you are using newer versions of premake the {COPY} comand does not work anymore, use {COPYFILE} instead

  • @AxElKo440
    @AxElKo440 6 років тому +9

    Did anybody ever realize that we have never seen him typing on the keyboard? :-D Aside from that, I really like this video. I literally see how your level of skill increasis rapibly over time. Keep it up.

    • @wilfridtaylor
      @wilfridtaylor 6 років тому +22

      That is because he can type with his mind. The key sounds are just added during editing.

    • @aw1lt
      @aw1lt 3 роки тому

      @@wilfridtaylor what. thats impossible. stfu
      _im a troll looking for attention. woosh me pls_

  • @kevingarnett6739
    @kevingarnett6739 4 роки тому +4

    Sorry, but i have same error as you in 29:13 and it won't disapear when i hit f5... Actually my project is so broken now, that i can't do anything... Any help?

    • @partylouis9851
      @partylouis9851 3 роки тому

      Did you get it figured out?

    • @kevingarnett6739
      @kevingarnett6739 3 роки тому +1

      @@partylouis9851 i gave up.

    • @Sheeptoaster
      @Sheeptoaster Рік тому

      @@kevingarnett6739 If you're referring to the C1083 error, I just included "$(SolutionDir)Hazel/vendor/spdlog/include" in the Sandbox includedirs as well and that fixed it for me.
      includedirs
      {
      "$(SolutionDir)Hazel/vendor/spdlog/include",
      "$(SolutionDir)Hazel/src"
      }

    • @kevingarnett6739
      @kevingarnett6739 Рік тому

      @@Sheeptoaster thanks for reply, meanwhile I became c# regular xd

  • @matthewwarner3909
    @matthewwarner3909 5 років тому +1

    Are we going to use glfw3 or sdl2? I seem to have some trouble setting up glfw3 with premake and was wondering what the plan was and when I can expect a video for window creation? Thanks!

  • @matt-g-recovers
    @matt-g-recovers 3 роки тому

    Lua!
    Nice!
    Edit: Thanks to the guys with the v2019 headsup!!
    'No brainer' change that could have taken a long time to debug.
    the good thing is that by working through these issues we get a good handle on how it all works.

  • @tomlemmers285
    @tomlemmers285 5 років тому +4

    In between the minutes 22:00 and 24:00 he explains how to use "nested" filtering, which can only be created by using the different "if (statement && statement && etc)" syntax. But how would I build a dynamic library that supports 32-bit & 64-bit platforms, that has a Debug and Release configuration and can build to multiple different x amount of systems (for now I have Windows, Linux and Mac). This means I will have 2 * 2 * 3 = 12 filters, which might not even differ that much from each other. Is there really no more efficient or clean way to handle this sort of problem?

  • @dexterman6361
    @dexterman6361 3 роки тому

    Just a clarification.
    1) If I add new files, I need to regenerate the solution, correct?
    2) If I want to add new files, I need to add it from the system file manager, and not from visual studio (vs folders are just "filters", and not system-level folders when in solution explorer view)
    Have I got this correct?

  • @007LvB
    @007LvB 4 роки тому

    I love you! Thanks :D
    Jeez CMake is such a bother to use, didn't even know premake existed, but I think I will use it now for all eternity!

  • @davidboygenius6843
    @davidboygenius6843 6 років тому +8

    I want to make my own engine as well. Right now, I'm using unity for a 2D game I wanna finish. Good luck to everyone that's learning how to code.

    • @davidboygenius6843
      @davidboygenius6843 6 років тому

      I agree since all of my assets are raw 2d images. Now if I were had raw 3D images to make a 2D game. I think that would be totally fine with unity.

    • @davidboygenius6843
      @davidboygenius6843 6 років тому

      What do you recommend I try? I was going for SFML or SDL at first.

    • @TheFlynCow
      @TheFlynCow 5 років тому

      Brain Devloper Dimensional
      Unity is great for 2D games. "they take more space" is not really an argument as the size of the engine files has nothing to do with if the engine supports only 2D or 3D or whatever.
      I also dont see what "more functionality" pure 2D engines can offer over unity.

    • @slathian1223
      @slathian1223 5 років тому

      @@TheFlynCow I'm looking for an engine that allows for direct calls to the Rendering Queue that allows for pixel manipulation of one overlaid texture / Color [] as a shadowRenderer. Unity does not allow this which makes real time Isometric 2D shadows impossible... I do however have all of the code built tested and working but uses texture creation within unity which is very inefficient.

  • @nindiegamer790
    @nindiegamer790 3 роки тому +6

    I was having the same issue with builds failing on the COPY step when using vs2019.
    If you go to the properties on the dll project, navigate to Build Events -> Post Build -> Command Line, it shows the copy command that premake generates. For me, I named my engine "Cool Engine", but premake was only spitting out "Cool", so the command was pointing to a file that doesn't exist. I don't know if the parser has trouble with spaces or what, but that the issue.
    Either the COPY command has to change so it generates a valid path or it can be removed so you manually enter the correct command.

  • @assnz9526
    @assnz9526 5 років тому

    Hi Cherno! After generating solution with Premake, folders that existed inside the Solution (like "Headers Files", "Resource Files") disappeared. They disapper after each generating. Why?

  • @harshitbargujar8636
    @harshitbargujar8636 4 роки тому

    I am trying to configure vulkan with premake and the only thing am getting is that my vulkan-1.lib is not made i.e my vulkan include files did not compile in vs19 . Any help would be great.

  • @sam974fe
    @sam974fe 3 роки тому

    Is there a command to copy a folder in premake ? I tried {COPYDIR}, os.execute, {COPY}, but none of them works for me on windows..

  • @Larfage
    @Larfage Рік тому +1

    Odd issues I've run into and am trying to debug:
    ~ The premake build works but it breaks a few things. After running the batch file to premake build, when opening the solution in VS, the linker settings for Sandbox project get reset and no longer finds Hazel.h. I have to manually reset the Additional Include Directories every time the project builds.
    ~ After fixing this, when attempting to F5, VS has an issue with a weird Post-Build Event, "The command "IF EXIST ..\bin\\Debug-windows-x86_64..." (a lot more shit) ".. exited with code 4". No idea what this is.
    ~ A new error, LNK1104: cannot open file 'Hazel.lib' from bin\debug\hazel directory. No idea what this is or how to fix it.

    • @remdev7510
      @remdev7510 11 місяців тому

      Had the same problem, I found out that I dind't game the same name for my sandbox and forgot about it in the copy command, had to then rebuild with the bat file and it worked.

  • @xaqshana
    @xaqshana 5 років тому +1

    getting an error in command I cant solve
    unexpected symbol near ''
    but that doesnt appear anywhere in the code like this error normally shows.
    thoughts?

    • @kingofspades9720
      @kingofspades9720 4 місяці тому

      This is 5 years old, but '' is referring to the ascii character 255, not the literal character '', which is a weird whitespace character, you can write it with ALT + 2 5 5 using the numpad, you wont see anything, but it is this character ( ).

  • @andrewromans7566
    @andrewromans7566 4 роки тому +4

    Anyone run into issues where they have to manually "Right Click->Include In Project" .h and .cpp files? My Premake file doesn't seem to be including script files correctly - looked around the ol' interwebs and couldn't find anything. Any suggestions?

    • @andrewromans7566
      @andrewromans7566 4 роки тому +3

      Resolved my own question - not sure if it is a Premake5 alpha 14 thing, but the token "%{prj.name}. . . " was not working for me within the files { ... } list. Had to hard code the project name values.

    • @andrewromans7566
      @andrewromans7566 4 роки тому +1

      Further more, if you make a variable outside the scope of files (similar to outputdir Cherno mentioned in the video), the token link "%{prj.name}/src/**.cpp" works. -- Putting this here in case anyone runs into the same issue :)

    • @JoseRodriguez-rx4ck
      @JoseRodriguez-rx4ck 4 роки тому

      @@andrewromans7566 I am having a lot of troubles with this thing, I don't get your solution, could you please expand on what it means to "create a variable outside the scope of files"?

    • @frankishempire2322
      @frankishempire2322 4 роки тому +2

      @@andrewromans7566 Thanks pal
      Edit: Replace /%{prj.name} with /%{prj.location} and it will be replaced with visual studio´s $(ProjectDir)

  • @AmanSharma-pk9iz
    @AmanSharma-pk9iz 3 роки тому +1

    This is not working for me, all the target folders get created but DLL file is not created even when build of Hazel project shows no error.
    Can somebody help?

    • @AmanSharma-pk9iz
      @AmanSharma-pk9iz 3 роки тому

      workspace "Hazel"
      architecture "x64"
      configurations { "Debug", "Release", "Dist" }
      outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
      project "Hazel"
      location "Hazel"
      kind "SharedLib"
      language "C++"
      targetdir ("bin/" .. outputdir .. "/%{prj.name}")
      objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
      files { "%{prj.name}/src/**.h}", "%{prj.name}/src/**.cpp}" }
      includedirs { "%{prj.name}/vendor/spdlog/include" }
      filter "system:windows"
      cppdialect "Default"
      staticruntime "On"
      systemversion "10.0.17763.0"
      defines { "HZ_PLATFORM_WINDOWS", "HZ_BUILD_DLL" }
      filter "configurations:Debug"
      defines {"HZ_DEBUG"}
      symbols "On"
      filter "configurations:Release"
      defines {"HZ_RELEASE"}
      optimize "On"
      filter "configurations:Dist"
      defines {"HZ_DIST"}
      optimize "On"
      project "Sandbox"
      location "Sandbox"
      kind "ConsoleApp"
      language "C++"
      targetdir ("bin/" .. outputdir .. "/%{prj.name}")
      objdir (("bin-int/" .. outputdir .. "/%{prj.name}"))
      files { "%{prj.name}/src/**.h}", "%{prj.name}/src/**.cpp}" }
      links { "Hazel" }
      includedirs { "Hazel/vendor/spdlog/include", "Hazel/src" }
      filter "system:windows"
      cppdialect "Default"
      staticruntime "On"
      systemversion "10.0.17763.0"
      defines { "HZ_PLATFORM_WINDOWS" }

      filter "configurations:Debug"
      defines {"HZ_DEBUG"}
      symbols "On"
      filter "configurations:Release"
      defines {"HZ_RELEASE"}
      optimize "On"
      filter "configurations:Dist"
      defines {"HZ_DIST"}
      optimize "On"

    • @AmanSharma-pk9iz
      @AmanSharma-pk9iz 3 роки тому

      above is my premake file

  • @justinkringstad4167
    @justinkringstad4167 3 роки тому

    whats the correct way to do this? i did it exactly to his video up there and my projects that were created were empty as fuck. thankfully i had it backed up on gitlab. so whats the correct way to do the lua file?

  • @SohamGovande
    @SohamGovande 5 років тому +2

    What's the plugin you use for syntax highlighting in Lua?

  • @justin6409
    @justin6409 6 років тому

    If you're making this cross platform, are you using opengl then since D3D isn't supported? Or are you planning to write some sort of platform detection and adjust the engine accordingly?

    • @prezadent1
      @prezadent1 6 років тому +1

      I've never seen him use DirectX, only OpenGL, in the past 5 years.

    • @landon91235
      @landon91235 6 років тому +1

      prezadent1 he added DirectX to Sparky, but not during the tutorial series.

    • @kplays_6000
      @kplays_6000 5 років тому

      Hazel is going to support multiple graphic APIs

    • @kirafortherescue7756
      @kirafortherescue7756 5 років тому

      He said it himself before in some video in this series that he's going to use OpenGL.

  • @categorille8330
    @categorille8330 6 років тому +1

    Hmm. I am getting a runtime error about the Hazel.dll not begin "valid":
    "Unable to start program: 'D:\dev\vsprojects\Hazel\Hazel\..\bin\Debug_windows_x86_64\Hazel\Hazel.dll'.
    D:\dev\vsprojects\Hazel\Hazel\..\bin\Debug_windows_x86_64\Hazel\Hazel.dll is not a valid Win32 application."
    I have checked the Hazel.sln file and the post-build commands as well as the build paths seem to be correct, what's going on here?
    I have tried closing VS, running the bat file and reopening, but I still get that error.

    • @categorille8330
      @categorille8330 6 років тому +3

      Aaand nevermind, I had forgotten to set Sandbox as the startup project. Fixed it!

    • @ldmdesign5610
      @ldmdesign5610 2 роки тому

      @@categorille8330 oh thank you, this saved me!

  • @fatimaharake2973
    @fatimaharake2973 3 роки тому +1

    i still get the copying error even after pressing f5 many times why? and how do i fix it ?

  • @cocoman24
    @cocoman24 3 роки тому

    I am getting the MSB3073 error as well but it seems to be because the hazel.dll is not being created and I cannot seem to figure why this is happening. Any help is appreciated

    • @Amponent
      @Amponent Рік тому

      SAME, I'm Trying To Find Help

  • @brno322
    @brno322 Рік тому +1

    yes to a more detailed premake tutorial

  • @adamodimattia
    @adamodimattia 4 роки тому +15

    As soon as I get out of debt I will become a patron. This is great stuff nowhere to be learned.

    • @vinos1629
      @vinos1629 4 роки тому +11

      Ayo r u out of debt yet

    • @aw1lt
      @aw1lt 3 роки тому +1

      i wouldnt do it as soon as you get out
      youll quicky be back in debt if you think like this. also, you out yet? gimme $69,000

    • @Maverick56912
      @Maverick56912 Рік тому

      yo u out? i need $6,900,000 for buying myself a supercar

  • @amansolanki9370
    @amansolanki9370 4 місяці тому

    While i am running on cmd, Access is getting denied i.e. I cant run this software on my pc. So what should i do coz i have tried multiple things but nothing is working at all.

    • @amansolanki9370
      @amansolanki9370 4 місяці тому

      Maybe, i am on windows 10 and this is only compatible for windows 8. Can someone solve this error?

  • @nezz0r
    @nezz0r 5 років тому

    Thanks for the videos. I a little question what can I do if I want to have the .dll file in a sub folder where the current .exe file is located?
    Folder
    {
    Hazel.dll
    Sandbox.exe
    ...
    }
    Instead I want to have it like this:
    Folder
    {
    dlls
    {
    Hazel.dll
    ...
    }
    Sandbox.exe
    ...
    }
    How can you set this up in VS that he loads the dll from the sub folder dlls?

  • @kaylaman8286
    @kaylaman8286 3 роки тому +7

    For those who has faced the error MSB8020 with the latest version of premake5 and using vs2019 ,
    please change your command below:
    Instead of :
    postbuildcommands{ "{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox"}
    changing to :
    postbuildcommands{("{COPY} %{cfg.buildtarget.relpath} \"../bin/" .. outputdir .. "Sandbox/\"")}

  • @gunrunjk
    @gunrunjk 5 років тому

    postBuildCommands is not working on my side.....Do you know what problem is???

  • @classic9322
    @classic9322 3 роки тому

    if i generate the sulution with the generatesolution bat it unloads all cpp and h files in the Project..... how do i fix it ?

  • @VoidAshen
    @VoidAshen 3 роки тому +2

    if anybody is having problems from postbuildcommands like me
    stick this in
    COPY "$(TargetDir)\Hazel.dll" "$(SolutionDir)bin\Debug-windows-x86_64\Sandbox"
    if your wondering what /" this is, its a way to put double quotes in strings so you end up putting em in the post-build events in properties

  • @flamendless
    @flamendless 5 років тому +2

    CMake is hell! I like premake and xmake

  • @elooser
    @elooser 5 років тому +4

    Hey Yan! What's the song called and the end of your video? I love this song!

    • @drv5037
      @drv5037 5 років тому +2

      its called Salutations and its made by Lovren

  • @committedcoder3352
    @committedcoder3352 6 місяців тому

    why does the logger library need included into the sandbox project?
    why isn't that bundled into the the .dll?

    • @DevInDetour
      @DevInDetour 2 місяці тому

      I m not an expert, but I think the header files need to be included for the compiler - thats the included dirs part
      The linker needs to know where the actual dll is - thats the links part

  • @haxterhuz8346
    @haxterhuz8346 6 років тому +1

    Why did you dynamically link the Hazel project, when static linking is a lot faster?

    • @codewing
      @codewing 6 років тому +7

      If you want to ship a patch for your engine with dynamic linking it's just a new dll whereas for static linking you would need to ship a new big exe file.
      But I guess thats just one of the reasons...
      If you google static vs dynamic linking you can get a pretty good picture on what the reasons might be

    • @haxterhuz8346
      @haxterhuz8346 6 років тому +1

      @codewing Thank you very much.

  • @obi1jim316
    @obi1jim316 5 років тому +2

    I've made it this far... I almost didn't make it past this videos. I was "bold" enough to name certain things differently; that didn't help. If you are reading this... u made it this far. I'll see u on the next video comment section.

    • @Tiogar60
      @Tiogar60 4 роки тому +2

      haha same. Im really using this to create my own personal game engine, and can't have it named exactly as his :p

  • @foomoo1088
    @foomoo1088 Рік тому

    I’m late to this series. Are there any other (new) options similar to PreMake?

  • @ldmdesign5610
    @ldmdesign5610 2 роки тому +9

    First I had to change the postbuild commands to ("{COPY} %{cfg.buildtarget.relpath} \"../bin/" .. outputdir .. "/Sandbox/\"") and then you have to manually set Sandbox as the startup project again.

  • @LawMasterTimmy
    @LawMasterTimmy 4 роки тому +1

    Hello, I keep gettings this error after building: Severity Code Description Project File Line Suppression State
    Error MSB3073 The command "xcopy /y "..\bin\Debug-windows-x86_64\{prj.name}\engine.dll" "C:\Game Dev\C++ Game Engine\Game engine project\Game engine folder\Engine\bin\Debug-x64\Sandbox\
    :VCEnd" exited with code 4. Engine C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 149
    I am using premake alpha 14 *EDIT:* So it seems to add the Sandbox Bin files to they Engine Bin files

    • @avita2738
      @avita2738 4 роки тому

      same for me too

    • @artems3566
      @artems3566 4 роки тому

      I justed installed vs2017 and forgot about it...

  • @helio6839
    @helio6839 Рік тому +2

    For some reason, the copy command only worked when I used {COPYDIR} instead of {COPY}

    • @kingofspades9720
      @kingofspades9720 4 місяці тому

      Thanks, apparently it has to do with COPY getting mixed up with files vs directories, but this helped!

  • @Dante3085
    @Dante3085 4 роки тому

    premake seems really cool after having a real rough time with cmake. i am gonna learn it

  • @alexstone691
    @alexstone691 6 років тому +2

    you should have called the configuration mode 'RelWithDebInfo'

  • @justonedeveloper
    @justonedeveloper Рік тому

    As Visual Studio is now cross-platform (using it on mac, dont know about linux), is this still useful / neccessary?

  • @kacperozieblowski3809
    @kacperozieblowski3809 5 років тому +2

    maan! I was struggling with CMAKE for a while, and then I look at this and I ask myself why? Like this is actually understandable lol.

  • @napsta2
    @napsta2 2 роки тому +3

    Got this linking error after trying to run the engine at the end of the video
    1>SandboxApp.obj : error LNK2001: unresolved external symbol "private: static class std::shared_ptr Engine::Log::s_CoreLogger" (?s_CoreLogger@Log@Engine@@0V?$shared_ptr@Vlogger@spdlog@@@std@@A)
    I checked all settings in the projects' properties after building with premake; spdlog include dir looks like it's included properly like it was before, any ideas?

    • @manoj_n9575
      @manoj_n9575 2 роки тому +1

      Im having the same issue. Can someone help 🥺

    • @napsta2
      @napsta2 Рік тому

      @@manoj_n9575 Still no solution found?

    • @manoj_n9575
      @manoj_n9575 Рік тому

      @@napsta2 nope

    • @niklaswessman8530
      @niklaswessman8530 Рік тому +2

      I had the same error. It was because I had forgotten to remove "HAZEL_BUILD_DLL" in Project "Sandbox" defines list, if you have the same just remove it and it will work!

    • @ast_rsk
      @ast_rsk Рік тому

      @@niklaswessman8530 Thank you! This is exactly what happened to me and I couldn't figure out why my sandbox project was trying to generate a library when I specified ConsoleApp in the project definitions.

  • @goldenlava1019
    @goldenlava1019 4 роки тому

    In the last video was I supposed to copy the license of spdlog too? because you did copy the license for premake.

  • @jackeown
    @jackeown 3 роки тому

    What do you mean by "solution?" Is this some visual studio concept I'm too Linux-ey to understand? But seriously, what is a solution? Is your solution simply a simultaneous build of your Sandbox game example and the Hazel engine?

  • @kotivivekananda9917
    @kotivivekananda9917 Рік тому

    LNK1104: cannot open file Hazel.lib
    iam getting this error can anyone fix this plz

  • @martinpettersson533
    @martinpettersson533 5 років тому

    Thank you!!

  • @coynecoyne3925
    @coynecoyne3925 5 років тому

    Thank you.

  • @IshanChaudharii
    @IshanChaudharii 2 роки тому +1

    Ok Lets see - I keep getting this error MSB3073 , everything else works fine , I'm using VS2022 and Premake5 Beta-1,
    I really want to Continue this series , Can anyone Help me out. I tried to fix it but now I lost the entire project I don't know how ,so i can't post the entire error message here . All help appreciated !!😄😄

  • @杨小凡-v6s
    @杨小凡-v6s Рік тому

    i just want to say maybe you dont need to add the "postbuildcommand" part in the Sandbox part of the premake file, it just should be set on Hazel part. I'm so stupid!!!

  • @meisterlumpi7822
    @meisterlumpi7822 5 років тому +1

    Hazel, bazel.. it even rhymes ;)

    • @ArmenManukyan
      @ArmenManukyan 3 роки тому

      Bazel is a curse, avoid it by all means.

  • @vinaycool758
    @vinaycool758 5 років тому +4

    I would like to see series number in the title of the video, like 7-Premake or Premake | Game Engine Series - 7

    • @TheCherno
      @TheCherno  5 років тому +10

      There's a playlist you can use instead (thecherno.com/engine)

  • @nexovec
    @nexovec 4 роки тому

    It's so ridiculous to automate something I don't know how to do, but I'm watching anyway

  • @Xx_McJasper_xX
    @Xx_McJasper_xX 3 роки тому

    Very cool tool. I only know how to use makefiles, and this is way better than that.

  • @ChandlerEskey
    @ChandlerEskey 10 місяців тому +1

    I might just be dumb and am very new to C++ but I was running into a Win32 error and I think I was trying to run the DLL file directly or something but either way, if anyone else runs into this all I ended up having to do to fix it was right clicking sandbox and click Set as Startup Project

  • @alikhorami2726
    @alikhorami2726 3 роки тому

    bro i have an annoying error
    error MSB8020: The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found.
    can u help me ??

  • @puppergump4117
    @puppergump4117 2 роки тому

    I have to say that your speedrun of premake does more harm than good. I forgot to save my project and premake messed up my .proj files so now I'm stuck trying to undo everything. If I outright copied you, I might have an easier time, but then I wouldn't learn anything. Now I'm learning quite a bit. About errors.

    • @aayushanand8285
      @aayushanand8285 2 роки тому

      use git

    • @puppergump4117
      @puppergump4117 2 роки тому +1

      @@aayushanand8285 What a lazy but efficient way

    • @nsa3967
      @nsa3967 Рік тому

      @@puppergump4117 That's like calling backups lazy. Git is a must have.

    • @puppergump4117
      @puppergump4117 Рік тому

      @@nsa3967 I've had issues with git where I undo some changes and there's no way to redo them.

  • @zoomstrikegaming
    @zoomstrikegaming 25 днів тому

    For anyone who has a runtime error about failing an assertion in some random external directory, a good temporary fix for that is switching staticruntime on both hazel and sandbox off
    if anyone knows a more permanent solution lmk

  • @shivamrawat7523
    @shivamrawat7523 5 років тому

    that copy step in 29:17 is not working for me.. no matter how many times i build

    • @4chboy588
      @4chboy588 5 років тому

      If it still relevant in your bin/debug directory create a folder called Sandbox. This works for me

  • @ilzzzzzzz
    @ilzzzzzzz 4 роки тому

    Arigato!!!!

  • @_methm_
    @_methm_ 4 роки тому +2

    Hey The Cherno,
    would you be making a video on building a Hazel project for something like Android or IOS anytime soon? That sorta video would be really interesting.
    Thank you.
    BTW, really love your Hazel engine videos.

  • @CViniciusSDias
    @CViniciusSDias 3 роки тому

    I think this should be in the C++ series too. I, for instance, am not interested in game developing. Just C++ itself. If this was in that other playlist I would have found it before.
    Anyway, great video. It would be nice to have more videos about tools that are useful for professional development

    • @krupt5995
      @krupt5995 2 роки тому

      you can still learn a lot frpm the series I just started and I think its a really nice way to learn things even though I don't understand many stuff

  • @TheReferrer72
    @TheReferrer72 6 років тому +13

    Unit testing please if only for performance checks.

  • @felixliu1161
    @felixliu1161 6 років тому

    Why I got error when I used format output.
    Here is my code:
    int a = 999;
    Hazel::Log::GetCoreLogger()->info("hello, Var={0}", a); //same as macro
    The error is:
    ...........\hazel\vendor\spdlog\include\spdlog\details\logger_impl.h(71): fatal error C1001

    • @jonphillips4082
      @jonphillips4082 5 років тому

      You need to update your MSVC and change your project SDK to the current version

    • @felixliu1161
      @felixliu1161 5 років тому

      @@jonphillips4082 Thanks! It's worked. I just updated visual studio.

  • @chiyungchu9463
    @chiyungchu9463 3 роки тому +1

    /.\ My regeneration need 229ms instead of 84ms , damn.

  • @smushedenterteinment
    @smushedenterteinment 5 років тому

    I keep getting an error stating that the hazel.dll is not a valid win32 application. everything I know is set to be only 64.

    • @smushedenterteinment
      @smushedenterteinment 5 років тому +1

      Nevermind... I somehow had to set Sandbox to the startup project and that seems to have solved the problem.... even though it's already set as the startup project in premake(???). Either way. great videos, thanks!

  • @henrycormen3805
    @henrycormen3805 2 роки тому

    I will pay for this

  • @radgegames1089
    @radgegames1089 6 років тому +4

    as far as I can see this video isn't in the playlist, Just so you are aware. Thanks anyways!

  • @anon3643
    @anon3643 2 роки тому +1

    Has anyone used vs2022 with premake 5.0-beta1? My Hazel.dll is not generating. "Edit": I had an issue with my premake file, but I tested vs2022 and 5.0-beta1 with this project and it works!

    • @Amponent
      @Amponent Рік тому +1

      Please Tell Me How you fixed it, Its too hard to find the issue

  • @wopsieneter
    @wopsieneter 4 роки тому

    Im have a lot of headaches with deleting the bin folder like he does at 26:10. For some reason its protected under some insane admin permissions, eventhough ive literally never ever had any issues with this before and I'm the only person who uses my machine. Claiming ownership of the folder doesnt work, instead im having to use the command prompt to force change the ownership of the folder AND RESTART MY MACHINE... Oh yeah, when the folders are regenerated on compile, the same permission nonsense pops up again.
    I only have a "Local user" setup on my machine, does anyone happen to know if I can change the default permissions on VS generated folders?

  • @EvilDeathNightmare
    @EvilDeathNightmare 5 років тому +5

    I don't know why all these master programmers with their criticisms need to watch your tutorials in the first place lmao

  • @theanimatingdinoyt79
    @theanimatingdinoyt79 5 років тому

    I want to ask a quesion,
    Can you make a 2d game without engine??

    • @Maodjrodnd
      @Maodjrodnd 5 років тому +3

      the animating dino yt can you make a motorcycle with no engine?

    • @theanimatingdinoyt79
      @theanimatingdinoyt79 5 років тому

      So you can't,
      Is he going to make an engine with interface or like one lone code engine.

    • @weltlos
      @weltlos 5 років тому

      Of course you can integrate all you need directly into the game itself without needing to build an engine but that would get messy and complicated pretty quickly. If you just want to produce a game you don't want to build your own engine at all because that's unnecessary work. Just download a good existing engine like Unreal or Unity and that would do the job for you too.

  • @shoujiangong9907
    @shoujiangong9907 4 роки тому

    Is there someone help me out?
    26:54
    C:\dev\Hazel>vendor\bin\premake\premake5.exe vs2019
    Error: C:/dev/Hazel/premake5.lua:15: expected near '"Hazel"'

    • @FatalPunishment
      @FatalPunishment 3 роки тому

      double check for an extra or missing period - that was my issue

  • @yusufyasin2878
    @yusufyasin2878 5 років тому

    Hey all, Great tutorial loving it so far!
    I've run into a bit of an issue. The program refuses to run giving me the following error
    warning C4251: 'Hazel::Log::s_CoreLogger': class 'std::shared_ptr' needs to have dll-interface to be used by clients of class 'Hazel::Log'
    I did a quick git checkout took the latest commit (previous tutorial which works fine) added the premake.lua from theCherno repo(and made necessary adjustments mainly to system version) and run the program only to get the same error. I then deleted the sandbox reference and re-added it and did the same to the Hazel solution for some reason the reference icon is not appearing on Sandbox and the Hazel reference when attempting to add gives an error stating "A reference to "Sandbox" could not be added. Adding this project as a reference would cause a circular dependency".
    However, the strange part is the code now builds successfully.
    That being said when I put a breakpoints on Entrypoint.h and run to see the logs I get the following errors on a prompt screen.
    Unable to start program 'C:\dev\Hazel\Hazel\..\bin\Debug-windowsx86_64\Hazel\Hazle.dll.
    C:\dev\Hazel\Hazel\..\bin\Debug-windowsx86_64\Hazel\Hazle.dll. is not a valid Win32 application.
    The only platform I have on both properties to both solutions is x64.
    I'd appreciate any help been stuck on this for quite a while. Thanks!

    • @GreenGabe90
      @GreenGabe90 5 років тому

      I have the same problem... :(

    • @GreenGabe90
      @GreenGabe90 5 років тому +1

      nvm, figured it out. In Visual Studio make sure to right-click Sandbox and set it as the start up project. The error went away.

    • @scarletselkepha9
      @scarletselkepha9 5 років тому +2

      I have the same problem here... setting Sandbox as the startup project makes no difference for me. I notice that the bin folder is totally empty. It also tells me I have an internal compiler error???

    • @scarletselkepha9
      @scarletselkepha9 4 роки тому

      AzMa I was on VS2017, updating to 2019 fixed it I think. It was a while ago now, so not certain.

  • @Hussamaldeen-n1p
    @Hussamaldeen-n1p 4 роки тому

    Can anyone here who has experience in CMake , write down how create CMake instead Premak , I want to move this project to work or support Mac OSX

  • @_3clipse_
    @_3clipse_ 4 роки тому

    dll copy not working with premake 14 or 15 vs2019... copy paste from one folder to another still works though :P

    • @catinwall4256
      @catinwall4256 4 роки тому

      Yes having the same problem, my DLL won't get generated. I know it's only been 4 hours, but did you figure this out?

    • @_3clipse_
      @_3clipse_ 4 роки тому

      @@catinwall4256 Nope... no luck at all. going to redo the project in 17 with the alpha 13 build of premake... see if that works...

    • @_3clipse_
      @_3clipse_ 4 роки тому

      @@catinwall4256 Well that was a bust... 2017 was an error fest from start to finish... not sure what to do at this stage... might have to simply watch the series for information... see where the later episodes end up... I know that I have spent waaaay to much time on it atm. :)

    • @catinwall4256
      @catinwall4256 4 роки тому

      @@_3clipse_ I got it fixed last night, first off get premake alpha 15, (whichever one supports VS 2019). Then, I rewrote the lua script ( just get it from the repository ). Now I actually did this 2 or 3 times, but it just... worked one time. So yeah that's how I got it working

    • @catinwall4256
      @catinwall4256 4 роки тому

      @@_3clipse_ Also he uses premake in the later episodes, so I think it would be worth it if you got it working.

  • @hugosales8102
    @hugosales8102 6 років тому +15

    CMake is the de facto build system for C++. And for good reason. It's perfectly capable and with versions above 3.10, modern CMake is rather well made. I think it's misguided to teach anything else, when some people take what you say almost as gospel

  • @danielesquivel3155
    @danielesquivel3155 4 роки тому

    Se preocupa por si no entendemos ÙwÚ

  • @anilaxsus6376
    @anilaxsus6376 5 років тому +2

    i have no clue what is going on here

  • @gabrieleinvernizzi9631
    @gabrieleinvernizzi9631 6 років тому

    Is there a way to follow along this series on Mac OS X?

    • @haxterhuz8346
      @haxterhuz8346 6 років тому +1

      Clone the whole repo (the new one) and run the premake script for Mac OS X (xcode)

    • @gabrieleinvernizzi9631
      @gabrieleinvernizzi9631 6 років тому +1

      HaxterHuz Thank you, i’ll try

    • @gabrieleinvernizzi9631
      @gabrieleinvernizzi9631 6 років тому

      Brain Devloper Dimensional I think that in visuale studio on the Mac you can’t use C++, only C# and others

    • @wilfridtaylor
      @wilfridtaylor 6 років тому

      @@gabrieleinvernizzi9631 Correct. Visual Studio on mac is just Xamiran studio re-branded.

    • @VadimMelnicuk
      @VadimMelnicuk 5 років тому

      I personally use OSX, Clion, and CMake while following the series.

  • @robinsonlew4467
    @robinsonlew4467 2 роки тому +1

    Nobody likes cmake but everyone has no choice to use it.

  • @Qizot
    @Qizot 6 років тому +1

    Cmake sucks compared to premake, what a neat solution to creating a project