From 383cd4f2137421f26fd95883ae89d7e9f894b9d9 Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Thu, 24 Jun 2021 13:16:28 +0200 Subject: [PATCH 1/3] Corrected stand B Values and hitboxes --- src/gameplay/Characters/Blue/BlueNormals.java | 72 ++++++++++++++++--- 1 file changed, 61 insertions(+), 11 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 96083e1..bdd73d0 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -1242,13 +1242,13 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } - private static Frame StandBFrame1() { + protected static Frame StandBFrame1() { //movement data double moveX = 3.0; double moveY = 0.0; //cancelData - boolean normalC = true; + boolean normalC = false; boolean specialC = false; boolean jumpC = false; boolean moveC = false; @@ -1260,8 +1260,24 @@ public class BlueNormals { ArrayList phb = new ArrayList(); ArrayList pthb = new ArrayList(); - //generate hitboxes here and then use ArrayList add method to add them to the correct list - Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f); + Passive_HitBox phb3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f); + Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + phb.add(phb2); + phb.add(phb3); + phb.add(phb4); + pthb.add(pthb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1270,13 +1286,13 @@ public class BlueNormals { return f; } - private static Frame StandBFrame2() { + protected static Frame StandBFrame2() { //movement data double moveX = 0.0; double moveY = 0.0; //cancelData - boolean normalC = true; + boolean normalC = false; boolean specialC = false; boolean jumpC = false; boolean moveC = false; @@ -1289,7 +1305,25 @@ public class BlueNormals { ArrayList pthb = new ArrayList(); //generate hitboxes here and then use ArrayList add method to add them to the correct list - Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(130*1.25f,-200*1.25f,150*1.25f,150*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(150*1.25f,-300*1.25f,100*1.25f,150*1.25f); + Passive_HitBox phb3 = new Passive_HitBox(160*1.25f,-400*1.25f,150*1.25f,150*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(220*1.25f,-150*1.25f,50*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(120*1.25f,-500*1.25f,220*1.25f,70*1.25f); + Push_HitBox bStandPB1 = new Push_HitBox(160*1.25f,-150*1.25f,160*1.25f,400*1.25f); + Active_HitBox ahb1= new Active_HitBox(350,-350,150,220); + /* + adding hitboxes to lists + */ + phb.add(phb1); + phb.add(phb2); + phb.add(phb3); + phb.add(phb4); + pthb.add(pthb1); + ahb.add(ahb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1298,13 +1332,13 @@ public class BlueNormals { return f; } - private static Frame StandBFrame3() { + protected static Frame StandBFrame3() { //movement data double moveX = 0.0; double moveY = 0.0; //cancelData - boolean normalC = true; + boolean normalC = false; boolean specialC = false; boolean jumpC = false; boolean moveC = false; @@ -1316,8 +1350,24 @@ public class BlueNormals { ArrayList phb = new ArrayList(); ArrayList pthb = new ArrayList(); - //generate hitboxes here and then use ArrayList add method to add them to the correct list - Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f); + Passive_HitBox phb3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f); + Push_HitBox bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + phb.add(phb2); + phb.add(phb3); + phb.add(phb4); + pthb.add(pthb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); From 46cff73d47bf16587a7dae19b7c83378305661b9 Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Thu, 24 Jun 2021 13:51:39 +0200 Subject: [PATCH 2/3] Corrected sprites and added hitboxes for blue light DP --- .../Characters/Blue/BlueSpecials.java | 317 ++++++++---------- 1 file changed, 145 insertions(+), 172 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueSpecials.java b/src/gameplay/Characters/Blue/BlueSpecials.java index 73f6937..d065f35 100644 --- a/src/gameplay/Characters/Blue/BlueSpecials.java +++ b/src/gameplay/Characters/Blue/BlueSpecials.java @@ -16,7 +16,51 @@ import java.util.ArrayList; import static gameplay.input.ButtonIG.*; public class BlueSpecials { - private static Frame lDPFrame1(){ + protected static Frame lDPFrame1(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(0,138*5,138,138); + return f; + } + protected static Frame lDPFrame2(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(138*7,138*2,138,138); + return f; + } + protected static Frame lDPFrame3(){ /* Hitboxes lists creation @@ -29,9 +73,101 @@ public class BlueSpecials { /* Individual hitboxes creation */ - Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); - Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); - Push_HitBox pushB = new Push_HitBox(70,70,150,500); + Push_HitBox pushB = new Push_HitBox(250,-70,150,500); + Active_HitBox ahb1 = new Active_HitBox(350,-0,150,500); + + ahb.add(ahb1); + + /* + frame creation + */ + Frame f = new Frame(25.0,12.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(138*2,138*5,138,138); + return f; + } + + protected static Frame lDPFrame4(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Push_HitBox pushB = new Push_HitBox(250,-70,150,500); + Active_HitBox ahb1 = new Active_HitBox(350,-0,150,500); + Passive_HitBox phb1 = new Passive_HitBox(250,-70,150,500); + ahb.add(ahb1); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + + /* + frame creation + */ + Frame f = new Frame(25.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(138*2,138*5,138,138); + return f; + } + + protected static Frame lDPFrame5(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Push_HitBox pushB = new Push_HitBox(250,-70,150,500); + Passive_HitBox phb1 = new Passive_HitBox(250,-70,250,550); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + + /* + frame creation + */ + Frame f = new Frame(-25.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(138*3,138*5,138,138); + return f; + } + + protected static Frame lDPFrame6(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(270,-70,200,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(270,-600,250,100); + Push_HitBox pushB = new Push_HitBox(270,-70,150,550); /* adding hitboxes to lists @@ -45,182 +181,19 @@ public class BlueSpecials { Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, //cancels (in order : normal, special, jump, move, dash) false,false,false,false,false); - f.setSpriteWrap(102,0,102,120); - return f; - } - private static Frame lDPFrame2(){ - - /* - Hitboxes lists creation - */ - ArrayList phb = new ArrayList(); - ArrayList pthb = new ArrayList(); - ArrayList ahb = new ArrayList(); - ArrayList athb = new ArrayList(); - - /* - Individual hitboxes creation - */ - Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); - Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); - Push_HitBox pushB = new Push_HitBox(70,70,150,500); - - /* - adding hitboxes to lists - */ - phb.add(phb1); - pthb.add(pthb1); - - /* - frame creation - */ - Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, - //cancels (in order : normal, special, jump, move, dash) - false,false,false,false,false); - f.setSpriteWrap(306,0,102,120); - return f; - } - private static Frame lDPFrame3(){ - - /* - Hitboxes lists creation - */ - ArrayList phb = new ArrayList(); - ArrayList pthb = new ArrayList(); - ArrayList ahb = new ArrayList(); - ArrayList athb = new ArrayList(); - - /* - Individual hitboxes creation - */ - Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); - Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); - Push_HitBox pushB = new Push_HitBox(70,70,150,500); - - /* - adding hitboxes to lists - */ - phb.add(phb1); - pthb.add(pthb1); - - /* - frame creation - */ - Frame f = new Frame(8.0,5.0,phb,ahb,pthb,athb,pushB, - //cancels (in order : normal, special, jump, move, dash) - false,false,false,false,false); - f.setSpriteWrap(714,0,102,120); + f.setSpriteWrap(138*4,138*5,138,138); return f; } - private static Frame lDPFrame4(){ - - /* - Hitboxes lists creation - */ - ArrayList phb = new ArrayList(); - ArrayList pthb = new ArrayList(); - ArrayList ahb = new ArrayList(); - ArrayList athb = new ArrayList(); - - /* - Individual hitboxes creation - */ - Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); - Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); - Push_HitBox pushB = new Push_HitBox(70,70,150,500); - - /* - adding hitboxes to lists - */ - phb.add(phb1); - pthb.add(pthb1); - - /* - frame creation - */ - Frame f = new Frame(8.0,0.0,phb,ahb,pthb,athb,pushB, - //cancels (in order : normal, special, jump, move, dash) - false,false,false,false,false); - f.setSpriteWrap(714,0,102,120); - return f; - } - - private static Frame lDPFrame5(){ - - /* - Hitboxes lists creation - */ - ArrayList phb = new ArrayList(); - ArrayList pthb = new ArrayList(); - ArrayList ahb = new ArrayList(); - ArrayList athb = new ArrayList(); - - /* - Individual hitboxes creation - */ - Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); - Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); - Push_HitBox pushB = new Push_HitBox(70,70,150,500); - - /* - adding hitboxes to lists - */ - phb.add(phb1); - pthb.add(pthb1); - - /* - frame creation - */ - Frame f = new Frame(-8.0,0.0,phb,ahb,pthb,athb,pushB, - //cancels (in order : normal, special, jump, move, dash) - false,false,false,false,false); - f.setSpriteWrap(714,0,102,120); - return f; - } - - private static Frame lDPFrame6(){ - - /* - Hitboxes lists creation - */ - ArrayList phb = new ArrayList(); - ArrayList pthb = new ArrayList(); - ArrayList ahb = new ArrayList(); - ArrayList athb = new ArrayList(); - - /* - Individual hitboxes creation - */ - Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); - Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); - Push_HitBox pushB = new Push_HitBox(70,70,150,500); - - /* - adding hitboxes to lists - */ - phb.add(phb1); - pthb.add(pthb1); - - /* - frame creation - */ - Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, - //cancels (in order : normal, special, jump, move, dash) - false,false,false,false,false); - f.setSpriteWrap(112,0,102,120); - return f; - } - - private static attackPart lDPStartup() { + protected static attackPart lDPStartup() { Frame[] f = new Frame[3]; f[0] = lDPFrame1(); f[1] = lDPFrame2(); - f[2] = lDPFrame3(); + f[2] = lDPFrame2(); return(new attackPart(f)); } - private static attackPart lDPRecovery() { + protected static attackPart lDPRecovery() { Frame[] f = new Frame[29]; for(int i = 0; i < 11; i++) { f[i] = lDPFrame5(); @@ -231,7 +204,7 @@ public class BlueSpecials { return(new attackPart(f)); } - private static attackPart lDPActive() { + protected static attackPart lDPActive() { Frame[] f = new Frame[11]; for(int i = 0; i < 5; i++) { f[i] = lDPFrame3(); From 6476cb6249a395013d27bc2f4c78a60dd6745026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Thu, 24 Jun 2021 14:51:06 +0200 Subject: [PATCH 3/3] Fixed launcher behaving unexpectedly if game.set was malformed --- src/launcher/Launcher.java | 8 ++++---- src/launcher/Settings.java | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/launcher/Launcher.java b/src/launcher/Launcher.java index a7b2dea..c03236b 100644 --- a/src/launcher/Launcher.java +++ b/src/launcher/Launcher.java @@ -134,10 +134,10 @@ public class Launcher extends Application { b1.setItems(availablechar); b2.setItems(availablechar); // Setting default ChoiceBoxes values to the ones already in the config file - if(setter.getChar1().equals("blue")) { + if(setter.getChar1().equals("blue") || setter.getChar1().equals("default")) { b1.setValue("Blue"); } - if(setter.getChar2().equals("blue")) { + if(setter.getChar2().equals("blue") || setter.getChar2().equals("default")) { b2.setValue("Blue"); } @@ -168,9 +168,9 @@ public class Launcher extends Application { setter.setSettings(); match.main(null); } catch (Exception e) { - e.printStackTrace(); - System.exit(1); + System.out.println("Fill all boxes to launch the game"); } + } /** diff --git a/src/launcher/Settings.java b/src/launcher/Settings.java index b4d80ee..6a3e12e 100644 --- a/src/launcher/Settings.java +++ b/src/launcher/Settings.java @@ -94,7 +94,6 @@ public class Settings { e.printStackTrace(); System.exit(1); } catch (ParseException e) { - System.out.println("Invalid config file"); rounds = 3; p1 = "default"; p2 = "default";