Skip to content
← Back to Community
Java RPG
Profile icon
DrakeMayes

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

Voters
Profile icon
FABIOPOJO
Profile icon
meowser
Profile icon
ArashWalizada
Profile icon
MesamJafri
Profile icon
SelenaYang1
Profile icon
NishantAggarwal
Profile icon
miguelramirezTX
Profile icon
nN34398Ff
Profile icon
Coder100
Profile icon
DorshReal
Comments
hotnewtop
Profile icon
JordanDixon1

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

Profile icon
MatthewDoan1

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

Profile icon
JordanDixon1

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

Profile icon
MatthewDoan1

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

Profile icon
CannoliCoder

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.

Profile icon
DrakeMayes

@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.

Profile icon
nN34398Ff

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

Profile icon
LOLInteresting

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

Profile icon
AdLiang1

cool game!

Profile icon
eidhernan

Instead of doing this:

if(choice == 1) do_something() else if(choice == 2) do_something_else()

you can use a switch/case

switch(choice) { case 1: do_something(); break; case 2: do_something_else(); break;
Profile icon
DrakeMayes

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

Profile icon
MaxwellZhang1

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

Profile icon
Bob11
Profile icon
NolanYee

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

Profile icon
Navinor

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

Profile icon
DrakeMayes

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

Profile icon
MaxwellZhang1

ok thanks

Profile icon
a5rocks

Cheap boats, only 5k gold ;D

Profile icon
DrakeMayes

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

Profile icon
ShadedFlame
Profile icon
ShadedFlame

@DrakeMayes How do you talk to the king?

Profile icon
DrakeMayes

@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

Profile icon
[deleted]

Cool

Profile icon
king2010

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

Profile icon
nN34398Ff

Amazing!! And you did it in Java!

Profile icon
DrizztVerevkin

@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.

Profile icon
LOLInteresting

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

Profile icon
ShadedFlame

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

Profile icon
LOLInteresting

@ShadedFlame FaCePaLm