So I've learned how to do various commands such as if then statements and Javax.swing (the java text boxes) and I honestly don't know were to progress to after this point. Am I good enough to start developing with something like J-frame, or is there other things I should learn before moving onto something like that. (also note im planning to stick with just 2D).
Can't attach my most recent file to the thread (keeps saying its a invalid file) so the code is here (its just a simple RPG fight with some basic attack commands
A = attack
H = heal
M = magic)
Code
import javax.swing.JOptionPane; public class Battlebackup { public static void main(String[]args) { JOptionPane myIO = new JOptionPane (); myIO.showMessageDialog(null,"a slimey boi starts to sneak up on you"); int turn = 0; int PHP = 10; int EHP = 5; int MP = 3; int none = 0; while (turn < 100) { String inputText = myIO.showInputDialog("What do you do?" + " HP:" + PHP + " MP:" + MP ); if (inputText.equals("a")){ myIO.showMessageDialog(null,"you do a friggin shank boi, inflicting one damage to the slime"); EHP -= 1; none += 1; }else { } if (MP > 0) { if (inputText.equals("m")){ myIO.showMessageDialog(null,"you throw your book of harry potter spells, dealing 3 dmg "); EHP -= 3; MP -= 1; none += 1; }else { } }else { } if (MP > 0) { if (inputText.equals("h")){ myIO.showMessageDialog(null,"you eat your book of harry potter spells, gaining 8hp"); PHP += 8; MP -= 1; none += 1; }else { } }else { } if (none > 0) { none -= 1; }else { myIO.showMessageDialog(null,"you do nothin, great"); } myIO.showMessageDialog(null,"Slimy boi takes out a slimy gun and shoots you, dealing 3 damage"); PHP -= 3; if (EHP > 0) { }else { myIO.showMessageDialog(null,"you defeat the slime and get 69gold xd"); turn =+ 1000; } if (PHP > 0) { }else { myIO.showMessageDialog(null,"you died"); turn =+ 1000; } } } }