Ok, today we're going to learn how to
make a kind of simple console game with
C++. But this is a very; it's gonna be exciting; it's a lot of fun for me when I do it.
And this is going to be very exciting and we're going to have an awesome time; because one of my subscribers requested
that I put a more advanced video, so I
figured this was kind of advanced. So let's
make a computer game. The first thing you're gonna do - open
Visual Studio 2000 and if you don't have
it yet, you can go ahead download it now. I recommend that you
have a general understanding C++. If
you don't that's ok explain what's going
down in business do you for the first
time note that if you have winners visa
later you can only the new Zune is
business do but I just do it if you have
me we're going to get his studio 2015
gonna go to File new project takes a lot
to create these my friend was talkin to
me once he said when I get down the
domes I gobos I said yeah that looks
like that's where you get your clothes
from anyway
time I've got some backup just in case I
get kind of loss and sized ones was
becoming so you don't have to be very
that this is going to go wrong I just
got away in a man's gonna call so get ya
and you gonna do business deals + 132
console application click OK and it's
going to create the project
videos like this helps to know a lot of
jokes because this is a lot of time
making his project next console
application check that precompiled
header yes and you must live life cycle
the mother or the mother hamburgers say
to the Father hammer you can meet her
son gave you guys if you didn't know you
got it so we're just going to a quick
debugging sure there's nothing wrong
with logic of the project itself
everything is ok the pop open a quick
build started projects by 2032 yeah I
person cannot clear history standards in
school right now bill
ok is building the first time is usually
pretty slow then after that kind of
Baxter why didn't our cell and house jus
the city folks who wanted his land
because there was too much jets take
they got those 10 that means everything
is going good and I'm gonna start
drawings and stuff and found for some
reason with me return 0 doesn't really
work so I'm not going to get rid of
return 0 but if that isn't a problem
when it opened I'm going to press Enter
. get now since I expect you not to know
kind of I'm not gonna go and this is but
it doesn't recognize the end zone would
have to include so I can recognize gonna
tape using namespace STD that
specifically say like the end zone to
tell the computer that a member of the
family are automatically recognize that
are recognized and not gonna go so what
at first I was gonna right click over
here on the right side of the right
click on it rename it may be recalled
may not see because I in team made it
here then next to do anyway click on
their part and we're going to add in
class
ad
just going to call it canceled so I said
in a player probably but that'll work
fine and if they can't so now F&F means
is that it's not defined as I'm not a
genius but not if this fall is not
defined in automatically finds it can
help their beers I think like with
including airs this file and then you
got include and it's and it's matches up
with internet if you don't learn
anything about it
ok so we got class canceled without
their default constructor and
deconstructed initializes so the next
time do with him and adds a few other
things that the first thing I do is
we're actually gonna go ahead and add a
simple map to the games when I'm going
to use him in the press and what I'm
gonna do is create extern extra large
agreement diet and you can define the
rival outside of this file like in the
CPP files from your character map and
right now we're just gonna have it
versus the y axis which is up and down
so im just gonna say 1010 up an ad and
then X is the x axis which is left and
right and 22 me 2010 my twenties map and
go ahead and create that map alright so
map 20 and we gotta define as a
character map character mapping array
and now we're going to you is we're
going to treating the map right let me
take a look at this guy here I go put a
bracket bracket will contain the actual
data I knew a close the matting first
thing about me why in a bit about
actually let's start off with 10 wide
and will create them a bit by bit every
time they gonna put ten of these right
now
karma seem to be there now and I'm not
the one track I mean one whatever they
call it checks what makes you think of
the Chex cereal take that controls and
I'm doing creating simple map
50 right now I'm not gonna make it as
big as AskMe I'm just gonna get a thing
going to get this right here and bracket
complaining burmese training
largest I'm not sure and I hear ok first
of all not sure what the problem is
going to copy this map from over here
working when I enlarge the y axis sorry
the y axis is fine that I needed a large
decks access and that should fix it was
too wide again so we got this simple map
of here and I'm gonna go right around
here
a simple as most popular symbol for a
character as a now let's create some new
this is contradicting with the map to
find outside so we create a new class
member move and it's going to be void I
think yeah and what do you have to be
looking at this a lot but we're going to
have to create several rivals so there
is one in Ukraine is extern int experts
will be the location of our prior on the
x-axis extern int y she
location of our character on the y axis
and so so we had to find after finally
this and I was gonna put a somewhat
spotty now 11 on the map that position
11 as though exegetical 1
and why is gonna go on location of our
player X equals Juan and I define ask
Ryan C and int y ok so now we're gonna
find move and this is gonna take a
little bit of is not a day comments
closed curve reversed but is not more
logic to it as actual behind the move is
going to take place is void because it
is a return evaluate all that mean gonna
go and detailed its plans to move I'm
gonna go and just take a look at what
we've got and I magnin and I'm TV first
and then I see age these vertical and
eight stands for horizontal again so
that means when you call the function
when you use the move function but when
you have to enter the value you he goes
up in value that he goes black so that
makes him
defines you read I'm sooo 8 alright so
many great and the rival client TX to
and it's going to all I do is going to
Eagle plus I mean X plus another words
int wide to is going to Igor however
many spaces above the player that we
want to move to TX to that's going to
why this is why busby this will call X
plus age so there's a little how many
spaces will play in the x-axis so a
david is a value that we want him to
move the examples was negative one we'd
add negative 12 X so now expired equal
one less which will make our player move
to the last ok so we're ok now we have
to enter a little bit of logic is only
had EX and EX Eagles
I was going to do it like we did it
actually goes blank space right now is
what we're gonna add and why a blank
space in other words if the spot there
that we want the arguments he's blind is
nothing in the way it's going to go and
move into it so if that is the case
going to so I have no doubt having a
look here so much as just I'm still
figuring this out myself right now
equals a blank space in other words the
old location where r player once was he
goes blank so he's not leaving behind
symbols of him everywhere he goes and
then why do this is the movement on the
x-axis so if i text you it is in our
characters moving into if confused here
I S site map
X soo Eagles blank if basic character is
to move in so you can text you the space
you want moving so if thats basis a
blank in space are carried away as a
blank page so now X where a player is
has to do it so he moves over to the
spot where we wanted to and I think yeah
I players or you could just create a
character that held the players someone
using your just replace ok
I'm just gonna be a little bit short I
and then this time is gonna be if wide
su ex at the space on the open access
their players to move into is empty then
map YX Eagles whereby it was equals
empty space and why has added to it so
that makes why is one more one less
whatever it is the location of players
now I'm value on the map so he's now a
different place
ok make sure I'm not missing anything
gonna have to do is to get this actually
working the mess around with this a
little bit over soon do is we're going
to get rid of arrival came running board
game running that if the game is running
as so now I'm going to create a decree
an object for console class and I can
use call functions of this part
create console console and it's the
understand cause or so to make it
understand what caused all means I'm
going to have to include consoled at age
now stop complaining and no thats a
class now we've object that allows use
of functions alright so many ppl I'll
lube
a while loop what that will do and here
is that while conditions to continue to
loop around and around at all the
different functions so we continue to
move over and over again you to check
conditions and make it will just keep
the game running game on stop as soon as
it starts anything like that so it's
just the loop that lets us continue to
do things such as a wild game running
while the game is running
and that was good actually I saw the
first thing to do is we're going to have
the map be drawn sword against you is
I'm also in Adeline system as well as
does will clear the screen and I think
what kind of memory can use to screen
for being too glitchy mess up and now
have to do is to include another file
include windows 8 will use a keyboard
functions and other things that we're
going to need all rights I want to do is
we're going to try to function or a loop
that will draw the maps are you agree a
for loop which as you know like a while
if they'll just loop back and forth
bills drawn and the entire map so for
int I he calls and I think I use less
than what you gonna do if your gonna go
to cause you look at a map and it's
going to be less stop as soon as it
reaches 10 different be segments on the
y axis will just which will just make it
a draw at ten columns of the map and I
every time I want more so I eventually
reaches 10 North yeah I said it starts
John the map once you have it just stops
John map once you just have to write
out and map and see out drawers text or
other stuff onto the console out the
window and it draws a map that's what's
wrong in DL purchased pressure certain
next lies as putting each so it's gonna
John that just like this without India
all characters on the same line we don't
want that to happen right now its time
and he's gonna comment is out now see
actual see thing I read that wrong so
you can actually see why we need there
again and now we're gonna collude some
actual movement if now how close how you
check key if accused read user function
called get a tank he gets his key state
yet I think he state in the keys card K
that is the up arrow key means if the up
key is pressed up arrow key is pressed
and then we're going to say that i'm
gonna move every press up key were gonna
make a move up one space on the y axis
10 because we don't want to move into
the left or right is complaining about
getting think he's date ok needs to be
lowercase computer is a very particular
are and you can copy that under control
the S
get Ek down if we present down arrow key
negative one which means down on the y
axis alright and Turkish coffee so we
comin more the easy part because we care
right that's the right move so it's
moved one space on the x-axis which is
to the right and then less but if
they're argues left 0 access and
negative one on the x-axis which make it
move I'm not missing anything
ok and I'm going to add this is going to
bug what we've got now over not being
similar thought long and I make up for
it I'm not the best teacher make up for
the game very interesting thanks in
future teachers don't in their
consultations and building do it means
gonna be alright I mean generating kids
so I think joke I tell you could tell me
that you guys are now available times he
was going to call his arrow and not
doing it and then to comment this line
now my hair red light problem
copy this copy this line I might need to
add this line actually I'm ashamed I
don't remember that day
polished up on it that I know you've got
a deadline which i think maybe allows
you to continue pressing keys or causes
United Mileage working so run over this
real quick see we've got going on and
where to go to maine uski bhi and it's
taking lines actually replacing with
system cause which makes it possible
basically before I went down having both
of those was probably what caused the
problem
miss you like this video be sure to
subscribe to because some people
subscribe to me having an awesome time
when I've heard someone talk to me
Michelle subscribe so you can be alerts
text the other coming out with your dad
keys keys in Corning this this game and
maybe even a level generator
being so super duper slow continue your
problem bro is busy drawing a map
ok I'm pretty simple bowl game running
but didn't even tell if it was true and
when the compiler check to see if it was
true and I didn't say it was true got
confused so now I just added you go
through sorry about that guys still
think I'm cool an hour we do that we've
got one bug I'm gonna have to press the
up arrow key to go down but the left and
right arrow keys are moved right and you
see when i press arrow keys this is
awesome under gained a lot more yes so
I'm just going to fix this should be
negative on how many bugs
so negative one because map like this
this is like looking on this is Huan and
so anyway wat versus negative right now
and build our really care if I press the
keys but we got over here
negative one so ya see if it works now
and you see is compiling a lot quicker
and now they are accused are working
alright guys about done and I don't
think I really wanna do anything else
right now
got a basic video down so I mean basic
controls down by 22 God again and so the
next video young guys will be ready in
more subscribe see you next video we are
going to
ad I'm going to map a little day and you
notice that says I said if the space
that is moving into Eagles it empty
space you know because it is not moving
into my address apparently ran out is
not moving into the space above them
because that's not empty space so he
knows me knows he can't move in today so
that's the basics behind him while but I
was your age make for example someone
who wants to get a key and show you how
to get the right now as we got there
save this and maybe they get a lot of
response from this video wanna come out
the next one even faster and
