C++ Text Based Console Game - Ep 01

Code Bot
20 Apr 201709:36

Summary

TLDRThis tutorial series introduces building a console RPG game in C++. The game features a character named Alex, an elf, with a console interface displaying stats like name, race, level, and experience. Players can heal, encounter randomly generated monsters, and use combat strategies like attacking, blocking, and running away. The game emphasizes strategic thinking and has a leveling system where experience points are earned based on monster health.

Takeaways

  • 🚀 The video is introducing a new tutorial series on creating a console RPG game using C++.
  • 🎮 The game will be text-based with a character named Alex, an elf, and will feature a health and experience system.
  • 📊 The game includes a heads-up display showing character stats like name, race, sex, level, experience, and next level requirements.
  • 🔄 The experience algorithm increases as the player levels up, with a mechanic to heal by resting, limited to a certain number of times.
  • 💊 Healing in the game is based on a formula involving the player's current HP and level, with a cap on the maximum HP after healing.
  • 👾 Encounters with monsters are random, with monsters having randomly generated levels and health, which can be higher than the player's.
  • 🛡 The game features a combat system where players can attack, be attacked, and also attempt to block incoming attacks to heal.
  • 🏃‍♂️ Players have the option to 'run away' from battles, with a chance of failure and potential damage.
  • 🔄 Upon defeating a monster, the player gains XP based on the monster's health, and levels up to increase stats and damage.
  • 🛠️ The game is still in development, with bugs to be fixed and features to be refined in future videos.
  • 📝 The tutorial is aimed at beginners, with all code and resources contained in a single folder for simplicity.

Q & A

  • What is the main focus of the tutorial series?

    -The tutorial series focuses on creating a console RPG game using C++.

  • What is the initial character setup in the game?

    -The initial character setup includes a character named Alex, who is an elf.

  • How is the character's experience and level displayed in the game?

    -The character's experience, level, current experience points, and experience points needed for the next level are displayed in a console HUD.

  • What is the healing mechanic in the game?

    -The healing mechanic allows the character to heal by pressing '2', which increases health points and is limited to a certain number of times based on the level.

  • How does the character encounter monsters in the game?

    -The character encounters monsters randomly, and the monsters have randomly generated levels and health.

  • What happens when the character attacks a monster?

    -When the character attacks a monster, they deal damage, and the monster can also deal damage back if it has a higher level.

  • What is the purpose of the 'block' feature in the game?

    -The 'block' feature allows the character to block incoming attacks, reducing the damage taken, and potentially healing the character.

  • What is the 'run away' mechanic in the game?

    -The 'run away' mechanic lets the character attempt to escape from a monster, but there is a chance of failure which can result in damage.

  • How does the character gain experience points in the game?

    -The character gains experience points based on the health of the monsters they defeat, with each point of health equating to one point of experience.

  • What happens when the character levels up in the game?

    -When the character levels up, their total health points increase, and they gain additional damage capabilities.

  • How is the game's code structured?

    -The game's code is structured in a single folder with all functions and global variables included, making it more beginner-friendly.

Outlines

00:00

🎮 Introduction to Console RPG Game Series with C++

The video script introduces a new tutorial series focused on creating a console RPG game using C++. The presenter, likely a game developer or enthusiast, provides a teaser of the game, which features a character named Alex, an elf. The game is text-based, reminiscent of the early console games, and includes a heads-up display showing character stats like name, race, sex, level, and experience. The presenter explains the game mechanics, such as healing, which is limited by the character's level and has a cap on the number of times it can be used. The script also introduces the combat system with randomly generated monsters that have varying levels and health, and the player's ability to attack, block, and run away from battles. The presenter demonstrates the game's dynamics, including the risk of encountering monsters and the strategic elements involved in combat.

05:04

🛡️ Combat Mechanics and Leveling Up in RPG Game

