77days - Tin sức khỏe cho cuộc sống thêm tốt hơn
  • Home
  • Công Nghệ
  • Ẩm Thực
  • Kinh Doanh
No Result
View All Result
  • Home
  • Công Nghệ
  • Ẩm Thực
  • Kinh Doanh
No Result
View All Result
77days - Tin sức khỏe cho cuộc sống thêm tốt hơn
No Result
View All Result
Home Game

C++ Game Programming Tutorial – Let's make a game: Episode 1

admin by admin
July 7, 2020
in Game
44
C++ Game Programming Tutorial – Let's make a game: Episode 1



Welcome to my new set of C++ Game Programming tutorials!

In Episode 1, we set up our Engine class and a rudimentary Sprite class that we used to load a .png. We use OpenGL, GLFW, and the SOIL library.

These are cached versions of my Twitch streams. I just started this new series a week ago and it’s basically going through the process of making a game from scratch in C++ using OpenGL and helper libraries like GLFW and SFML.

I don’t really have a set plan, as I mention in the video. The point here is collaborative efforts across the viewers and myself so that we can make something cool together! If you have any cool ideas, feel free to share them with me! We’ll end up making something cool regardless 🙂

You can watch the stream live on twitch on Wednesdays at 7pm PST starting on July 13th at
I also upload our progress onto github so that you can pull our latest code before watching the next stream! You can find the repo at

Nguồn: https://77days.net/

Xem thêm bài viết khác: https://77days.net/game/

Xem thêm Bài Viết:

  • Game Crash Bandicoot 4 – Nhiều người có thể chơi Online không?
  • Vì sao nên tham gia Game Xóc dĩa online 789 club năm 2022?
  • K86 Club – Sân chơi xanh chín đẳng cấp quốc tế
  • TDTC Club – Hướng dẫn chơi game tại Thiên đường đổi thưởng
  • Cách xếp bàn cờ tướng chính xác nhất dành cho người mới
Previous Post

Xem thử thông số điện thoại bàn nút Bkav C85 giá sỉ 325K

Next Post

Hướng dẫn Hack nick Facebook mất 100% ( Quý Bánh ) #2

Next Post
Hướng dẫn Hack nick Facebook mất 100% ( Quý Bánh ) #2

Hướng dẫn Hack nick Facebook mất 100% ( Quý Bánh ) #2

