www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Basic D Game For New D Gamedevs (glfw 3.3 + openal soft 1.1 + opengl

reply jordan4ibanez <jordan4ibanez002 gmail.com> writes:
I have created a basic, and I mean basic, game/engine. I realized 
this would be great for people who are interesting in making 
games in D from the ground up but have no idea where to start.

The elements that are glued together in v1.0.0 are:

- GLFW 3.3
- OpenAL Soft 1.1
- OpenGL 4.1 with GLSL 410

Here is the repository, it is very bare bones: 
https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.0

I was using this as a learning experience for making games with 
the raw materials and gluing them together as I went, so 
hopefully this can jump start someone's hobby in creating cool 
games while greatly improving on aspects that exist in this 
game/engine. This is translated from a LWJGL tutorial while 
taking a lot of the Java-ness out of it as much as I could and 
replacing it with D's strengths.

I hope you find this useful, and if you end up utilizing this to 
start your game dev journey, I hope you have fun.
Aug 25
parent reply Guillaume Piolat <first.last spam.org> writes:
On Friday, 26 August 2022 at 02:45:39 UTC, jordan4ibanez wrote:
 Here is the repository, it is very bare bones: 
 https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.0
Nice work. I get a crash on Windows though. Running d_glfw_test.exe automatically half sizing the window Program exited with code -1073740771 (Windows 11, AMD Radeon Graphics integrated GPU)
Aug 26
parent reply jordan4ibanez <jordan4ibanez002 gmail.com> writes:
On Friday, 26 August 2022 at 12:59:56 UTC, Guillaume Piolat wrote:
 On Friday, 26 August 2022 at 02:45:39 UTC, jordan4ibanez wrote:
 Here is the repository, it is very bare bones: 
 https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.0
Nice work. I get a crash on Windows though. Running d_glfw_test.exe automatically half sizing the window Program exited with code -1073740771 (Windows 11, AMD Radeon Graphics integrated GPU)
I am currently installing Windows 10 onto my laptop with an AMD Ryzen 5500U so I will be able to fix this for version v1.0.1 :) Thank you for letting me know about this, I greatly appreciate it
Aug 26
parent reply Ruby The Roobster <rubytheroobster yandex.com> writes:
On Friday, 26 August 2022 at 21:09:20 UTC, jordan4ibanez wrote:
 On Friday, 26 August 2022 at 12:59:56 UTC, Guillaume Piolat 
 wrote:
 On Friday, 26 August 2022 at 02:45:39 UTC, jordan4ibanez wrote:
 Here is the repository, it is very bare bones: 
 https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.0
Nice work. I get a crash on Windows though. Running d_glfw_test.exe automatically half sizing the window Program exited with code -1073740771 (Windows 11, AMD Radeon Graphics integrated GPU)
I am currently installing Windows 10 onto my laptop with an AMD Ryzen 5500U so I will be able to fix this for version v1.0.1 :) Thank you for letting me know about this, I greatly appreciate it
Another program of yours, [Crafter](https://github.com/jordan4ibanez/Crafter), also crashes and Windows immediately after being run, and I don't think it's because of any of the dependencies.
Aug 26
parent reply jordan4ibanez <jordan4ibanez002 gmail.com> writes:
On Saturday, 27 August 2022 at 00:32:05 UTC, Ruby The Roobster 
wrote:
 On Friday, 26 August 2022 at 21:09:20 UTC, jordan4ibanez wrote:
 On Friday, 26 August 2022 at 12:59:56 UTC, Guillaume Piolat 
 wrote:
 On Friday, 26 August 2022 at 02:45:39 UTC, jordan4ibanez 
 wrote:
 Here is the repository, it is very bare bones: 
 https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.0
Nice work. I get a crash on Windows though. Running d_glfw_test.exe automatically half sizing the window Program exited with code -1073740771 (Windows 11, AMD Radeon Graphics integrated GPU)
I am currently installing Windows 10 onto my laptop with an AMD Ryzen 5500U so I will be able to fix this for version v1.0.1 :) Thank you for letting me know about this, I greatly appreciate it
Another program of yours, [Crafter](https://github.com/jordan4ibanez/Crafter), also crashes and Windows immediately after being run, and I don't think it's because of any of the dependencies.
I appreciate your input! This was actually an oversight in the GLFW window context creation order of operations! I have fixed this in a new release that should run properly on all the major operating systems. Windows seems to be a lot pickier in how you go about things. :) Here is the release branch https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.1 Also for Crafter. Well that is what this bare engine was originally built for, it will not compile as of the time I am writing this, because it originally was utilizing Schveiguy's awesome version of Raylib to do all talking to drivers/hardware/etc. It is currently taking the first step into using the new bare bones engine because I like to get really into building the engine and see how it works and what works, it's fun for me. The dub.json, imports, logic loop are all horrifically incorrect, haha. When the time is right, I will make a new announcement about it, but for now, or until you see a commit like "get this piece of junk working", it is extremely unusable and uncompileable. I just wanted to ensure that this was solved in the basis so that everything is correct and no one will have problems working from it, for creating whatever they want. :D I am doing many tests on this engine's bare bones state, even though it may not look like it. I might update this later with a ~mysterious~ thing I am testing.
Aug 26
parent reply jordan4ibanez <jordan4ibanez002 gmail.com> writes:
Well that was quick, the ~mysterious~ thing was experimenting 
with a more explicit manor of telling OpenGL to delete the whole 
Mesh because it can cause driver issues, aka, a GPU memory leak. 
Here is the new branch: 
https://github.com/jordan4ibanez/d_glfw_test/releases/tag/v1.0.2

I think I'm done with it now, that should be a good baseline.
Aug 26
parent jordan4ibanez <jordan4ibanez002 gmail.com> writes:
On Saturday, 27 August 2022 at 03:14:57 UTC, jordan4ibanez wrote:
 Well that was quick, the ~mysterious~ thing was experimenting 
 with a more explicit manor of telling OpenGL to delete the 
 whole Mesh because it can cause driver issues, aka, a GPU 
 memory leak. Here is the new branch: 
 https://github.com/jordan4ibanez/d_glfw_test/releases/tag/v1.0.2

 I think I'm done with it now, that should be a good baseline.
I was very wrong, I found a HUGE oversight in the Z_NEAR and Z_FAR for the camera. This is https://github.com/jordan4ibanez/d_glfw_test/tree/v1.0.3 The Z_NEAR was way too small. The Z_FAR was way too big. This was a side effect of prototyping. Causes: GL float calculation errors! Z fighting literally everywhere. It is fixed in 1.0.3. I suppose I'll keep updating this if I find anything else, but now it seems to be functioning as expected. It would be much easier if I could edit the main forum post as I would not be bumping this back to the top of the forum.
Aug 27