Share your repls and programming experiences

← Back to all posts
Dragon Eye RPG
PixelBitez (179)

This is an RPG made for the AI competition. The game is intelligent by generating a story and determining enemy moves.


Dragon Eye is a terminal based RPG. It may not be a AAA game, but it does have one special thing about it. Since there is no story, the game is generated by an AI based on decisions you have made.


You can fight a variety of enemy's in the game. Before combat the game generates your enemy to be close to your level and damage, that way every fight is fair, and a decent challenge.

class Enemy{
  public int Level;
  public int Health;
  public string Race;
  public int Damage;
  public int Defense;


Items are essential to playing Dragon Eye, without them you would most likely be on a death loop.

class Item{
  public string ItemType;
  public string ItemName;
  public int ItemLevel;
  public int Damage;
  public int Value;


The gameplay is based on strategically making decisions. You always have 3 options in combat, attack, defend, and use item. Using an item will heal you with an item, defend will use your defense to counter the enemies next attack, and attacking will use your attack and subtract that from the enemies health.

class Player{
  public string Name;
  public int Level;
  public int Health;
  public string Race;
  public int Damage;
  public int GP;
  public int Defense;
  public int xp;
  public List<Item> Inventory = new List<Item>();
VicGaming (2)

Why can you heal with a sword?

bonnym512 (105)

This game isn't fun. the first enemy you versus is too strong and you can't kill it in time. also, I couldn't access any weapons when I tried to attack.




Very broken, i almost can't understand what it's telling me...

spiderchi4 (11)

Cool Game i see you put a lot of thought into it, Gives me motivation to make my own RPG games

spiderchi4 (11)

recommend adding emoticons like this (' . ') to make it more funny and cool to look at than just text you have to read

Squrril (3)

nope healed 6 with a Knife

programmyBoi (17)

I'm so stupid and can't figure out how to use an item because the directions are unclear as to how that is done. Please help me.

PixelBitez (179)

@programmyBoi ya gotta type 3 then type in the name of the item as its written

programmyBoi (17)

@PixelBitez It still doesn't work, Then I looked at another comment that you gave to someone and I figured out that I had to do 1 then Stick

katyadee (1301)

Are you submitting this to the Game Jam?

PixelBitez (179)

@KatyaDelaney im actually working on a separate game that renders visuals in a terminal / console based on highlighting the text, i don't want to ruin the surprise of what its going to be about though

ElliottWells912 (0)

needs a tutorial
but overall fun to waste time in a comp science lesson

CPPStudent7308 (8)

I'm making a similar game with c++. Instead of typing out the name of the item, I made it so that I enter the number of the place holder in the inventory. For example, instead of typing "Stick", I enter '1'. If you want to know how, you can simply make an array for your inventory variable and use conditional statements that accept numbers as input.

JuniorRodrigue1 (0)

Initially we do not know what we have in the inventory. It appears only after the first turn. What do I attack with? What item do I use? I don't know.

Suparn (2)

you can just spam defense when ur low and you can get back to max health lol

16040 (1)

Hi but i think its broken :/ it started to make decisions without my input?

PixelBitez (179)

@16040 naw its programmed to answer that automatically cuz it doesnt reward you for it, its supposed to be a "story element"

15edaniels (1)

You should try to add more things to do other that killing thins and giving away money kind of like having ways so spend money or a way of choosing your stats increase or having relationships with characters that can develop

avibeskrowni (71)

I got a
<somtin special ;)>
easter egg?

TuanNguyen8 (0)

"Stick" should be the same with "stick" tho
but the AI said that its invalid when i inputed "stick"

KrisperNolve (0)

There seems to be a logic fail in there - when the enemy has 0 HP left after the player's attack, the player gets attacked twice:

Tom's Health: 45
Elf's Health: 8
Attack with what?
Tom attacked enemy Elf with a Axe, the Elf lost 23 health.


[Damage: 10][Defense: 13][Health: 45/100]
Elf attacks, Tom loses 11 health.
Elf attacks, Tom loses 11 health.
Tom won the fight!
Rewards: 129 xp, 1 Gold Peices.

Also there's a typo in "Pieces"

nathanburgess (3)

the game is generated by an AI based on decisions you have made

No it's not.

Seriously, am I missing something here? There's no AI at all, there's no tracking of user decisions. It just randomly does something each turn of the game...

PixelBitez (179)

@nathanburgess owchie, it may not be the best "ai" in the competition but reading over the competition page, it follows all rules. it shows some form of intelligence, enemies defend themselves when needed, characters can ask you for money, etc.. so it may not be sophisticated but its within the rules. i am working on a new version of this game with complete ai for enemies and a story driven by decisions, so if you want to see that instead of this.

Nanowrimoijk (63)
A level 3 Dwaf started a fight.

did anybody else catch this?

KasCode_Inc (2)

Very cool!

Unrelated question: How do you generate random numbers?

PixelBitez (179)

@KasCode_Inc u gotta type:

Random rnd = new Random();
int randomNumber = rnd.Next(min, max);

max being the maximum number and min being the minimum

PixelBitez (179)

@LOLLOL3 dang u broke, pay me your debt in gold

mkhoi (300)

When monsters are low on health they can regenerate some health back every turn?

PixelBitez (179)

@mkhoi yeh they do sometimes

PixelBitez (179)

ayyy we did it homies, i might make a complete story driven version of this

LukeGordon2 (4)

FYI - someone has taken this game and posted it saying it is theirs
i ma absolutley DISGUSTED

PixelBitez (179)

@LukeGordon2 dang that person needs to be creative instead of stealing work

AmarMalhi (1)

Vote for Ultimate AI it is the best

PixelBitez (179)

@AmarMalhi your a little late my guy the comp ended yesterday