C++ console game
Вставка
- Опубліковано 11 вер 2024
- It's my first (and probably last) game made in console/ASCII style.
I've been programming in C++ for few weeks only and before moving to graphic libraries I decided to practice basics of programming while having fun making a game.
I'M NOT ADVANCED OR EVEN INTERMEDIATE PROGRAMMER - I did put source code for you to download, but don't use it as an example of how should something be done. Code is badly written, I've made some bad decisions, but anyway did stick to them.
Again, my goal wasn't to make anything perfect, but to practice making functions, working with class types, making loops etc.
------------------------
To my subscribers: I'm not playing Order & Chaos 1 or 2 anymore. I had a lot of fun, but I felt like I archived everything and simply got bored.
------------------------
Game.exe/Code: www.mediafire.c...
Code with english variables (you need the previous link aswell!): www.mediafire.c...
♫Music: No idea :p took it from here: • Video
Video editing: VideoPad
Graphic Options:
Ultra
High
Medium
Low
ASCII
Welcome to the new era
..
low
utf8 (a lot of terminals support this now : )
ascii
Low
ASCII
command line
block(just image each of these ASCII become one big pixel)
XD
LOL!
When you dont want to learn 2D Graphics library
100% agree with this LOL.
Lol
If this game maked in assembler, then this game have meaning.
Just use ASCCI
Actually MS-DOS Assembly or MS-DOS Quick Basic doesn't actually require you to learn a library. The graphics are already built in the x86 architecture, originally 16bit. The only thing you need is to write code that redraws an image on screen in a certain refresh rate (may be like 10 Hz or less, old school 2D games didn't use much of frame rates like today games). The only thing is, that screen refresh rate was completely driven automatic and couldn't be used much to draw an image on screen, because even graphics code was still driven by CPU. Since Assembly has no understanding about time, the frame rate and overall speed of the game is highly influenced by the clock speed of your CPU. To achieve the original feeling on a newer CPU (considering when using MS-DOS on a standalone machine), you have to actually underclock your CPU to something around 800 MHz (which is still damn fast). Also, it is necessary to use no more than 32bit CPU, because MS-DOS won't work with 64bit CPUs. If you're lucky to find and buy a 16bit CPU, good for you. Other than that, you'll have to underclock your CPU to achieve original speeds. That also applies to MS-DOS Quick Basic programs - those are highly influenced by CPU clock speed...
took me over minute to find player
Yes, I also didn't see the huge "
I needed 47 seconds
And asked a question in my mind *where to look at?*
+Dok Asov Well i just noticed it because of your comment
It's hard to do that ! You're SO STUPID ! And player_x and player_y is printed !
2:00 proceeds to spend 6 bullets trying to get 5 bullets
but later on, he also uses that space to turn a rock(@) around, so it was necessary to kill 3 enemies anyway I think.
Interesting, but i asked you make a calculator (c) Teacher.
Processor is a calculator, so...
if you don't bring a job to the Italian school without respecting the track of the work, you'll get a 3 (H) ... damn Italian school
Well, not everything is about you, now is it
This is not what they meant when they said backend game design
=]]]]]
No this "back then" game design XD
@@datasmith4294 Lool
There have been a lot of comments regarding how it's pretty much impossible to write such program after programming in C++ for a few weeks only as I stated in the video description.
I should have addressed it quicker, but the answer is that I indeed have been programming in C++ for a few weeks, but prior to that I have been programming in Pascal for a few months in school so I knew how to program and only had to learn the C++ syntax.
It is possible to write such a program after few weeks of programing at many universities you have to do even harder programs. For example at my university you had to write a mario game(1 lvl), and console paint and you had two months to do this. I myself had just started programing back then, and i really mean i just started I had no idea what a programing language was, and even what an int - integer was. But since i was really interested in coding i did all these projects one week after they were announced so it took me 1 month and 7 days. However I did a similar game to yours after just 3 weeks of programing.
@@robertmielewczyk9804 With all the resources online... I could believe it if you do nothing but put your nose to the grindstone. Anyone that says otherwise really doesn't know how to find resources on the web and probably shouldn't be a programmer.
If you only learn the language features that you know from Pascal then you will be able to map Pascal code to C++, but not C++ to Pascal. C++ has a lot of language features you might not even have heard about.
Doskonala robota. Pjotsze, moze myslisz, ze nie jestes "advanced" programmer, ale uwierz mi, 90% "advanced" programmers by poleglo na zrobieniu chocby 10% tego, co ty tutaj. Wiecej wiary w siebie i mniej 'falszywej' skromnosci ;)
What resources did you use to learn this?
This is proof that dedication is the key to finishing projects and not pro skills, right?
I have years of programming experience, but this is a more complete project than anything I've ever done in my spare time (in the workplace is another matter entirely!!). Well done!
You still need some skills to create good working code.
Really impressive! I love games with tiny pieces and characters, and one huge level that fills the screen. I even just love watching things move constantly on the screen! And it was clever to conceal the boss room at the end.
SMFL has left the chat*
Are you fucking kidding me? This looks so good for a console game, holy shit! I like especially the fact that you added music to it. What did you use to record the console?
To record the console I simply opened it on full screen and recorded my whole screen (I don't remember what I've used, but I know I had to cut out the console's border)
How did you add the music???
he added it in the video XD
Hasan Ocak but you can with sfml for exemple
it's not hard to add music,, you only need to add around 2 lines of code (if you are using windows console, and programing with c++) Check PlaySound function on msdn documentation
Music in this video:
Overall track:
🔊 Best Chiptune / 8 Bit Gaming Music Mix // No: 1 by Necris
ua-cam.com/video/3swdaU0cpkc/v-deo.html
0:00 - 1:50 :
Track 9 | RoccoW - Chipho by FreeSoundTrack (couldn't find original source)
ua-cam.com/video/7CuxeIRM4rk/v-deo.html
1:50 - 3:45 :
Track 1 | Crossover Dragon by Comptroller - Topic
ua-cam.com/video/90GTcDLP0Fs/v-deo.html
3:45 - 5:45 :
Track 11 | RoccoW - Break-A-Leg by RoccoW
ua-cam.com/video/MVBMmEn6DWA/v-deo.html
5:45 - 6:35 :
Track 12 | RoccoW - Braadslee by RoccoW
ua-cam.com/video/6xCLcy-b6lE/v-deo.html
omg i love you
@@presauced lol ur welcome
Me trying to find where the dot player is:
[e y e s q u n t i n g]
*The game looks just awesome!*
*Personally, I liked how the boss appears - **4:16*
no
@@fv4202x no, YOU no!
@@jonnykopp ok
I didn't really understand that that was the boss and was like "whose are these HP inside the skull's mouth?"
@@hephaestus2031 *¯\_(ツ)_/¯*
*Don't know, this is my old comment, so ya*
Lol I thought your player was the 'A' in the top left corner and was waiting for it to move for like five minutes.
Edit: I'm also blind and did not read the legend.
player is [C]
Same
This is art and good music. I bet the code looks great too!
It's fun too!
The code looks terrrible xD, but it is understandable since he said he wanted to try c++, and make it quick
@@robertmielewczyk9804 rude
When the internet is down
When you see this very well done game and read the details and you find:
"I'M NOT ADVANCED OR EVEN INTERMEDIATE PROGRAMMER"
You'd better think in forget c++ programming...
I read your code, now I know how most people feel when watching a horror movie.
More seriously, this is quite a good accomplishment regarding your low experience and the mess it became the more you progressed. It must have been a nightmare to debug and many would have perished trying so. I understand it now, the real game is the game you played while you were writing it, the real game is the secret challenge you've set for any adventurous programmer, the real game is to read this code, understand this code, be this code, add some features and make sure the code is even more complex for the next challenger! I may have digressed quite a bit.
oh man, don't be like this lol
I've just read the source code. I've never seen so much hardcoded values, lmao 😂 I was especially laughing at the map implementation.
But the game itself is just pure gold.
I'm so fricking determined to continue learning C++ and create a similar game on my own.
where is the source code download? the mediafire link seems to be invalid.
@@dd-zb3fw "Code with English variables" is the one. I have no idea why I might need the other one, it looks complete
@@ІванДмитренко-х6э thank you
$ -> vertically moving enemy? You mean horizontal, right?
Diriector_Doc top down view rotated 90 degrees maybe?
vertically moving as across vertical columns?
I think he meant straight-line moving enemy
searching comment
Vertical in it's local coordinates, so he just turned the snakes 90 degrees and done it move horizontaly (But local Y axis for the snake)
Nice job!
My roguelike customs made me irritated, that the @ is not the player :D
Player1 picks up the Rod of Destiny 8======D
My thoughts exactly :D
i'm just here for the music in background !
it's amazing !
9/10 - IGN (Needs more ASCII)
thast really cool I like it. Its like your own little "World's hardest game" in console. Love it.
It is really strange to see the number of people impressed by this video, when serious games made in a similar style usually turn out to be not so popular (even though they are great).
I mean, it is great that people are impressed, but bad that other games in this styles are not popular.
Oh my god! You're so great! You made an amazing thing and i know that to create a videogame is not so easy. I program in C++, java and assembly, but I'm still learning to do hard things. Like
I took acid before watching this video. It has made my brain capsize. Thank you, oh C++ guru. May your bits flip and your parity remain cromant.
This is so nostalgic for me. When I was a kid, our computer had only ASCII based games. Games like Sleuth, Castle and Star Trek (ASCII Version). Good times.
Oh man this is so much cooler than my shitty Python text game. This got a like from me, keep up the good work.
Edit: I do think that the player could be more noticeable, and the bullets should look different from the cannon bullets
damn cool! Thanks for sharing
dude this game is really amazing.... appreciate your your coding
WOOOOOOOOOOOOO
YEAAAA BABYYYYYYYYY
THAT'S WHAT I'VE BEEN WAITING FOOOR
you did this after only weeks of c++? wow honestly amazing
3:29 that's what you call a pro gamer move
This is quite a nice work you have done, even if you say code was not the best way possible its an achievment to do this with only a brief knowledge in C++, I know its old video but still I like what you did and subscribe hoping to see more great projects you make =)
Nicely done! I'm glad you created this before moving on to graphics libraries. I will be playing this for sure. Just look at what you created with so little. Very creative. Bravo!
Beautiful example of "tough" game programming! Great work!
Please, use github for code sharing. Scary to download anything from such resources. XD
You dont trust virustotal?
Github is even less secure because it is owned by microsoft. I bet you barely know anything about downloading source code.
@@hexagonist23 the fuck are you talking about
@@hexagonist23 please dont confuse people with this nonsense
@@jameender Do you really really trust Microsoft with your source code? I don't want Microsoft to steal my code, thanks.
Still loving this game 😍
The movement of enemies is hilarious to me LoL 😹😹😹
“Congratulations! You finished the tutorial! Now get ready for level 1”
This game is pure liquid awesome. My favorite game of the last decade or more is/was A Dark Room, and that's pure ASCII as well. No joke. This game really reminds me of ZZT, also a legendary ASCII graphics game.
Nice!!! Great bgm choice btw, matched your game very nicely. :)
Man, the new Dark Souls is looking great.
All jokes aside, good job!
Wow, amazing I am going to look into the code maybe ill understand your structure, nice job man.
That is the coolest thing I have seen all week
The comments in your code are informative and constructive. Definitely my style of writing.
Man, how did you DO this?? It's awesome! How did you manage to create a program that updates without doing "cls" every frame? Can somebody help me?
I love the overall theme of console games. Graphical games just don't have the same vibe to them, in my opinion.
good decision to quit mate, stick with programming, that is something that at least gets you somewhere in life. Best wishes for your future, Lukas
I see you will be successful in this sphere. Good job!
Really cool! :) I love these kind of text games!
This is very cool! I love the music, btw, is that your own too? I'm only just learning C++ myself and I love it, I bet this was really fun to make. In 3 weeks, no less! Very cool.
This is actually freaking awesome
For only a few weeks programming that's pretty good. Trust me this kinda shit is the hardest. Once you get to pre-made graphics libraries and tools. It becomes far easier.
Świetna gra! Zacząłem się uczyć c++ 2 miesiące temu i już miałem się poddać ale mnie zmotywowałeś, żeby dalej próbować :D
you'd only been coding for a few weeks when you wrote this? Can you show me what source you used to learn this?
that's not hard I can show u how
please do?
what do u mean?
I need ur skype/discord
how about you make a video or send me a the code to my email: dadadadad21@gmail.com
Plot twist: none of those obstacles and enemies are harfmful
all of the time i've think c++ is an useless codes, but after seeing this, "omg what an incredible programming language !".
for some reason this feels nostalgic
*Best Soundtrack*
This is proof that console gaming is not dead
8 bits music. That's all what we need
Mayhem.
I think it's brilliant, more power to you!
Nice job. For my Intro to C++ final project, I made a text adventure game, and didn't learn about the getch() command that allows you to do stuff like this until after I'd made a giant text interpreter function... Good times.
Pjotsze, the music link is dead. Any idea where else could I find that catchy jam?
Lol, just download the video as mp3
this is so fucking sweet, its like chips challenge
LEGEND:
↑: You (Player)
#: Wall
@: Boulder (Not Player)
-: Horizontally-shooting cannon (Indestructible)
|: Vertically-shooting cannon (indestructible)
o: CannonBALLS
S: Horizontally-moving enemy (Not Vertically or snake, Have 2HP)
%: Randomly-moving enemy (Have 2HP, Moves in certain areas)
&: Follows *YOU* (player) (longest axis dist (?))
ITEMS:
A: Ammunition (5 bullets)
+: Life (1)
C: Checkpoint
For people who don't understand what's happening, download a game called "Rogue" (it's free abandonware now) and watch a few videos to learn the controls, play for a few minutes yourself and you will understand. You'll probably regret becoming so addicted though
Looks like the game "Diamond Rush" that I used to have in my Nokia cellphone.
Respect from an old Schneider CPC-Gamer!
soundtracks are simply divine!
I always wanted to create some game like this in console, when I was just starting to learn programming :))
Me encanta este concepto de diseño para juegos. En el colegio deberían enseñarnos menos teoría histórica y más práctica con pequeños juegos como este.
Es puro amor. :)
chiptune 8 bit music.... nice touch to the already awesome looking game! : )
This music bops
This looks exactly like the game ZZT, which I loved back in the day
Love that muzak.
i love ascii games, nice work!
1:58 he spent 4 ammo to get 5 ammo, what a human being.
It looks great for a console style game.
Old school style. I like it
it's kinda great how much this looks like ZZT
Everybody gangsta until you loose an eye on player
Awesome graphics, awesome music. Good work, son.
"Awesome graphics"
@@taureon_ XD
I like the KEYGEN Music
Thought this vid was just showing a demo, took me around 3 minutes to actually realize that the game was actually being played.
I don't know how people can think visually how it must look only by writing code. Literary by looking the code I have no idea how he made it.
this is very creative. Good Job!
this is great! you create a new ZZT-like one of first projects of Tim Sweeney, Epic Games Founder
My calculator:
tan(2/3)
_0.786842889473_
Ans*180/
_SYNTAX ERROR_
Ans*180/π
_45.0827767067_
that one guy's calculator:
How do you align it so well with the screen? Whenever I put stuff on the edge of the viewable console it jiggles around
MUSIC:
🔊 Best Chiptune / 8 Bit Gaming Music Mix // No: 1
legend
whatever this is... I FRICKIN LOVE IT MATE!
That's pretty advanced for a 1st game, and only a week into programming? Not bad.
I've come to the conclusion with my brother's suggestion that you are lying and haven't been programming for just a few weeks.
If you did get to that level in under a month, that would be very surprising.
That’s f*cking impressive.
This soundtrack is fucking fire
this is way nostalgic. i wanna go write one of these bad boys now, cya. (;
The music is so good-styled, really reminds of these old dendy and sega games
How did you do this in the first few weeks of c++? Did you know how to program before? I'm learning c#, and I feel so stupid, because I couldn't make anything near that advanced!
You start from getting the basics, types of data (int, bool, etc), then if/else then for loops/while, and after that you only need to know that write.console writes a string in the console, with this little knowledge you are able to write simple game similar to this. If you want to code a game that looks exactly like this I would suggest looking at documentations, and stack overflow for every problem that you encounter (there won't be many even with basic knowledge) btw it is probably possible to write a game like this using only if/else and for loops but it would be extremly hard to do it
its pretty easy. there are some good console libraries with them you can achieve them, or if you want to do it without them then first search how to refresh console. then learn 2d arrays
then after that you will know how to do it.
@AleksiGraba Nightcore created with heart hmmm. Every onr has its own style of skills. With me, i make games with any language i learn. I also do database based projees and without db projees. And you cant learn everything from school, have to search. If you have hunger for these things, it will come to you. Otherwise it is a waste of time
Looks awsome I'm using some of your code to make it simpler to change the screen color