This paragraph delves deeper into the combat mechanics of the RPG game. The player must strategize during battles, as mindless attacking can lead to defeat due to the health and experience system tied to the monsters' health. The game does not allow saving, and once the player's character dies, the game ends. The script highlights the importance of blocking and running away as tactics to survive, with the latter having a chance of failure that can result in damage. The experience points (XP) system is explained, where the amount of XP gained is equal to the monster's health, and leveling up increases the character's stats, such as health and damage. The presenter also discusses the game's development, mentioning bugs encountered during gameplay and the plan to simplify the code for beginners, as well as the intention to cover basic programming concepts in the following video tutorials.

Mindmap

Keywords

💡Console RPG Game

A console RPG game refers to a role-playing video game that is played on a console rather than a personal computer. In the context of the video, the creator is developing a new console RPG game using C++. The game is text-based and involves character progression, combat, and healing mechanics, which are central to the theme of the video.

💡C++

C++ is a high-performance programming language widely used in system/software development, game development, and other applications requiring high computational speed. In the video, the tutorial series is focused on creating a console RPG game using C++, indicating that the language is essential for the game's development process.

💡Character

In the context of RPG games, a character refers to the player's in-game avatar, which has attributes like name, race, and level. In the video, the character's name is given as 'Alex,' and the character is an 'elf,' which are defining features of the player's identity within the game world.

💡Experience Points (XP)

Experience points, or XP, are a common mechanic in RPGs that represent a character's progression towards leveling up. In the video, defeating monsters grants XP, which in turn increases the character's level, enhancing their abilities and reflecting a core aspect of the game's growth system.

💡Leveling Up

Leveling up is the process by which a character's attributes improve as they gain enough experience points. In the script, the character levels up after accumulating enough XP from defeating monsters, which increases their health and damage output, a key part of the game's progression system.

💡Combat

Combat in RPGs involves battles between the player's character and in-game enemies. The video describes a combat system where the player can attack monsters, which have randomized levels and health, and where the player's actions, such as attacking or blocking, determine the outcome of the battle.

💡Healing

Healing is the process of restoring health points in a game. In the video, the character can heal by pressing a specific key, with the healing amount increasing with each level. This mechanic is crucial for sustaining the character during combat and is part of the game's strategy.

💡Random Encounters

Random encounters are a feature in many RPGs where the player's character encounters enemies unexpectedly during exploration. The video mentions that the character can find random monsters, which adds an element of unpredictability to the gameplay.

💡Blocking

Blocking is a defensive action in combat that can reduce or prevent damage taken from an enemy's attack. In the script, the character can attempt to block, which, if successful, prevents damage and even allows for healing, adding a layer of strategy to the combat system.

💡Running Away

Running away is a combat option that allows the player to avoid a battle by fleeing from the enemy. The video describes a 'run away' mechanic where the player can attempt to escape combat, with a chance of failure resulting in damage, reflecting a risk-reward aspect of the game.

💡Game Over

Game Over signifies the end of a game session, usually occurring when the player's character is defeated. In the video, it is mentioned that if the character dies, the game is over, indicating the game has a permadeath feature, which adds to the challenge and stakes of each encounter.

Highlights

Introduction to a new tutorial series on creating a console RPG game with C++.

Teaser of the game featuring a character named Alex, an elf.

Gameplay includes a console display showing character stats like name, race, sex, level, experience, and health.

Players can choose to move forward or relax, affecting their experience points and health.

Healing mechanic allows regaining health at the cost of limited uses per level.

Encountering random monsters with randomly generated levels and health.

Combat system where players can attack and take damage based on monster levels.

Experience points are gained based on the health of defeated monsters.

Leveling up mechanics that increase health and damage.

Introduction of a blocking mechanic that can heal and prevent damage.

Running away from battles with a chance of failure and taking damage.

Game over condition upon the player's death with no saving feature.

Demonstration of strategic gameplay requiring thoughtful decisions between attacking, blocking, and running.

Explanation of the game's code structure, suitable for beginners with all files in one folder.

