Premake | Game Engine Series

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

КОМЕНТАРІ • 283

  • @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 7 місяців тому

      @@pulkitkhagta4218 sAME

  • @TheKaosNano
    @TheKaosNano 6 років тому +198

    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 3 місяці тому +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 2 місяці тому +7

      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 років тому +82

    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 6 років тому +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 2 роки тому +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.

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

    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!

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

    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.

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

    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.

  • @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!!

  • @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

  • @darkmethods9149
    @darkmethods9149 3 місяці тому +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 2 роки тому +9

    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 :)

    • @thekogrimmer527
      @thekogrimmer527 Місяць тому

      The correct way to do this would be to actually change {COPY} to {COPYFILE} since this command was changed. better than using straight up copy since this might fail on different environments

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

    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_

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

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

  • @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.

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

    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!

  • @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!

  • @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?

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

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

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

    yes to a more detailed premake tutorial

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

    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

  • @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

  • @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/\"")}

  • @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 6 років тому

      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.

  • @aayushanand8285
    @aayushanand8285 3 роки тому +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 😞

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

    CMake is hell! I like premake and xmake

  • @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)

  • @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 Рік тому

      @@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 Рік тому +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.

  • @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

  • @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

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

    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

  • @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.

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

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

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

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

  • @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.

  • @domdom_hello
    @domdom_hello 6 років тому +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

  • @AmanSharma-pk9iz
    @AmanSharma-pk9iz 4 роки тому +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 4 роки тому

      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 4 роки тому

      above is my premake file

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

    Unit testing please if only for performance checks.

  • @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 Рік тому

      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.

  • @matthewwarner3909
    @matthewwarner3909 6 років тому +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!

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

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

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

    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

  • @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.

  • @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 ?

  • @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 6 місяців тому

      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 ( ).

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

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

  • @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.

  • @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?

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

    you should have called the configuration mode 'RelWithDebInfo'

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

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

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

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

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

      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

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

    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?

  • @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

  • @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!

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

    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?

  • @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..

  • @spsc07
    @spsc07 29 днів тому

    im getting error C1189 that Hazel only supports windows, and its like
    Severity Code Description Project File Line Suppression State Details
    Error C1189 #error: Hazel only supports Windows! Sandbox C:\Users\admin\Documents\Hazel\Hazel\src\Hazel\Core.h 10

  • @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?

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

    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 6 місяців тому

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

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

    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

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

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

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

    Hazel, bazel.. it even rhymes ;)

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

      Bazel is a curse, avoid it by all means.

  • @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!!!

  • @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 6 років тому

      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.

  • @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...

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

    Thank you.

  • @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.

  • @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

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

    Thank you!!

  • @PhongNguyen-uo5rj
    @PhongNguyen-uo5rj Рік тому +6

    for people who have Error MSB3073 on visual studio 2022. change
    postbuildcommands
    {
    "{RMDIR} ../bin/" .. outputdir .. "/Sandbox",
    "{MKDIR} ../bin/" .. outputdir .. "/Sandbox",
    "{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox"
    }
    and delete .vs folder

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

      Thank you

    • @darkmethods9149
      @darkmethods9149 3 місяці тому +1

      This works great but I prefer to move the postbuildcommands code to the Sandbox project section and then run the following:
      postbuildcommands
      {
      "{COPY} ../bin/" .. outputdir .. "/Hazel/Hazel.dll ../bin/" .. outputdir .. "/Sandbox"
      }
      There might be a shorter way to write that but it works well. You still need to delete your .vs/ folder though and probably the bin/ folders to be safe. But doing it this way guaranties the Sandbox folder will exist in bin/ before post-build runs for Sandbox.
      The reason I prefer it this way is that then the dependent knows about the dependency and not the other way around.

    • @MisterBebra-
      @MisterBebra- 2 місяці тому

      tnx

  • @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.

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

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

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

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

  • @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 2 роки тому

      @@manoj_n9575 Still no solution found?

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

      @@napsta2 nope

    • @niklaswessman8530
      @niklaswessman8530 2 роки тому +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.

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

    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 3 роки тому

      use git

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

      @@aayushanand8285 What a lazy but efficient way

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

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

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

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

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

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

  • @_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.

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

    27:30 ha 84? I have 77ms

  • @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 6 років тому

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

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

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

  • @akuma0009
    @akuma0009 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

  • @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 4 роки тому

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

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

    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?

  • @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)

  • @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?

  • @daybefore-r6w
    @daybefore-r6w 2 дні тому

    6:11 i dont trust anyone i recommend to build from source code

  • @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.

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

    Arigato!!!!

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

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

  • @_methm_
    @_methm_ 5 років тому +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.

  • @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 6 років тому

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

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

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

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

    I will pay for this

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

    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 3 роки тому

      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

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

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

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

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

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

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

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

      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.

  • @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!

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

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

  • @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 ??

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

    28:53

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

    Se preocupa por si no entendemos ÙwÚ

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

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