Comments 44

  1. Treyzk says:
    3 years ago

    I tried this and kept getting error " argument type "char" is incompatible with parameter of type "Char*" " trying to call the initialize function. Any help?

    Reply
  2. Gaurav Hira says:
    3 years ago

    ok so I was getting following errors in vs19 :-

    1>SOIL.lib(stb_image_aug.o) : error LNK2019: unresolved external symbol __alloca referenced in function _stbi_zlib_decode_noheader_buffer

    1>SOIL.lib(image_helper.o) : error LNK2019: unresolved external symbol _sqrtf referenced in function _RGBE_to_RGBdivA2

    How I resolved it :-

    step 1) go to SOIL>projects>VC9>SOIL (microsoft vs solution)

    step 2) build this project in vs 2019, you'll get a migration report

    step 3) now once again build but this time change solution configuration to release (previously 'debug')

    step 4) in file explorer, open SOIL>projects>VC9 >Release, you'll find SOIL.lib there (mine was of 576 kb), copy that

    step 5) go to SOIL>lib where your original SOIL.lib was present, delete that, paste new one and you're good to go!

    step 6) now build twitch and voila!

    Also, thanks for the video!

    Reply
  3. BruderAlex says:
    3 years ago

    I cant install glfw and opengl

    Reply
  4. Ben Norton says:
    3 years ago

    To anyone who is using visual studio 2019 and is getting an error " SOIL_load_OGL_texture.".

    There is a nupen package for soil 1.16.0 that you can download but it needs some extra work to get it working:

    1. if you have done any linking (additional dependencies etc) of Soil folders that you got online before the nupen download, remove them, it was the final reason why i couldn't get SOIL working

    2. the #include line wasn't showing soil.h, by finding its exact location on the computer, you can circumvent this issue:
    it installs soil.1.16.0 next to the nupen gl stuff, so you can find the directionary if your path is different.

    C:Users*USERNAME_HERE*sourcereposTwitchpackagessoil.1.16.0buildnativeincludesoil.h

    Great video dude, and it helped me alot, i wanted to put down my solution just in case someone wants to follow your steps without hours of research.

    Reply
  5. Ouranikos says:
    3 years ago

    In Texture::Texture (string path) I get "unresolved external symbol" for SOIL_load_OGL_texture.
    I did everything identically and this even shows up when I clone your repo and try to build it.

    Full error message: "unresolved external symbol _SOIL_load_OGL_texture referenced in function "public: __thiscall Texture::Texture(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0Texture@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)"

    Reply
  6. Logan Houston says:
    3 years ago

    "I want the starting point to be at the bottom left" Angers every game developer ever

    Reply
  7. Abirami Sridharan says:
    3 years ago

    Hi thank you for your video, however i tried to create a window with the function glfCreateWindow(), and it throws an error any idea why this is happening

    Reply
  8. Ibrahim Atbouli says:
    3 years ago

    6:31 When i type nupen, it says no extension found. When I add gl.core it still says no extension found. Can someone help me ? I've got Visual Studio Code and Version: 1.42.0.
    Thx to whoever does! I hope I get an answer

    Reply
  9. Ali elnajjar says:
    3 years ago

    hi, just wanna ask, can i start learning game development without knowing c++? i mean can i learn c++ and game development simultaneously?

    Reply
  10. リアル says:
    3 years ago

    #pragma once isn't a windows thing
    also it's a preprocessor keyword

    works everywhere (at least since 2019 (I don't know how it was in 2016, but I think it was))
    the funny thing is, you said to make it platform independend, but later on you called
    #pragma comment(lib, "opengl32.lib")
    and if #pragma was a windows thing, you messed yourself up at that point 😛

    Reply
  11. Vinicius Oliveira says:
    3 years ago

    Hello!
    When I try to run the project, I get the error:

    Severity Code Description Project File Line Suppression State
    Error LNK2019 unresolved external symbol _SOIL_load_OGL_texture referenced in function "public: __thiscall Texture::Texture(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0Texture@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) Twitch_GameProject D:C++ ProjectsTwitch_GameProjectTexture.obj 1

    It has something to do with the function SOIL_load_OGL_texture. If I comment this line out in the Texture.cpp file, the code runs, but with no ID, so I get the message of Error loading image.
    Any idea on how to solve this issue so SOIL_load_OGL_texture works properly?
    This error also happens on the project I downloaded from your GitHub.

    Thanks!

    Reply
  12. Papp David says:
    3 years ago

    I have done everything as you did(even downloaded the same sprite) and it didn't render the sprite for me to the screen?Any advice?

    Reply
  13. Gabriel Cangiano says:
    3 years ago

    Visual Studio Code doesn't load my image (Reb Biplane) but I put the path in
    Sprite testSprite = Sprite("(MY PATH)",…,…). I moved the path of my image in the same path of my project but tge programs doesn't show the image! HELP MEE!

    Reply
  14. Elliott Bork says:
    3 years ago

    cant hear you very well:(

    Reply
  15. christopher clark says:
    3 years ago

    The Sprites texture is definitely loaded. the GetWidth and GetHeight are returning the correct size values, but the sprite is not rendering. The only thing I did differently was used nuget to add SOIL 1.16 as a dependency, I tried copying it into the project and that had worse effects and errors, I'm going to assume its not soil, because the texture is definitely loaded. Here is my render method. GetID is also returning 1, as it is the only texture.

    glEnable(GL_TEXTURE_2D);

    glBindTexture(GL_TEXTURE_2D, texture.GetID());

    glLoadIdentity();

    glTranslatef(xPos, yPos, 0);

    glColor4f(1, 1, 0, 0);

    glBegin(GL_QUADS);

    glTexCoord2f(0, 0);

    glVertex2f(0, 0);

    glTexCoord2f(1, 0);

    glVertex2f(texture.GetWidth(), 0);

    glTexCoord2f(1, 1);

    glVertex2f(texture.GetWidth(), texture.GetHeight());

    glTexCoord2f(0, 1);

    glVertex2f(0, texture.GetHeight());

    glEnd();

    glDisable(GL_TEXTURE_2D);

    Reply
  16. christopher clark says:
    3 years ago

    Wait, is this crossplatform? I got a bit into this project, but then got worried this can't target windows, linux, android, mac etc.

    Reply
  17. Haunted Fappy Fop says:
    3 years ago

    error LNK2001 and fatal error LNK 1120 can you help me solve these error?(Edited) solved it.

    Reply
  18. kristula says:
    3 years ago

    Who here saw the ad for udemy.com? like if you did 😀

    Reply
  19. tom franky says:
    3 years ago

    Hi,
    I don't want to disappreciate your work and proficiency on programming, but what you did by those huge codes was just putting a downloaded image on a green screen! It seems to create a really good game we need 100 times more than what you wrote. Although, why not changing your episode title?!

    Reply
  20. imen ben alaya says:
    3 years ago

    Could someone please explain me why i can't see the plane?? "Error loading image with path:AssetsArtBiplane.png"

    Reply
  21. Nils says:
    3 years ago

    Thank you very much. Your tutorial has helped me break a big scary barrier going from console applications to graphical applications!

    Reply
  22. BGivo says:
    3 years ago

    Thank you for this. Few quick questions below perhaps you or someone else can help answer 🙂

    1. Is the way you imported the package through NuGet preferred or just used it to speed things up?

    2. Is #pragma once not compiler-dependent and fully supported now? You mentioned windows only, which I have read is not true. Just wanted to be clear as you seemed certain about it.

    Reply
  23. Michael Dunayevski says:
    3 years ago

    'using namespace std' in a header is highly un-recommended.

    Reply
  24. Ford Prefect says:
    3 years ago

    I pressed alt+tab roughly 9000 times

    Reply
  25. AncientScarab says:
    3 years ago

    void Render() declaration in the Engine class says “void Engine::Render() function definition for ‘Render’ not found. Please help me

    Reply
  26. spool 2 kool says:
    3 years ago

    NuGet has soil in vs2017.
    I'm using SOIL-VC141.

    Reply
  27. spool 2 kool says:
    3 years ago

    in vs 2017, use const char* not char* !!!!!!!
    will get errors if you don't!

    Reply
  28. MrHallows says:
    3 years ago

    @Progrematic You very well may be the fastest typist I have ever seen. Mindblowingly impressive. @_@

    Reply
  29. Louis Johnson says:
    3 years ago

    Those finger clicks are making me hungry..lol

    Reply
  30. trashcanhands says:
    3 years ago

    No errors, no warnings…no airplane… wtf?

    Reply
  31. Yona Godwin says:
    3 years ago

    Thanks bro! 🙂

    Reply
  32. Mile M says:
    3 years ago

    You can also download SOIL with Manage NuGet packages. Just type in soil. Maybe this will help somebody if not just ignore it 🙂 Btw this is very nice tutorial.

    Reply
  33. Marshall says:
    3 years ago

    i learned nothing from this video.

    Reply
  34. Dang Le says:
    3 years ago

    Is there any prerequisites or what I need to know before watching this video or any kind of recommendations on what I need to know or have an idea of first?

    Reply
  35. Lazy TechNo says:
    3 years ago

    i have newly completed c++ suggest me some projects to become pro

    Reply
  36. Masterride says:
    3 years ago

    ~30:00 i can't include Engine/Engine.h, help

    Reply
  37. DuckMasterGames says:
    3 years ago

    for when you did engine.Initialize("Twitch!") it did not work for me and the solution was changing it in engine.h for char* windowTitle to const char* windowTitle

    Reply
  38. Leonoy Douglas says:
    3 years ago

    how much time do u spend using opengl t get this versatile in it?

    Reply
  39. BladeWolf Gaming says:
    3 years ago

    You should ctrl++ a bit.

    Reply
  40. Justin Roach says:
    3 years ago

    Can you type a little faster? XD

    Reply
  41. GunnDawg says:
    3 years ago

    Could make those getters inline, though the compiler is usually smart enough to do that on it's own.

    Reply
  42. Jeff Healey says:
    3 years ago

    was pretty interesting for the first few mins until you started using OPENGL lol D2D1 OR DIRECTX is much much better

    Reply
  43. Shjoon Al says:
    3 years ago

    thank you, do you have any email so I can contact you? I do have some questions

    Reply
  44. Antonio Astorino says:
    3 years ago

    Hi again. I haven't been able to use soil. I am therefore using STBI. I managed to apply textures to any geometry, but I am having trouble with png files. It seems that the transparency is not interpreted correctly, or not read at all. So, where the background in the airplane png image appears white, instead of transparent. I can't understand why. Any help would be extremely appreciated. Bye!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Xem Thêm

Ở đâu bán bật lửa chính hãng và chất lượng tại khu vực Hà Nội?

Ở đâu bán bật lửa zippo chất lượng nhất tại khu vực Hà Nội

April 25, 2021
quan-pho-ngon-1

Top 5 quán phở ngon nhất Quy Nhơn bạn nên thử

April 30, 2021
Món đồ bày trí phòng ngủ ý nghĩa

Tác dụng của những món đồ trang trí phòng ngủ theo phong thuỷ

June 4, 2021
Dòng máy ép chân không công suất lớn

3 lý do cần mua máy hút chân không công suất lớn

June 17, 2021
Máy xay giò chả mini có giá dưới 10 triệu đồng

Tư vấn chọn mua máy xay giò chả hợp túi tiền 

June 19, 2021
Máy vặt lông gà vịt tốt nhất tại NEWSUN

Nên mua máy nhổ lông gà vịt của Viễn Đông hay NEWSUN?

June 19, 2021
  • Liên Hệ
  • Chính Sách Bảo Mật

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Công Nghệ
  • Ẩm Thực
  • Kinh Doanh

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.