Using dub to build tutorials

Resident_Tofu via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 29 11:07:56 PDT 2016


Hello, everyone!

I was directed here after asking around on reddit.
(https://www.reddit.com/r/d_language/comments/500rdx/complete_beginner_to_game_dev_and_d/)

To get straight to the point, I have practically no programming 
experience, but I did just finish going through Programming in D 
and I would like to learn how to make games.
My plan so far is to learn how to use dub and build the samples 
here:
https://github.com/d-gamedev-team/opengl-tutorials/tree/master/ports/opengl-tutorial.org

I'm using the DMD compiler and I have downloaded DUB and know 
that "init" makes a project and that's about it.  So, here are 
some questions!

1) I've downloaded the binaries of the dependencies listed.  Do I 
need to do anything with them to get them to work?  I don't know 
how to add these to the PATH (I'm on Windows 10), but it mentions 
copying them to a bin folder.  Does it matter where the bin 
folder is added?  I'm guessing I only need to include files for 
code I'm using, but maybe dub does that for me?

2) Does dub automatically download bindings so I can use the 
libraries with D?  (I hope I'm getting the terminology correct 
here)

3) Do I copy and paste the tutorial code into the app.d file, and 
replace the contents of the dub.json file with the associated 
.json of the tutorial?

I apologise for asking for a thorough step-by-step of what I need 
to do to get these running.  I'm sure it's second nature to most 
of you but it's quite bewildering for a newcomer like me to try 
getting this stuff to work and keep running into problems.

I'm thinking of starting a blog to help people get into using D 
once I know what to do, because I really like the language!  The 
best I've used by far.  And if anyone feels like writing guides 
and documentation for complete newbies, I don't mind being a test 
subject and hopefully bring in more people interested in 
programming.

Thank you for your time and patience.  :)


More information about the Digitalmars-d-learn mailing list