Upcoming tutorial content will cover basics like using STD count and similar programming concepts.

Promise of future videos to delve deeper into the game development process.

Transcripts

play00:00

what's going on guys I got a new

play00:01

tutorial coming back at you oh it's a

play00:03

new series anyway I'm gonna make a

play00:06

console RPG game with C++ so if you're

play00:11

interested definitely stick around I'm

play00:13

gonna give you the quick teaser though

play00:15

before you like you know I commit to the

play00:17

watching the whole series yet to see

play00:21

what we're actually going to make so

play00:23

it's just a console game so it is the

play00:26

start and T character name so let's name

play00:29

it Alex

play00:31

elf so yeah there's no sound or anything

play00:49

I could show you

play00:51

beeping later but this is just like in

play00:56

Toy Story type of thing

play00:57

I'm just gonna let it play you know I

play00:59

won't talk much

play01:14

so anyway I here's the main I like

play01:17

console for that we're gonna have so

play01:20

this is gonna be like your hard heads up

play01:22

display so it's gonna have your name

play01:24

race your sex your level experience so

play01:28

your current experiences your experience

play01:31

the next level so we've got a couple

play01:33

algorithms for those too like increase

play01:37

as we go and your kind help to move

play01:40

forward or relax and aim the backwards

play01:43

we can we we can change it up in the

play01:46

series but we'll see how it works from

play01:48

now if I press 2 for example and then

play01:53

obviously and you see how it cleared you

play01:58

press 2 again you just want to chill out

play02:00

for a second you heal so first level is

play02:05

times by 10 and divided by usual and

play02:08

then you can only do it a couple of

play02:11

times you rested but did not hear you

play02:13

feel stiff and sorry say for example you

play02:17

have 10 HP you can only do that 3 times

play02:20

and only get at level 1 anyway you can

play02:23

under get 30 HP on top of that so you'd

play02:25

only have 40 HP and then you have to

play02:27

risk moving forward and possibly

play02:29

encountering a random monster see I

play02:32

didn't finally find a random monster so

play02:34

I can heal again 3 more times but it's

play02:38

always a risk here's my first monster so

play02:41

I'm finding it a go and the oh the

play02:44

monsters have a randomly generated level

play02:47

so they can be any are a range of I

play02:50

believe it was plus 3 so anywhere from 1

play02:54

to 3 from my level so if my level was 10

play02:58

they can be from 10 to 13 and their

play03:01

health is also randomized so we can

play03:05

attack so I did 4 damage and he did 6

play03:08

because he's a higher level than me he's

play03:10

gonna do more damage I've got more

play03:13

health though so we can just keep

play03:15

attacking

play03:22

and one more for the win done zero

play03:27

health and he didn't get another

play03:28

attacking and we defeated the agro you

play03:32

water with 20 XP well done and you can

play03:36

see that XP actually updated and the

play03:39

level that's still the same when we get

play03:42

to that point will will go up so I now I

play03:46

can show you the healing mechanic so we

play03:49

healed an extra 86 so an extra 10 on top

play03:54

and I can hear all the time until three

play03:57

times total until back up to a maximum

play04:00

of a hundred for this level when we go

play04:02

up to the next level it also increases

play04:04

that the there are multiple different

play04:11

monsters so I have four in an array but

play04:16

we can obviously add more I'll show you

play04:19

how to do that time to show you the

play04:23

other features so we have a block as

play04:25

well and if you file a block you will

play04:28

suffer some some damage but if you

play04:31

actually manage to get the block you

play04:33

will heal so I healed five and I blocked

play04:36

all incoming attack so the ogre didn't

play04:39

actually hit me back

play04:41

and this guy's pretty weak so I'm just

play04:45

gonna kill him and then I'll show you

play04:46

the run for the next one run away is

play04:48

basically what it actually means you

play04:51

actually just run away and there is a

play04:52

chance of failing a running away and

play04:55

getting damage done to you we've got 20

