From a0a5b015f1cbe0c2287643447b4e12844877c4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Wed, 23 Jun 2021 18:38:14 +0200 Subject: [PATCH 01/13] little text when a player win a round + at the begining of the second round players are in the right places --- src/gameplay/match/match.java | 36 ++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index ff0275a..6e6a1fa 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -81,9 +81,10 @@ public class match { private static UIElementText timerUI; private static UIElementText fpsCounter; private static UIInputList inputListP1; + private static UIElementText roundWon; // Debug - public static boolean showP1Hitbox = false; + public static boolean showP1Hitbox = false; // TODO modifier pour le rendre activable public static boolean showP2Hitbox = false; private static List listHitboxObj = new ArrayList<>(); private static float slowFactor = 1f; @@ -128,14 +129,43 @@ public class match { * Ends the round. * Used for playing animations and such. * TODO : Implement this once we know what to do. + * @throws InterruptedException */ - private static void endRound() { + private static void endRound() throws InterruptedException { if(roundP1) { + //texte de victoire System.out.println("P1 won the round"); + roundWon = new UIElementText("Player1 won the round", 5f, 0.25f, 0.5f, 100f, engine); + roundWon.setBackground(new Vector3f(0f,0f,0f)); + engine.add_uiElement(roundWon); + engine.update(); + engine.render(); + Thread.sleep(1000); + engine.remove_uiElement(roundWon); + + //replacement des sprites + objP1.translate(new Vector3f(-p1.getPosX(), -p1.getPosY())); + objP2.translate(new Vector3f(-p2.getPosX(), -p2.getPosY())); + objP1.getShadow().translate(new Vector3f(0f,-p1.getPosY(),0)); + objP2.getShadow().translate(new Vector3f(0f,-p2.getPosY(),0)); } else { + //texte de victoire System.out.println("P2 won the round"); + roundWon = new UIElementText("Player2 won the round", 5f, 0.25f, 0.5f, 100f, engine); + roundWon.setBackground(new Vector3f(0f,0f,0f)); + engine.add_uiElement(roundWon); + engine.update(); + engine.render(); + Thread.sleep(1000); + engine.remove_uiElement(roundWon); + + //replacement des sprites + objP1.translate(new Vector3f(-p1.getPosX(), -p1.getPosY())); + objP2.translate(new Vector3f(-p2.getPosX(), -p2.getPosY())); + objP1.getShadow().translate(new Vector3f(0f,-p1.getPosY(),0)); + objP2.getShadow().translate(new Vector3f(0f,-p2.getPosY(),0)); } } @@ -298,7 +328,7 @@ public class match { } - private static void ac(int i) { + private static void ac(int i) throws InterruptedException { // System.out.println(i); switch (i) { From 23bc9aabcdacbb8fd4b65d322cfe48eb729fa12a Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 23 Jun 2021 19:35:18 +0200 Subject: [PATCH 02/13] Fix of jump arcs hopefully --- src/gameplay/Characters/Blue/BlueBaseFrames.java | 2 +- src/gameplay/frames/Frame.java | 15 +++++---------- src/gameplay/frames/nextFrameBuffer.java | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index 849f43e..9b215e7 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -1022,7 +1022,7 @@ public class BlueBaseFrames { String path = "textures/Sprite_sans_grille_9comp.png"; String pathToBG = "textures/arena1.png"; - Frame f = BlueNormals.ForwardDFrame0(); + Frame f = BlueNormals.crouchCFrame2(); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); diff --git a/src/gameplay/frames/Frame.java b/src/gameplay/frames/Frame.java index 2d0421b..f9086a9 100644 --- a/src/gameplay/frames/Frame.java +++ b/src/gameplay/frames/Frame.java @@ -232,15 +232,10 @@ public class Frame { * @param f the frame to clone */ public void cloneWithoutMovement(Frame f) { - this.cloneArray(f); //Il faut cloner individuellement chaque hitbox des differentes listes pour ne pas garder les pointeurs - Push_HitBox phb = f.getPushHitBox(); - this.setPushHitBox(new Push_HitBox(phb.getPosX(), phb.getPosY(), phb.getSize_x(), phb.getSize_y())); - this.normalCancellable = f.isNormalCancellable(); - this.specialCancellable = f.isSpecialCancellable(); - this.jumpCancellable = f.jumpCancellable; - this.moveCancellable = f.isMoveCancellable(); - this.isDashCancellable = f.isDashCancellable; - this.lastFrameOfHit = f.islastFrameOfHit(); - this.setSpriteWrap(f.sprite[0], f.sprite[1], f.sprite[2], f.sprite[3]); + double moveX = this.move_x; + double moveY = this.move_y; + this.clone(f); + this.setMove_x(moveX); + this.setMove_y(moveY); } } diff --git a/src/gameplay/frames/nextFrameBuffer.java b/src/gameplay/frames/nextFrameBuffer.java index c87919f..1bd2247 100644 --- a/src/gameplay/frames/nextFrameBuffer.java +++ b/src/gameplay/frames/nextFrameBuffer.java @@ -88,14 +88,14 @@ public class nextFrameBuffer { nextFrameBuffer fb = new nextFrameBuffer(); fb.clone(this); this.emptyQueue(); - try{fb.goToNext();} catch(IndexOutOfBoundsException e) {goOn = false;} + try{fb.goToNext();} catch(NullPointerException e) {goOn = false;} while(goOn && i < f.size()) { try{ fb.current.cloneWithoutMovement(f.get(i)); this.addFrameToQueue(fb.current); fb.goToNext(); i++; - } catch(IndexOutOfBoundsException e) { goOn = false;} + } catch(NullPointerException e) { goOn = false;} } } From 0f430e5980d1cf903f60561c52f15d62758559f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Wed, 23 Jun 2021 20:22:22 +0200 Subject: [PATCH 03/13] endRound finished --- src/gameplay/match/match.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 6e6a1fa..e6ce01c 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -138,12 +138,13 @@ public class match { System.out.println("P1 won the round"); roundWon = new UIElementText("Player1 won the round", 5f, 0.25f, 0.5f, 100f, engine); roundWon.setBackground(new Vector3f(0f,0f,0f)); + roundWon.setShader("shaders/StylishShaders/WavyTextVert.glsl", "shaders/StylishShaders/TextFrag.glsl", true, true); engine.add_uiElement(roundWon); engine.update(); engine.render(); Thread.sleep(1000); engine.remove_uiElement(roundWon); - + //replacement des sprites objP1.translate(new Vector3f(-p1.getPosX(), -p1.getPosY())); objP2.translate(new Vector3f(-p2.getPosX(), -p2.getPosY())); @@ -155,6 +156,7 @@ public class match { System.out.println("P2 won the round"); roundWon = new UIElementText("Player2 won the round", 5f, 0.25f, 0.5f, 100f, engine); roundWon.setBackground(new Vector3f(0f,0f,0f)); + roundWon.setShader("shaders/StylishShaders/WavyTextVert.glsl", "shaders/StylishShaders/TextFrag.glsl", true, true); engine.add_uiElement(roundWon); engine.update(); engine.render(); From 3170c713bd5b210ce98e509f7f4b83faec52b562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Wed, 23 Jun 2021 20:30:14 +0200 Subject: [PATCH 04/13] endRound finished --- src/gameplay/match/match.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index c83e527..4759f75 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -135,7 +135,7 @@ public class match { private static void endRound() throws InterruptedException { if(roundP1) { - //texte de victoire + //texte de victoire System.out.println("P1 won the round"); roundWon = new UIElementText("Player1 won the round", 5f, 0.25f, 0.5f, 100f, engine); roundWon.setBackground(new Vector3f(0f,0f,0f)); From 56fca86614fd5eb53fd79bf373f393154d6c7eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Wed, 23 Jun 2021 20:44:13 +0200 Subject: [PATCH 05/13] connection test --- src/gameplay/match/match.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 4759f75..a64dcfb 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -135,7 +135,7 @@ public class match { private static void endRound() throws InterruptedException { if(roundP1) { - //texte de victoire + //texte de victoire System.out.println("P1 won the round"); roundWon = new UIElementText("Player1 won the round", 5f, 0.25f, 0.5f, 100f, engine); roundWon.setBackground(new Vector3f(0f,0f,0f)); From f1eb93c6477a7a65bfadb3ee7e3871af96e2c148 Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 23 Jun 2021 20:05:39 +0200 Subject: [PATCH 06/13] changed nextframebuffer.clone() so it hopefully won't crash --- src/gameplay/frames/nextFrameBuffer.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/gameplay/frames/nextFrameBuffer.java b/src/gameplay/frames/nextFrameBuffer.java index 1bd2247..6d6cb3f 100644 --- a/src/gameplay/frames/nextFrameBuffer.java +++ b/src/gameplay/frames/nextFrameBuffer.java @@ -24,8 +24,21 @@ public class nextFrameBuffer { } public void clone(nextFrameBuffer f) { - this.current = f.current; - this.next = f.next; + + try{ + Frame cf = new Frame(); + cf.clone(f.current); + this.current = cf; } + catch (NullPointerException n) { + this.current = null; + this.next = null; + } + nextFrameBuffer nfb = new nextFrameBuffer(); + try { + nfb.clone(f.next); + } catch (NullPointerException n) {} + this.next = nfb; + } public void setNext(nextFrameBuffer f) { From ae41d2131b7e419bde777a10933bcb0f31eda050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Wed, 23 Jun 2021 20:47:37 +0200 Subject: [PATCH 07/13] shader removed on the endRound message --- src/gameplay/match/match.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index a64dcfb..12c9c61 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -139,7 +139,6 @@ public class match { System.out.println("P1 won the round"); roundWon = new UIElementText("Player1 won the round", 5f, 0.25f, 0.5f, 100f, engine); roundWon.setBackground(new Vector3f(0f,0f,0f)); - roundWon.setShader("shaders/StylishShaders/WavyTextVert.glsl", "shaders/StylishShaders/TextFrag.glsl", true, true); engine.add_uiElement(roundWon); engine.update(); engine.render(); @@ -157,7 +156,6 @@ public class match { System.out.println("P2 won the round"); roundWon = new UIElementText("Player2 won the round", 5f, 0.25f, 0.5f, 100f, engine); roundWon.setBackground(new Vector3f(0f,0f,0f)); - roundWon.setShader("shaders/StylishShaders/WavyTextVert.glsl", "shaders/StylishShaders/TextFrag.glsl", true, true); engine.add_uiElement(roundWon); engine.update(); engine.render(); From 35bc639712f701b89dba700e39ac38b61ca0e267 Mon Sep 17 00:00:00 2001 From: Antoine Date: Wed, 23 Jun 2021 21:26:14 +0200 Subject: [PATCH 08/13] Correction shader, detection des float --- .../HorizontalProgressBarGradientSquareFrag.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shaders/StylishShaders/HorizontalProgressBarGradientSquareFrag.glsl b/shaders/StylishShaders/HorizontalProgressBarGradientSquareFrag.glsl index edad87e..8560e3c 100644 --- a/shaders/StylishShaders/HorizontalProgressBarGradientSquareFrag.glsl +++ b/shaders/StylishShaders/HorizontalProgressBarGradientSquareFrag.glsl @@ -15,7 +15,7 @@ void main() vec4 colorTemp = color; float ouverture = 0.8f; // Effet "tube" - float lum = -pow(fragCoord.y + height/2f, 2f) * 5f /height + ouverture; + float lum = -pow(fragCoord.y + height/2.0f, 2.0f) * 5.0f /height + ouverture; colorTemp.xyz *= lum; // Effet flash sur la surface @@ -27,14 +27,14 @@ void main() FragColor = colorTemp; } else { - FragColor = vec4(0f); + FragColor = vec4(0.0f); } } else { if (fill < fragCoord.x){ FragColor = colorTemp; } else { - FragColor = vec4(0f); + FragColor = vec4(0.0f); } } From 9c07f8c60a5a02b432ef371f06e533c1371fa0ae Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 23 Jun 2021 21:48:35 +0200 Subject: [PATCH 09/13] Corrected sprites and added hitboxes for blue stand C --- .../Characters/Blue/BlueBaseFrames.java | 2 +- src/gameplay/Characters/Blue/BlueNormals.java | 108 ++++++++++++++---- 2 files changed, 88 insertions(+), 22 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index 9b215e7..0dbd49b 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -1022,7 +1022,7 @@ public class BlueBaseFrames { String path = "textures/Sprite_sans_grille_9comp.png"; String pathToBG = "textures/arena1.png"; - Frame f = BlueNormals.crouchCFrame2(); + Frame f = BlueNormals.StandCFrame4(); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index d24b376..2166ca7 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -342,7 +342,7 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } - private static Frame crouchBFrame1() { + protected static Frame crouchBFrame1() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -370,7 +370,7 @@ public class BlueNormals { return f; } - private static Frame crouchBFrame2() { + protected static Frame crouchBFrame2() { //movement data double moveX = 8.0; double moveY = 0.0; @@ -398,7 +398,7 @@ public class BlueNormals { return f; } - private static Frame crouchBFrame3() { + protected static Frame crouchBFrame3() { //movement data double moveX = 8.0; double moveY = 0.0; @@ -743,7 +743,7 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } - private static Frame StandCFrame1() { + protected static Frame StandCFrame1() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -761,17 +761,33 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + /* + 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 pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f); - Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); + /* + 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,pushb,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet f.setSpriteWrap(0,0,138,138); return f; } - private static Frame StandCFrame2() { + protected static Frame StandCFrame2() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -788,18 +804,33 @@ public class BlueNormals { ArrayList athb = new ArrayList(); ArrayList phb = new ArrayList(); ArrayList pthb = new ArrayList(); + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-150*1.25f,200*1.25f,180*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,-350*1.25f,200*1.25f,200*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(250*1.25f,-120*1.25f,70*1.25f,80*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f); + Push_HitBox pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f); - //generate hitboxes here and then use ArrayList add method to add them to the correct list - Push_HitBox pB1 = new Push_HitBox(200,-150,160,400); + /* + 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,pB1,normalC,specialC,jumpC,moveC,dashC); + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pushb,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*3),(138*2),138,138); + f.setSpriteWrap((138*2),(138*3),138,138); return f; } - private static Frame StandCFrame3() { + protected static Frame StandCFrame3() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -817,17 +848,35 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-150*1.25f,200*1.25f,200*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,-350*1.25f,170*1.25f,200*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(250*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,250*1.25f,70*1.25f); + Push_HitBox pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f); + Active_HitBox ahb1 = new Active_HitBox(350,-220,250,130); + /* + 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,pB1,normalC,specialC,jumpC,moveC,dashC); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pushb,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap(138,(138*6),138,138); + f.setSpriteWrap(138*6,138,138,138); return f; } - private static Frame StandCFrame4() { + protected static Frame StandCFrame4() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -845,10 +894,27 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + /* + 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 pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f); - Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); + /* + 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,pushb,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet f.setSpriteWrap(138,(138*7),138,138); From 262fef9b6c2884c305531573a9dec75b90b513c1 Mon Sep 17 00:00:00 2001 From: Antoine Date: Wed, 23 Jun 2021 21:57:58 +0200 Subject: [PATCH 10/13] glfwGetGamepadName --- src/engine/input/GamepadInput.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/input/GamepadInput.java b/src/engine/input/GamepadInput.java index 77b3b25..47bbe9f 100644 --- a/src/engine/input/GamepadInput.java +++ b/src/engine/input/GamepadInput.java @@ -107,8 +107,8 @@ public class GamepadInput { return new Vector3f(x,y); } - public int getGamepadName(){ - return this.gamepadNum; + public String getGamepadName(){ + return glfwGetGamepadName(this.gamepadNum); } } From 6a3c6a6a2f1e05fdaa820cd832fc13d89e4e731e Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 23 Jun 2021 22:12:00 +0200 Subject: [PATCH 11/13] Corrected sprites and added hitboxes for blue forward D --- .../Characters/Blue/BlueBaseFrames.java | 2 +- src/gameplay/Characters/Blue/BlueNormals.java | 88 +++++++++++++++++-- 2 files changed, 81 insertions(+), 9 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index 0dbd49b..5a92eb8 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -1022,7 +1022,7 @@ public class BlueBaseFrames { String path = "textures/Sprite_sans_grille_9comp.png"; String pathToBG = "textures/arena1.png"; - Frame f = BlueNormals.StandCFrame4(); + Frame f = BlueNormals.ForwardDFrame5(); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 2166ca7..0399edc 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -1311,7 +1311,7 @@ public class BlueNormals { - private static Frame ForwardDFrame0() { + protected static Frame ForwardDFrame0() { //movement data double moveX = 3.0; double moveY = 0.0; @@ -1330,7 +1330,12 @@ 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); + Push_HitBox bStandPB1 = new Push_HitBox(200,-100,250,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(230, -100, 200, 550); + + pthb.add(pthb1); + phb.add(phb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1357,7 +1362,12 @@ 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); + Push_HitBox bStandPB1 = new Push_HitBox(200,-100,250,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(230, -100, 200, 550); + + pthb.add(pthb1); + phb.add(phb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1385,7 +1395,15 @@ 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); + Push_HitBox bStandPB1 = new Push_HitBox(200,-100,250,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(230, -100, 200, 550); + Passive_HitBox phb2 = new Passive_HitBox(400, -200, 200, 170); + + + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1413,7 +1431,14 @@ 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); + Push_HitBox bStandPB1 = new Push_HitBox(200,-100,180,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(200,-100,180,550); + Active_HitBox ahb1 = new Active_HitBox(300,-60,250,300); + + pthb.add(pthb1); + phb.add(phb1); + ahb.add(ahb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1441,7 +1466,49 @@ 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); + Push_HitBox bStandPB1 = new Push_HitBox(200,-100,180,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(200,-100,180,550); + Active_HitBox ahb1 = new Active_HitBox(300,-160,250,300); + + pthb.add(pthb1); + phb.add(phb1); + ahb.add(ahb1); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*12),138,138,138); + return f; + } + + protected static Frame ForwardDFrame6(){ + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + 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(200,-100,180,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(200,-100,180,550); + Passive_HitBox ahb1 = new Passive_HitBox(300,-160,250,300); + + pthb.add(pthb1); + phb.add(phb1); + phb.add(ahb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1469,7 +1536,12 @@ 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); + Push_HitBox bStandPB1 = new Push_HitBox(200,-100,250,550); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(200,-600,250,120); + Passive_HitBox phb1 = new Passive_HitBox(230, -100, 200, 550); + + pthb.add(pthb1); + phb.add(phb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); @@ -1495,7 +1567,7 @@ public class BlueNormals { protected static attackPart blueForwardDrecovery() { Frame[] f = new Frame[8]; for (int i = 0; i < 3; i++) { - f[i] = ForwardDFrame4(); + f[i] = ForwardDFrame6(); } for (int i = 3; i < f.length; i++) { f[i] = ForwardDFrame5(); From 0001f0d7df2eff9d91264e7c47d35b9657262edc Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 23 Jun 2021 22:20:59 +0200 Subject: [PATCH 12/13] Corrected sprites and addedhitboxes for blue crouch B --- .../Characters/Blue/BlueBaseFrames.java | 2 +- src/gameplay/Characters/Blue/BlueNormals.java | 33 +++++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index 5a92eb8..9fe1b72 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -1022,7 +1022,7 @@ public class BlueBaseFrames { String path = "textures/Sprite_sans_grille_9comp.png"; String pathToBG = "textures/arena1.png"; - Frame f = BlueNormals.ForwardDFrame5(); + Frame f = BlueNormals.crouchBFrame2(); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 0399edc..16f1964 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -361,12 +361,18 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + Push_HitBox pB1 = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*2),0,138,138); + f.setSpriteWrap(0,138*2,138,138); return f; } @@ -389,12 +395,19 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); - + Push_HitBox pB1 = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f); + Active_HitBox ahb1 = new Active_HitBox(400,-580,200,100); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); + ahb.add(ahb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*4),(138*14),138,138); + f.setSpriteWrap((138*14),(138*4),138,138); return f; } @@ -417,12 +430,18 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + Push_HitBox pB1 = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*2),0,138,138); + f.setSpriteWrap(0,138*2,138,138); return f; } From 1b669442c0bf7400fd71f72cc8945b2a2d34c772 Mon Sep 17 00:00:00 2001 From: no Date: Wed, 23 Jun 2021 22:37:48 +0200 Subject: [PATCH 13/13] Corrected sprites and addedhitboxes for blue cruch D --- .../Characters/Blue/BlueBaseFrames.java | 2 +- src/gameplay/Characters/Blue/BlueNormals.java | 54 ++++++++++++++----- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index 9fe1b72..9ad27b5 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -1022,7 +1022,7 @@ public class BlueBaseFrames { String path = "textures/Sprite_sans_grille_9comp.png"; String pathToBG = "textures/arena1.png"; - Frame f = BlueNormals.crouchBFrame2(); + Frame f = BlueNormals.crouchDFrame2(); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 16f1964..a93a719 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -479,7 +479,7 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } - private static Frame crouchDFrame1() { + protected static Frame crouchDFrame1() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -498,16 +498,22 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + Push_HitBox pB1 = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*7),(138*5),138,138); + f.setSpriteWrap((138*5),(138*7),138,138); return f; } - private static Frame crouchDFrame2() { + protected static Frame crouchDFrame2() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -526,16 +532,24 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + Push_HitBox pB1 = new Push_HitBox(120,-250*1.25f,250,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(100,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-550,300,100); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f); + Active_HitBox ahb1 = new Active_HitBox(300,-500,400,200); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); + ahb.add(ahb1); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*7),(138*6),138,138); + f.setSpriteWrap((138*6),(138*7),138,138); return f; } - private static Frame crouchDFrame3() { + protected static Frame crouchDFrame3() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -554,7 +568,13 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + Push_HitBox pB1 = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,300*1.25f,70*1.25f); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); @@ -563,7 +583,7 @@ public class BlueNormals { return f; } - private static Frame crouchDFrame4() { + protected static Frame crouchDFrame4() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -582,12 +602,22 @@ 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 pB1 = new Push_HitBox(200,-150,160,400); + Push_HitBox pB1 = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(100*1.25f,-250*1.25f,200*1.25f,300*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(260*1.25f,-200*1.25f,80*1.25f,50*1.25f); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(100*1.25f,-500*1.25f,300*1.25f,70*1.25f); + pB1.reverseHorizontally(); + phb1.reverseHorizontally(); + phb2.reverseHorizontally(); + pthb1.reverseHorizontally(); + pthb.add(pthb1); + phb.add(phb1); + phb.add(phb2); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet - f.setSpriteWrap((138*7),(138*8),138,138); + f.setSpriteWrap((138*8),(138*7),138,138); return f; } @@ -614,7 +644,7 @@ public class BlueNormals { private static attackPart blueCrouchDactive() { Frame[] f = new Frame[6]; for(int i = 0; i < f.length; i++) { - f[i] = crouchAFrame2(); + f[i] = crouchDFrame2(); } return(new attackPart(120,0,31,10,30,15,f,true,false,true)); }