Unlocking VSCode's power to make GAMES in C

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

ความคิดเห็น • 46

  • @pepperpatty2446
    @pepperpatty2446 8 หลายเดือนก่อน +1

    HI! I cloned the repo on github and everytime I go and press F5 the terminal says the following:
    "The terminal process failed to launch: Path to shell executable "C:\RaylibSHIT\cTEST3
    aylib-VSCode-Template\mingw32-make.exe" does not exist."
    Anyone here knows how to fix it?

    • @nikolamilosevic1990
      @nikolamilosevic1990 8 หลายเดือนก่อน +1

      I also have that problem

    • @pand2aren
      @pand2aren หลายเดือนก่อน +1

      i guess its windows environment variables path issue , one needs to add C:
      aylib\w64devkit\bin to Path variable

    • @pepperpatty2446
      @pepperpatty2446 หลายเดือนก่อน +1

      @@pand2aren it is. Few months after posting this I maned up and decided to edit the files. Basically the compiler path was set to “game directory/mingw32-make.exe”, and since there’s no mingw32-make on the dir the compiler wouldn’t run. Now I’m having another problem where the compiler doesn’t create and executable, but I’ll find a fix.

    • @joel_the_ai
      @joel_the_ai 22 วันที่ผ่านมา +1

      @@pepperpatty2446 hey idk if you figured it out. but i added an obj folder to the project. and it compiles and a main.o and second.o file appears in the obj folder. so try doing that

    • @andrewhamelcodes712
      @andrewhamelcodes712  16 วันที่ผ่านมา +1

      Ah yes, one of my most popular videos and yet the example provided was broken. This has haunted me for a long time. I have a new video coming next week which will address this by showing off "game-premake" which has been the most effective method of maintaining raylib projects in my personal experience. I strongly recommend you check that out.

  • @bloom945
    @bloom945 ปีที่แล้ว +5

    that snippet move was genius 🤯 very helpful video, thank you!

  • @hawkbirdtree3660
    @hawkbirdtree3660 ปีที่แล้ว +9

    I'm loving these tutorials. They are exactly what I needed. The examples folder for raylib provides good games, and I'd like to see things like how to make different jump mechanics in a platformer (like variable jump height, double jump, the unforgiving Castlevania Jump arch), or how simple combinations of collisions that trigger events, like damage, or Go to a new screen/pop up, can pretty much cover tons of game mechanics

  • @itsthem5699
    @itsthem5699 ปีที่แล้ว +8

    Absolutely love your clarity and concise presentation. Thanks!

  • @drezdon77
    @drezdon77 ปีที่แล้ว +2

    Thank you, I'm learning C and practting with Raylib and I was really confused about the Makefile and JSON's, this was really helpful and easy to understand.

  • @perelmanych
    @perelmanych ปีที่แล้ว +7

    After messing with Code::Blocks and notepad++ I am using MSVC and premake setup made by Jeff and I am very happy. Very easy setup and the debugger in MSVC is completely another level.

    • @andrewhamelcodes712
      @andrewhamelcodes712  ปีที่แล้ว +4

      Yes! Jeff's pre-make is very sweet. He's also very active in the community Discord and always seems to have the answer. There will be a shift toward using VS on the channel in the coming months, especially as we move to building larger projects and ESPECIALLY when using C++.

    • @perelmanych
      @perelmanych ปีที่แล้ว +2

      @@andrewhamelcodes712 Looking forward for that!

  • @agungkresna6597
    @agungkresna6597 18 วันที่ผ่านมา

    Thank you!, after all tutorial videos, this one is really work for me

  • @handfoamsanitiser
    @handfoamsanitiser 8 วันที่ผ่านมา

    Very helpful video, I was stuck on getting multiple c files to work, but this video solved that

  • @arnoldbr8418
    @arnoldbr8418 ปีที่แล้ว +3

    Thank you for this explanation, it was exactly what I was looking for.

  • @geodegeo1129
    @geodegeo1129 ปีที่แล้ว +4

    Hello, thanks for the tutorial. I am not familar with the syntax of makefile. I think it would be interesting to show how to modify the makefile to allow for subdirectories in the src folder (for example have a 'models' or 'effects' folder in a more complex game).

    • @andrewhamelcodes712
      @andrewhamelcodes712  ปีที่แล้ว +2

      Great suggestion! I would also recommend looking into the MSVC approach to use a more powerful IDE to manage the build process and project structure for you. It's possible to use VS for C, C++, and C# development natively and works great in all cases. There will certainly be more content on this channel covering such approaches in the future. If you're eager, check out the raylib official Discord (linked on raylib.com) and there's plenty of people there to help, particularly Jeff who set us up with a lovely premake raylib template perfect for generating a VS project!

    • @geodegeo1129
      @geodegeo1129 ปีที่แล้ว +1

      @@andrewhamelcodes712 Eh, thank you for the detailed answer. I will look into it. I look forward to your new content 😀

  • @lucasgiovanni6149
    @lucasgiovanni6149 ปีที่แล้ว

    It was really helpful, thank you :D

  • @canticide
    @canticide หลายเดือนก่อน

    Thank You !

  • @kevindean8312
    @kevindean8312 10 หลายเดือนก่อน +1

    Really enjoyed this tutorial. Almost have it all working expect the multi-file part. When attempting those changes I was getting a linker error? I'll try reviewing 12:41 and 13:55 again. I am on a MacBook.

  • @SaschaRobitzki
    @SaschaRobitzki 9 หลายเดือนก่อน +1

    Is `Win32` the only configuration available on Windows? There's no x64 config available?

  • @astrahcat1212
    @astrahcat1212 ปีที่แล้ว

    Thanks for this, setting up as a beginner in C or C++ can be a pain if not just using some premade template like with Codeblocks or Visual Studio.

  • @boring-person-rishabh
    @boring-person-rishabh ปีที่แล้ว +7

    Hi Andrew , I was able to successfully configure the project for c thanks to your tutorial , I was curious as to how can we configure it for a c++ project , awesome tutorial btw. Also I was getting an error such as obj/main.o not found : no such file or directory , so I created a folder named obj in the root folder and then it worked

  • @santory5788
    @santory5788 10 หลายเดือนก่อน

    Thanks a lot.

  • @punchline1729
    @punchline1729 ปีที่แล้ว +2

    How do I set it up such that it uses MSVC compiler

    • @SaschaRobitzki
      @SaschaRobitzki 9 หลายเดือนก่อน

      Did you solve it?

    • @punchline1729
      @punchline1729 9 หลายเดือนก่อน

      @@SaschaRobitzki yes

    • @SaschaRobitzki
      @SaschaRobitzki 9 หลายเดือนก่อน

      @@punchline1729 How?
      I got it working in VS 2022, but I didn't try it in VS Code again so far.

  • @youcefmaclaren4249
    @youcefmaclaren4249 11 หลายเดือนก่อน +2

    Hello sir, thanks for these videos I find them very helpful, I copied your latest template for 4.5 but when I hit F5 it says that "launch: program does not exist launch json" even tho Im using the same launch.json files in your template, could u pls help me with that?

    • @MikAlexander
      @MikAlexander 10 หลายเดือนก่อน

      similar problem. ray5.1. followed tuto, then tried files, getting error no raylib.h, no program etc.

  • @nishumbhshah4698
    @nishumbhshah4698 ปีที่แล้ว +3

    I downloaded your template and tried to run it on VSC, but it shows "raylib.h: no such file or directory"
    I also tried to write the whole directory in the include statement but it still showed some other error
    When trying to debug run it,
    It showed no main.o file in directory and aborted the compilation.
    I tried to google it but couldnt find any help :(

    • @andrewhamelcodes712
      @andrewhamelcodes712  ปีที่แล้ว +1

      If the error is showing IN VSC (red lines), you may need to edit the includePath setting in the .vscode/c_cpp_properties file. If it's a compiler error as I think it is, make sure that references to anything like "raylib path" are correct for your setup in tasks.json, launch.json, and the Makefile itself. For me, raylib is at C:/raylib/raylib, you want to make sure you give the path to the folder that has "src" in it.
      In general, if you want help with Raylib specific things, I'd recommend joining the official Raylib discord as opposed to seeking answers on Google. There's lots of people there (including me!) that have toyed with raylib a bunch that almost certainly will be able to help you get your specific problems fixed. There should be a link to that discord somewhere near the top of raylib.com. Hope this helps!

    • @bofa-zi4fj
      @bofa-zi4fj ปีที่แล้ว +2

      I had an error too, (not sure if its the same as the OP) but It was because there was no "obj" folder. I hope you don't mind adding that to your github repo linked in the description so that others don't run into this error too. Thank you.

    • @madscientistmikhail
      @madscientistmikhail ปีที่แล้ว

      @@bofa-zi4fj This right here solved it for me. I had a hunch but now I know I was right. Thank you!

    • @niggacockball7995
      @niggacockball7995 11 หลายเดือนก่อน

      @@bofa-zi4fj thanks

    • @fishfooties9850
      @fishfooties9850 7 หลายเดือนก่อน

      @@madscientistmikhail hey if u dont mind me asking what ddi u do to solve it?

  • @biskitpagla
    @biskitpagla ปีที่แล้ว +1

    Why not just use cmake and vcpkg (considering you're on windows)?

    • @andrewhamelcodes712
      @andrewhamelcodes712  ปีที่แล้ว +4

      I find Makefile the easiest to understand / manipulate. Besides, it's not the case that "simply using CMake or VCPKG" would require no setup like what is shown in the video. At some point I may create a short video talking about using Visual Studio for a more heavy duty experience.

  • @AngeloComedy
    @AngeloComedy ปีที่แล้ว

    why not use #pragma once instead of #ifndef?

    • @andrewhamelcodes712
      @andrewhamelcodes712  ปีที่แล้ว +2

      I generally prefer to write things more explicitly (putting void in empty parentheses, casting malloc, etc.) Pragma once is okay, technically there's some one in a million circumstances where it won't work, but that's a bad excuse 😉

  • @Srednicki123
    @Srednicki123 6 หลายเดือนก่อน

    can't install in Macos, thanks for nothing, crap software

    • @andrewhamelcodes712
      @andrewhamelcodes712  6 หลายเดือนก่อน +6

      VS Code works on MacOS, as does Raylib and Make.. the only crap software mentioned here is Windows!

  • @tomibomi4465
    @tomibomi4465 ปีที่แล้ว +2

    i'm on windows, I compile all as single compilation unit and my build system is single line file build.bat yo
    cl main.cpp /D_CRT_SECURE_NO_WARNINGS -FC -GR- -EHa- /EHsc -nologo -Zi /MDd /link raylib.lib glfw3.lib glew32.lib opengl32.lib shell32.lib User32.lib Gdi32.lib Winmm.lib /SUBSYSTEM:CONSOLE