Car Game in C++ for Beginners | Easy Console Games Coding Tutorial
Вставка
- Опубліковано 25 жов 2024
- Car Game in C++ for Beginners | Easy Console Games Coding Tutorial
Easy and Professional game programming in C++. This video is a time lapse of Console based Simple Car Game Development in C++ using dev cpp compiler.
Send me your coding challenge!
If you have any questions I'll be glad to answer, please leave a comment on the video.
Thanks for watching
Please click Subscribe button and press Bell Icon
Link to download source code is
github.com/Ang...
Me: cout
#include
using namespace::std;
{
cout
@@TempoChannel5 Where Int Main() ?
@@mmrlmn5289 sorry im dumb.
@@TempoChannel5 do not talk like that
@@mmrlmn5289 #include
using namespace std;
int Main()
{
cout
This video alone proves that you have to put in the long hours on this software and really study this code in depth if one is to create great things like this :)
It took me almost 8 hours to complete this type of project......
IT WORKED??
Please anyone say me in which compiler this code will execute 😢
@@Viral_reels.. ANY COMPILER U WANT BRO . UNREAL ENGINE C++ COMPILER.
@@artandcraftwithbt Yes!!!
this would be much much great if you'd explain every step when ur doing! otherwise great
yeah that would have been really helpful.
Agreed
Hey I am a coder and I know most of the c++ things if you ever need help feel free to ask!
@@Mythical_Spectra sir what to do when you want to open a output in qbasic but it says in the bottom "c++ compilation failed" .
Mine is window 7 sir pls help asap 🙏🙏
@@inthegallaxy7097 it means the compiling of the code failed try using a different compiler or check the app you might have installed a wrong version if its not any of those issues try updating your windows
Man, you worked VERY HARD on this, you deserve more views. Nicely done!
@@Inferno0810 hmm, really?
@@Inferno0810 maybe he tested it before he did the video and rewrote all the code again for the video!
#include
using namespace::std;
int main()
{
cout>>”Am I right?”>>endl;
return: 0;
}
@@thecube0293 no one knows
@@thecube0293 its >, and no colon on return
@1:47
Resolving 2d array to 1d array
Is important for improving frame rate because you are using nested for loop which means the big o notation for this is x to the power of n i.e grows exponentially.
Better way is to resolve it to 1D array using the formula y-coordinate of the screen multiplies the total amount of pixels or characters used for the screen console to draw vertically i.e screen width plus coordinate of x considering starting at top left with the conventional (0,0) coordinate.
Source from olcPixelGameEngine by
One lone coder
gyan ke chode
Please anyone say me in which compiler this code will execute 😢
Congrats man. Starting c++, let's see where I'll be in one year.👨💻
how far have you gone?
@@ismailaminu9826 progress was good but I had some other stuff so I'm currently working on Python but I'm still doing c++ bit by bit.
@@hutch-uu322 Ahh just make sure that u Master only one Programming language
thats what ive got advised by soo many ppl, i cant even count
even on youtube they advice this
now what are you doing did you do that c++,
@@Vampion I dived into machine learning using python. So c++ not that much at the moment
Nice Skills, but it will be more helpful if you explain every step to us so that we can get knowledge. thanks
Can you make a video or a list explaining every purpose of a certain command?
btw he said that he will answer the questions and he didnt answer any question lol
@@carinejabali1369 so sed ;(
no mames coméntalo tu xd
In my opinion, it would be much better if you would explain what you are doing. I know it would take a lot more work but it would be more understandable and clear.
yeah
This is so good men. I like the background music also
Coding part is a reverse ◀️ video of backspacing 😁😁😁
Good effort 👏
i see what you meant by "easy and professional",but maybe the key to a successful tutorial is documentation or commentating- you know,explaining what you're doing?
I agree. If meh professor saw my code and I didn't provide any documentation or comment on any part of my code, I'd be in big trouble.
@@Mikioshi what can i do with source code?
@@Mikioshi Yeah Same Condition is here and now I have to check and see the use of every step in this code btw some of the parts and commands, you will understand easily by there name
@@丅-k3r Copy it and enjoy
@@angulars please post the explanation video.
#include
Using namespace std;
Int main(){
Cout
This works for me. Thank you!
A lot of people asking for source code. Just copy what he's doing in the video and you will learn along the way. Don't be lazy pause the video and type it out that one of the best ways to learn. 🙄
How to write + over _ in line nomber 19
@@islamicshorts.12 ±
i liked it and the part when you explained and not just write code
you are probably no longer reading these comments but in case, how do you repeat the while 2 times in a row to get two enemies on the screen instead of one? I am doing a game using some line of codes from your car game, but on the output i will get just one enemy on the screen instead of 2
Really sorry for the delay. I will soon make an explaination video of Car Game in C++
how to type negative symbol under the positive symbol?
same Q bro😢
cool stuff.
nice simple project with just one execution file.
i'm actually not to sure how I set up pathway directories for external images and such to be added into my programs at the moment. this video kept me busy, thanks.
I followed this project and it worked fine without errors only is the problem code have some bugs appearing unnecessary asteriks in the console window
Eased my work
Thanks
how can i start the game please tell me
Which software are u using???
And what are you pc specs🙄
It's devcpp++
It's showing compile time error
As - syntax error near unexpected token ')'
please help
Thx for teaching , learn a lot !
why does the music only start at 6:05 lol
Hey bro it didn't work it bolded on number 36 which says " CONSOLE_CURSOR_INFO lpCURSOR
How do you do the plus or minus sign
Bro..how to type ± this symbol in laptop without numpad plz...reply...
alt + 241
You are real GuRu.. thanks
Sir please give the whole program coding in description 😊
here..
#include
#include
#include
#include
#include
#define SCREEN_WIDTH 90
#define SCREEN_HEIGHT 26
#define WIN_WIDTH 70
using namespace std;
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD CursorPosition;
int enemyY[3];
int enemyX[3];
int enemyFlag[3];
char car[4][4] = { ' ','�','�',' ',
'�','�','�','�',
' ','�','�',' ',
'�','�','�','�' };
int carPos = WIN_WIDTH/2;
int score = 0;
void gotoxy(int x, int y){
CursorPosition.X = x;
CursorPosition.Y = y;
SetConsoleCursorPosition(console, CursorPosition);
}
void setcursor(bool visible, DWORD size) {
if(size == 0)
size = 20;
CONSOLE_CURSOR_INFO lpCursor;
lpCursor.bVisible = visible;
lpCursor.dwSize = size;
SetConsoleCursorInfo(console,&lpCursor);
}
void drawBorder(){
for(int i=0; i
Bro liking coding from beginning means for beginners 😅💗
Music starts at 6:06
what is (kbhit) in line number 152 ? time 5:07
Thank You Sir the video really helped.
how can you type so much without a single mistake or error?!
thank you bro for this wonderful code and one question how did you learn to write such a wonderful code of games please answer.
how do you type this symbol with the plus and the underline
?
alt + 241
Which software do you use
Hey,
Can you start making games again. Like you did earlier?
you earned an subscriber
#include
Using namespace std:
Int Main ( )
Int sub = 0;
Cout sub;
Cout
Which software you use for creating the game which compiler or software?
@@angulars thanks
i just copied this video code and it worked but the car is not visible , what would be the problem
#include
using namespace std;
int main () {
cout
This is "real programming" and what I expect a "real" software engineer do, not just use Pytorch to build a simple model and claim to be an AI engineer!
A real software engineer should be able to do a hell of a lot more than this
Ah jeez I’m a freshman and only took Java and about to take C++ but this is really intimidating
Sir game mein iostream: No such File or Directory Compilation Terminated aa raha hai?
I try this code but ,
could not convert '& lpCursor' from 'CONSOLE_CURSOR_INFO*' {aka '_CONSOLE_CURSOR_INFO*'} to 'COORD' {aka '_COORD'}
this error ocuured . pls help me..
U can try to do on Lpcursor and also u will add consor position.and u will add on one line cursorposition by atteched in LP cursor remind it it's not ipcursor it's Lpcursor
wait, it said: can not open source file "time.g"
how can i fix this?
Please tell me
Why we took
1. enemyY[3]
2.enemyX
Emenyflag
And how collision works
how write the +, - sign together in this video.
Good Editing
Bro my setcursor showing wrong after click F9 ..why bro ?? whereas I'm wrote properly...and what did you clicked after complete coding for start the game
which plateform are used to type code c++ in this video....?//??
Any online classes?
I have written the same code as you still it is showing me bug at line 28
We can do in visual studio??
Yes
the song at the end blasted my ear
Forgive me, I as a dev myself, I'm finding it hard to catch up with your code.. some comments on it would be helpful.
I am new to c ++ programming. Can I have your code for reference?
@@angulars sir i found an error on line 49 why..... in same version i do...
22 28 [Error] narrowing conversion of '49841' from 'int' to 'char' [-Wnarrowing]
Thanks for the code brother
Thank you bhaiya kya aap kucha aur game ka example nhi pta sakte ho kya 🙂🙂🙂🙂 please please please please
car.cpp:22:57: error: narrowing conversion of '49841' from 'int' to 'char' [-Wnarrowing]
bro what's this problem ? I use Vs code
I think there is an error with the character ±
I: print("Hello, World!")
Aoa
Ma NY coding ko typ Kiya lkn output ma car run nhi kr rhi??
Hwo do you write ±?
What specefic compiler should we use for this program sir
Making Frogger?
Or a TAS bot program?
Try to learn OOP. That can help you.
what code is to move player right, left,forward,back in c++ ?
Please tell me anyone 🙏🙏🙏
144 and 145 no..in code see
Sino dito pumunta para maghanap ng basic game para sa project nila ? 🖐️
Bro how to put ± sign on computer
Why it say
1. #include
Error
Sir how will + and - come together?
Did u got?
Its called plus minus sign
@@ElegantYTEdits what is ASCCI CODE of this one
@@grimdawn9289 alt 241
Can you explain me this code?
Not run programming for turboc3 me
hope you are fine ! I am making a game using grahics.h header file. Can I use switch statement in the same program ....? how? it does not respond when i use switch statement...
I’m the 500 comment and 5000 like
How we can use this ± symbol in turbo c++ ??
Hello sir !!
I have a bid doubt
I am ECE 3rd year student and till now I didn't practice for any language and also I am gate aspirant .
And I want to get placed so should I start preparation for coding ? Is this right time to start coding when I am in 3rd year ? Please reply
I’m the 500 hundred comment and 5000 like
bro how you add a + under line
Same question
#include
using namespace std;
int main () {
cout
does anyone know how to color the individual objects like the enemies? I've tried it in so many ways but nothing works. system("Color ") and many other methods I've tried but nothing works. when use it, the whole screen takes on the selected color and you can no longer see anything.
as a user of html/css (front end) i basically have no idea but that's soo cool
Which software you're using for this...?
Why didn't declared in this update scop?
I'm trying to figure out how to include the usage of the left and right key, any ideas?
GetKeyState()
I'm 1 year late! LoL
This does not work on C++ online compiler. Is he using VS?
Bro
when entering #include
they saying error occured
I write the code and I'm trying to use this but when i click any key to start the game it automatically back to the main menu section
Which compilers ur using
Ma per questo videogame non era possibile programmarlo con Java?
Thank you!
Thanks for your hardworking.. it helped us do it differently...
Bro does work on turbo c++?
here is it work in Codeblocks? just after running it works?
I have run it but it is showing me drawing operation was attempted when there was no current window
Pls help mei sir I don't know what's the problem
How can I run it or install !
It's automatically shifted to vs code when I try to open
Which algorithm is used?
Sir game ka Code bana rhe he but usme multi-character character constant ka error aara he
Sir plz reply jldi de dena
In line 203 :- [Error] a function - definition is not allowed here before '{' tokan
And last
Expected '}' at end of input.
Only this two errors .
can i run it on vs code
The plus minus symbol = "alt + 241"