play04:59

22 xp for that I'll just quickly show

play05:04

you the running away it's not it's not

play05:11

actually lagging my computer's not

play05:13

lagging or anything if you feel like it

play05:15

is I've actually put asleep on there it

play05:17

gives the player time to actually read

play05:21

it oh this one's a level 3 so he's

play05:23

hitting me for nines and I'm only doing

play05:25

for so the game I've built it a bit

play05:30

strategically so you have to actually

play05:32

think you can't just

play05:34

keep attacking over and over and over

play05:37

again cuz you're gonna you're gonna die

play05:39

and blocking is not gonna save you

play05:41

because you you fail fair bit so you're

play05:47

gonna have to run pretty much or else

play05:48

you will die and yeah and then once you

play05:51

die the game's over there's no saving

play05:53

this I haven't built it so I failed that

play05:55

run and I managed to run away now 30 HP

play05:59

it's a little tiny heal so yeah remember

play06:04

you can only do it three times and then

play06:07

it starts saying that you feel stiff

play06:09

from sitting for too long so I never try

play06:12

and move I moved but it failed so that

play06:15

like counters reset so I can actually

play06:17

heal heal back up I really want to just

play06:24

show you show you guys the level so when

play06:28

I actually get a new level so this guy's

play06:31

level to 6 damage to me so I should be

play06:35

able to kill this guy with my health and

play06:40

and the experience is given by how much

play06:43

health they had so I believe this one

play06:45

had 44 HP so I will get 44 XP from it so

play06:49

each point is each point of health is

play06:52

experience level we can randomize that I

play06:55

did have it randomized before but it was

play06:57

giving me one xp for some fights and

play07:00

that was a bit ridiculous so I made it

play07:02

to have the same hour XP as the health

play07:06

which I feel is a bit better cuz most

play07:11

games are kinda like that and I should

play07:15

get a level from this so we will see the

play07:19

wait second then you levelled up your

play07:21

total head points have been increased we

play07:23

can we can definitely slow that down a

play07:25

bit and like this hasn't updated yet but

play07:29

will after I press Enter

play07:31

over time now I'm level to about 86 XP

play07:35

and level and my health also went back

play07:38

up to full with an extra 20 points

play07:41

actually that gave me 40 points oh well

play07:44

we've got a couple bugs to fix that's

play07:46

alright it's

play07:48

always fun to fix find fine bugs while

play07:50

playing and then fix it so I just want

play07:53

to quickly show you that I do eight

play07:56

damage now instead of what I was doing

play07:58

so I've been multiplied up by yeah you

play08:04

you get the point each level you go up

play08:06

you get more you get more damage that

play08:10

was a fairly weak monster I go around 24

play08:12

XP I haven't put I haven't put a quit on

play08:16

the actual screen that's alright we can

play08:20

always do that later quits are easy to

play08:22

implement so here's the code I didn't

play08:27

want to this programs really suited for

play08:31

beginners more than anything so I didn't

play08:33

really want to build it for build it

play08:36

extreme we're flying multiple cpp

play08:39

folders in multiple header folders so I

play08:42

just put it all in the one folder of all

play08:45

my you know I have all my functions and

play08:48

I have my there my global variables then

play08:51

this is the start my main function then

play08:54

we got a hard a combat HUD the actual

play08:57

combat system and then creating a

play09:02

monster function our void function and

play09:06

our story but overall we'll definitely

play09:11

get into this next next video we'll

play09:15

start with the basics or teaches you

play09:19

know STD count just just similar things

play09:22

while we actually build this program so

play09:24

hopefully you stick around I'll be

play09:27

posting hopefully sometime in a couple

play09:29

of next days in the next couple of days

play09:31

all right

Rate This

5.0 / 5 (0 votes)

関連タグ
C++RPG GameConsole GameTutorialGame DevelopmentCodingCharacter LevelCombat SystemHealth PointsExperience Points
英語で要約が必要ですか?