Share your repls and programming experiences

← Back to all posts
Java RPG
DrakeMayes (39)

A relatively simple RPG programmed in Java. Fight monsters and bosses, explore different cities, and empower yourself with items at the shop.

JordanDixon1 (185)

I would suggest learning java swing so you can actually add a gui to the game. Other than that its great.

MatthewDoan1 (333)

@JordanDixon1 Java swing is mostly outdated now, people use JavaFX

JordanDixon1 (185)

@MatthewDoan1 Yeah, but I don't think its on or supported by yet, is it?

MatthewDoan1 (333)

@JordanDixon1 No, sadly, and OpenJDK doesn't have support for JavaFX. Oh well...

CannoliCoder (4)

Nice Game. I would suggest that you add an input filter so the program doesn't crash if the user accidentally enters a String instead of an Int.

DrakeMayes (39)

@CannoliCoder Thanks, and you're right I need to do that. I was also considering just modifying it so the scanner always takes in String instead of int.

nN34398Ff (109)

You can go to mechanics, go to character, and rig the game. =)
(Although it's not really fun that way.)

LOLInteresting (12)

@nN34398Ff But it's fun to create a "hacked" version by yourself and add stuff to it....

eidhernan (36)

Instead of doing this:

you can use a switch/case

DrakeMayes (39)

@eidhernan I've been using switch/case in my newer projects, thanks for the suggestions though

MaxwellZhang1 (1)

How do you move? the wasd keys don't work for me

NolanYee (7)

@MaxwellZhang1 For some reason, you have to use capital letters

Warhawk947 (534)

@MaxwellZhang1 you have to type "wasd", then press enter.

DrakeMayes (39)

@MaxwellZhang1 You have to type in w, a, s, or d then press enter for each move

a5rocks (812)

Cheap boats, only 5k gold ;D

DrakeMayes (39)

@a5rocks You gotta slay the dragon then talk to the king, he gives you 5000 gold

ShadedFlame (29)

@DrakeMayes How do you talk to the king?

DrakeMayes (39)

@ShadedFlame Go to Fazoria (the place north of the place you start in) then go to the palace, it gives you an option to talk to him



king2010 (1)

how do you leave to another place
once you reach the map

nN34398Ff (109)

Amazing!! And you did it in Java!

DrizztVerevkin (0)

@DrakeMayes can you make in were when you beat the game it restarts with your gear and the creatures get harder and receive more gold, and make the game save in the file.

LOLInteresting (12)

@DrizztVerevkin That would be too difficult as that function requires him to write the entire program almost again.

ShadedFlame (29)

Haha, worked hard, got good, and tried swimming. Facepalm