hello everyone its Benny and welcome to
the 3d game programming tutorial series
in this series we will be building
several 3d games that's right
not just one 3d game we're going to be
making multiple 3d games almost entirely
from scratch but wait a minute Betty
there's already tutorials like this
there's already series that go on and on
about how do you make a game so what's
the point of this what is this doing
that's different from anything else out
there
well if you've seen any of those series
you've might have noticed there's a
little bit of a pattern that's
brilliantly captured by this tweet from
Brandon Jones
yeah there's tutorials on how to set up
a game programming project there's they
might even show you how to make a basic
toy game but then there's a follow
through then there's the rest of the
freaking L and that's where this series
comes in because the thing is a lot of
those series aren't really focused on
game programming so much as they are
hey here's how to do technology X we're
not here to show you how to do
technology X we're here to show you how
to program games . if it doesn't
directly lead to finishing a game it
doesn't get in the series and that's why
we're gonna be doing things a little bit
differently than most things out there
in fact very importantly I'm gonna be
showing you things in a way that's
applicable even two completely different
games and designs as all general and in
fact that's one of the reasons we are
doing more than one game so I can show
you hey this technique that showed you
for game development it really does work
for this game and this totally different
game and it's probably gonna work for
that crazy game idea you have in your
head that's totally different from
anything else out there that's the point
of the series that's what we're doing
differently and yeah that's what I have
to say so let's go ahead and let's go
straight into it so task 1 along our
game 2
journey is project setup yeah I know
it's a little dull and tedious but
unfortunately it is necessary don't
worry though I've tried to make this as
quick and painless as possible so
hopefully we can just breeze through
this and go straight into well creating
a game so in the video description
you'll find a link to this github
repository as says here yeah this is the
base code this is where we're gonna be
starting our project and yeah this
should work on pretty much every
platform whether you're Mac Windows or
Linux which is one of the reasons I've
done this so yay cross-platform it is in
C++ which by the way don't be scared of
C++ C++ is just like Java or C sharp
just pay attention when you use the word
noobs don't be intimidated by that it's
not gonna be a huge deal so yeah so in
actually in terms of actually building
this the first thing you're gonna want
obviously is your C++ environment which
on Windows is probably Visual Studio Mac
probably Xcode and Linux this is pretty
much its own development environment so
you don't really need to worry but you
can use code blocks if you really want
to use something and oh yeah so that's
pretty much what you need to set up you
also need the dependencies which right
here if you click on the link it'll take
you to the website so you don't have to
go hunting all over the world to find
these you just here's the website
there's the download you can follow
their instruction to set up and just
make sure you have those set up
especially seeming if scenic isn't
working
thinks well you're not gonna get very
far let's just say that and there you go
so I'm gonna go ahead and just give you
a quick demonstration that's pretty much
all there is to it once you have that
set up there's a really straightforward
set of build instructions on everything
but windows it's literally just a single
command to build the project and when
does he have a few more steps but it's
still pretty straightforward so I'll
just go ahead and give you a quick
demonstration so you can either clone
from this link if you have get installed
or you can download as a zip doesn't
particularly matter and I have an empty
folder here so I'm gonna clone because
it doesn't make a difference all leads
to the same end and as you see in the
instructions on Lenox which I am
currently working on it is literally
just a single instruction just run this
and the project builds so I'm gonna open
a terminal here and just run that I
already have all the dependencies
installed so don't worry but actually
there's a command for that if you don't
do it on Linux oh you can just write on
this command to install all the
dependencies and on Mac you also have a
command you can run to install all the
dependencies that's really nice it
suddenly windows where you have to sort
of go through the whole pain of setting
everything up individually so uh sorry
Windows users there's no magic command
for you but yeah the project is built so
yeah now it's really simple there
executable is called C GFX 5 so I've run
that and this is what you should be
seeing if everything builds and runs
correctly at this point though you might
have a bit of a question you might say
hang on a second Benny hang on I thought
you said this is going to be quote
almost from scratch this does not look
very fairy from scratch at all
I'll talk more about that in just a
moment but the short answer is this code
is based on the code from my intro to
modern OpenGL tutorial series
just refactored a little bit so yeah you
can do this completely from scratch
you'll just have to follow up along that
series to do this initial code the
reason we're not doing in this series is
because well setting up OpenGL is
outside the scope of the series so it's
not being covered here but anyways let's
talk about if for some reason this isn't
what happens if somehow the process goes
wrong for you if not there's a few
things you can do there are manual boat
instructions if you scroll down they're
a little bit more involved but they
might work around whatever issues you're
having
if that still doesn't work then I think
it's worth pointing out that all these
dependencies every single one of them
they have special instructions and
special resources for helping people set
them up so I would recommend looking
into that because they're going to know
a lot more about how to install their
dependency properly than I am but
finally if you're still having trouble I
do have a disc or channel it is linked
in the video description and it talks
about a lot of things but among other
things there is a helpmeet channel and
from there you can ask people and
hopefully someone there can help you out
and point you in the right direction as
to why things aren't quite working out
for you so there you go that is the
project set up and at this point I'd
like to talk more about the space code
I'd like to start by mentioning you
aren't required to understand the base
code to follow the series we're only
gonna be using the space code not
writing it so if everything I about to
say goes completely over your head no
worries
this section is mostly intended for
people who just like having an idea of
what the base code is doing or are
possibly interested in following the
intro to modern OpenGL tutorial series
so they can create their own version of
this so like I said 90% of the space
code is just the code from the intro to
modern OpenGL tutorial series except
refactored specifically the big refactor
is all the opengl code has been moved to
this single back-end class and the
reason for this is now all that code no
longer depends on OpenGL
now we could easily add in say DirectX
support or Vulcan support all we'd have
to do is submit a different version of
this class and the whole project just
works with it so yeah that's a big
difference
now all the classes we created and that
series are now calling functions from
this that also means if for some reason
you do want to create your own version
of this base code from scratch
by following along for that series
you'll probably want to keep this header
file handy so you know hey this is what
the final factoring ultimately looks
like and yeah that is the bigger
factoring there's a few other minor
things like I renamed a couple things
and I added I did some of the OpenGL
features slightly differently but that's
by far and away the big change that's
90% of the base code the final 10% is
well 5% is more rappers like that for
STL and a few standard library functions
and over five percent is change in
dependencies now we have rapid Jason as
a dependency that way we can load and
save Jason files and we've replaced GLM
with a custom 3d math library so that we
can take advantage of well the super
fast vector instructions that modern
CPUs have that for some reason compilers
will not use by default and yeah that's
pretty much what the base code is that's
pretty much everything I want to cover
in the setup video so thank you very
much for joining you me but one final
detail actually that's very important is
the license this is all open source
everything that I'm gonna cover in this
series open source code so you're pretty
much free to do whatever you want for it
it's open source under the MIT license
what you can't do is you can't sue me
and you have to give me credit for what
code I did buy this copyright notice
here say hey this code I ever comes from
Benny or is based on Betty's code there
you go
that's pretty much it so notably because
I know this question is gonna come up
yes you are completely free to take this
code use it to build your own gabe's and
sell it and do whatever you don't owe me
anything in that case you can do you can
make games with this sell it do whatever
and that's all the set up thank you very
much for joining me but this does bury
the question Nathan we have two awesome
projects
how exactly do we make games with us
find out next time I hope you enjoyed I
hope you learned and I will see you in
the next video thank you see you then