Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
feat: fine-tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
LPkkjHD committed Jun 6, 2024
1 parent 13e3503 commit 27897ce
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 189 deletions.
2 changes: 1 addition & 1 deletion game/assets/level/Dungeon1.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<property name="destination" value="LEVEL3"/>
</properties>
<data encoding="base64" compression="zlib">
eJztzjEBAAAIwKDFsX9CY+gBCSgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqLkOAAAAADyxSq0AKQ==
eJztwzENAAAIA7CJxb8GnlngIGmTJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfDHNnQWw3wDJ
</data>
</layer>
<layer id="9" name="start" width="100" height="100">
Expand Down
61 changes: 29 additions & 32 deletions game/assets/level/Dungeon6.tmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="50" height="20" tilewidth="16" tileheight="16" infinite="0" nextlayerid="11" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="50" height="20" tilewidth="16" tileheight="16" infinite="0" nextlayerid="12" nextobjectid="1">
<properties>
<property name="inside" type="bool" value="true"/>
</properties>
Expand Down Expand Up @@ -53,10 +53,34 @@
1,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,36,
1,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,6,
1,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,26,
4,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,26,
0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,6,
0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,26,
44,42,42,42,43,42,42,45,43,44,43,44,42,45,43,43,43,45,43,45,45,43,42,43,44,44,42,45,42,45,45,44,43,43,42,44,45,45,45,44,44,43,42,43,42,44,44,44,44,46
21,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,26,
21,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,6,
21,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,26,
41,42,42,42,43,42,42,45,43,44,43,44,42,45,43,43,43,45,43,45,45,43,42,43,44,44,42,45,42,45,45,44,43,43,42,44,45,45,45,44,44,43,42,43,42,44,44,44,44,46
</data>
</layer>
<layer id="11" name="trophy" width="50" height="20">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer id="8" name="chests" width="50" height="20">
Expand Down
32 changes: 16 additions & 16 deletions game/assets/level/Underwatch.tiled-session
Original file line number Diff line number Diff line change
Expand Up @@ -78,32 +78,32 @@
"scale": 0.7327,
"selectedLayer": 5,
"viewCenter": {
"x": 434.69359901733316,
"y": 450.3889722942542
"x": 435.3760065511124,
"y": 451.07137982803334
}
},
"Dungeon1.tmx": {
"scale": 0.323,
"selectedLayer": 7,
"scale": 0.9968,
"selectedLayer": 1,
"viewCenter": {
"x": 772.4458204334364,
"y": 1188.8544891640865
"x": 467.49598715890846,
"y": 735.8547351524878
}
},
"Dungeon3.tmx": {
"scale": 0.7095,
"selectedLayer": 9,
"viewCenter": {
"x": 274.136715997181,
"y": 438.336856941508
"x": 400.28188865398164,
"y": 400.9866102889359
}
},
"Dungeon6.tmx": {
"scale": 0.6731,
"selectedLayer": 3,
"viewCenter": {
"x": 520.7250037141584,
"y": 44.56990046055569
"x": 401.1291041450007,
"y": 161.19447333234285
}
},
"Dungeon_Monsters1.tsx": {
Expand Down Expand Up @@ -167,8 +167,8 @@
"scale": 0.8807,
"selectedLayer": 5,
"viewCenter": {
"x": 1027.0239582150562,
"y": 627.9096173498353
"x": 1026.4562280004543,
"y": 627.3418871352334
}
},
"neuesTileset.tsx": {
Expand All @@ -189,11 +189,11 @@
"scaleInEditor": 1
},
"startMap.tmx": {
"scale": 0.8702,
"selectedLayer": 9,
"scale": 1.3579,
"selectedLayer": 5,
"viewCenter": {
"x": 13.789933348655484,
"y": 271.7766030797518
"x": 526.5483467118344,
"y": 315.5607924000294
}
}
},
Expand Down
20 changes: 5 additions & 15 deletions game/assets/level/startMap.tmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" class="outside" orientation="orthogonal" renderorder="right-down" width="50" height="50" tilewidth="16" tileheight="16" infinite="0" nextlayerid="14" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="outside" orientation="orthogonal" renderorder="right-down" width="50" height="50" tilewidth="16" tileheight="16" infinite="0" nextlayerid="15" nextobjectid="1">
<properties>
<property name="inside" type="bool" value="false"/>
</properties>
Expand All @@ -15,11 +15,6 @@
eJztmL0OgCAMhFk0Ifr+zyujg9byZ6/lhm8hIVyPa0PIKaVMCFGzFXbFWs1+C47CKax96Xzaj4gXnbWg5KhXF+r9oOoi7dlH65m3jKHPXq2P1jpn6kPL0ggPItZE5hA5K9Ib31Pd0hufPfIfnjIjUZOZ6DVHr280Fn7NONNibqLPavbCml73aEHyGkkLscOyt0aebZln5F5Cmp1RPSZ1oGfS81/vXTuiPi2etbfel2c83he9J6tzAf7RV6U=
</data>
</layer>
<layer id="12" name="trophy" width="50" height="50">
<data encoding="base64" compression="zlib">
eJztzkERAAAIA6D172Q3U+x8CAlIgG/mOgAAAAAAAAAAAAULEU4Avg==
</data>
</layer>
<layer id="2" name="walls" width="50" height="50">
<properties>
<property name="render" value="below"/>
Expand All @@ -28,11 +23,6 @@
eJztWY1KAzEMzmuom8Z54mDqe/gLoqiwTfD9X8ILXLGGpE3/zlPugzDWS/Plu6TtypYAcPHH7bi3FYyH297eInZn8CG79+IijKvjoZIP90OYno6njFgI09OREwth1lHKreEmIxbC9HT8l3U+6xgPjxA/354Dz969WFOvR04shFlHKXfNWAizjlLumrGwt7PejirZIoG7FFzHEurdZ9YJ3KX4r30V0rGpyMu5a8ZC+Kmjdt4h7pqxEMbtK/+u9wq2e7hmL14sBF0Hr80hhPej1rUMAcHeV9x3SkCw55biW1KbnLkIbXSEkJqn5M/HEOTcDoQxzbcWSmqIIOd2EvH1OTl/7Lv1meW5A4KcW0zH1ICQV4+W0GoQ6gGEuA43R/O15qL1W41zB2F69cgBQr6OFuc3/WbIuevw3BxS6hHqW81PA3GcGm3F5knvuFZfWdYs56AcLXe7NZs3pfVBHPxdW+e11JG6hohD0nHZ25Vg15HcrDqsa8PqQxyt6pFzflggaSKOsfvK2jMpvUUckg5/P14I450wh3CucFjeU8neSxySDjcu7bfSeIyjVV/5vevnxMdb6ajdW8ThctoI4xYdlpqn1CP3ftqir/g7Ke2rnPWxgXHWR+lvKs6R2ldbYTzEjYIvR+xclO4g/j3E5av11b63D2+cvms6NGCCL8/VCuII7VeUM9exg9/ddzUOrR57+M7bgTRth3Hr/zhdgm+udYMOztMN+e+G3D8Hczro8wswiGno
</data>
</layer>
<layer id="8" name="chests" width="50" height="50">
<data encoding="base64" compression="zlib">
eJzt0iEBAAAIxMDvH4aMREAgENzZ2SUAAAAAAAAAAPBDLTtMPHSrAWCaAgs=
</data>
</layer>
<layer id="7" name="stuffOnCeiling" width="50" height="50">
<properties>
<property name="render" value="above"/>
Expand All @@ -57,9 +47,9 @@
eJzt1bENACAIBED3X8Q1LexMbNQIIXclBXm+oTUAAAAAAKijRwcAgGDrL+yb+c1O/srSf5Ycp17nr9BHthtO82S7I4oeYBpfRAkj
</data>
</layer>
<layer id="3" name="animatedObjects" width="50" height="50">
<layer id="3" name="coins" width="50" height="50">
<data encoding="base64" compression="zlib">
eJzt2jEOgCAMBVDufxjiEV1kISFGBmvrewsLSfmUjbZGtB59gCKOxZpRhSwVMgwVslTIMFTKAgAAAAAAAFll/rcbcxqrDJFzHE/vcd7/hX7sZrhb37Rbe35D0f3oV+2/zSad8oYflQ==
eJzt2TEKgDAQRcHc/zDBI1pomoCIKUz8zjTbCOvDIgRLgQzbxfyihJaEhiahJaGhSWoBAADg4G4HAP/i7AfIkPDfbsWGp+/QP79Cy2jD3XzT6O7Vvkc9d9dJ+2fZAQrJHj0=
</data>
</layer>
<layer id="13" name="ammo" width="50" height="50">
Expand All @@ -79,12 +69,12 @@
</layer>
<layer id="10" name="hp" width="50" height="50">
<data encoding="base64" compression="zlib">
eJztzgENAAAIA6D3r2NBY1w3SEDCB9MOAAAAAAAAAAAAHLdQTgC0
eJztwQENAAAAwqD3T20ON6AAAAAAAAAAAADg3wAnEAAB
</data>
</layer>
<layer id="11" name="speed" width="50" height="50">
<data encoding="base64" compression="zlib">
eJztzjEBAAAMAiD7V1q5RfD0gQQkQHPrAAAAAAAAAAAAUD1jDgC8
eJztwQENAAAAwqD3T20ON6AAAAAAAAAAAADg3wAnEAAB
</data>
</layer>
</map>
6 changes: 2 additions & 4 deletions game/assets/tileSets/tilesetsAussenwelt/plains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@
</tile>
<tile id="44">
<objectgroup draworder="index" id="2">
<object id="1" x="0" y="0" width="16" height="16"/>
<object id="2" x="0" y="0" width="16" height="15"/>
<object id="2" x="0" y="0" width="16" height="16"/>
</objectgroup>
</tile>
<tile id="45">
<objectgroup draworder="index" id="2">
<object id="1" x="0" y="0" width="14" height="15"/>
<object id="2" x="0" y="0" width="14" height="16"/>
<object id="1" x="0" y="0" width="14" height="16"/>
</objectgroup>
</tile>
</tileset>
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
import com.badlogic.gdx.math.Vector2;

public class BouncingBullet extends Bullet {
private int bounces;
private boolean inWall;
private int bounces;
private boolean inWall;

public BouncingBullet(Vector2 position, float angle, int damage, short mask) {
super("bullet7x13", position, angle, damage, mask);
this.bounces = 3;
this.inWall = false;
}
public BouncingBullet(Vector2 position, float angle, int damage, short mask) {
super("bullet7x13", position, angle, damage, mask);
this.bounces = 3;
this.inWall = false;
}

public void bounce() {
if (!inWall) {
inWall = true;
Gdx.app.debug("BouncingBullet", "BouncingBullet bounce");
if (bounces <= 0) {
this.setRemove(true);
}
public void bounce() {
if (!inWall) {
inWall = true;
Gdx.app.debug("BouncingBullet", "BouncingBullet bounce");
if (bounces <= 0) {
this.setRemove(true);
}

bounces--;
bounces--;
}
}
}

public void leaveWall() {
this.inWall = false;
Gdx.app.debug("BouncingBullet", "BouncingBullet leaveWall");
}
public void leaveWall() {
this.inWall = false;
Gdx.app.debug("BouncingBullet", "BouncingBullet leaveWall");
}
}
90 changes: 45 additions & 45 deletions game/core/src/main/de/dhbw/tinf22b6/gameobject/bullet/FireBall.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,52 @@
import com.badlogic.gdx.math.Vector2;

public class FireBall extends Bullet {
private Vector2 perpendicular;
private Vector2 perpendicular;

public FireBall(Vector2 position, float angle, int damage, short mask) {
super("fireAnimation3", position, angle, damage, mask);
this.currentAnimation.setFrameDuration(0.1f);
this.speed = 0.5f;
this.perpendicular = new Vector2(MathUtils.cosDeg(angle), -MathUtils.sinDeg(angle));
}
public FireBall(Vector2 position, float angle, int damage, short mask) {
super("fireAnimation3", position, angle, damage, mask);
this.currentAnimation.setFrameDuration(0.1f);
this.speed = 0.5f;
this.perpendicular = new Vector2(MathUtils.cosDeg(angle), -MathUtils.sinDeg(angle));
}

@Override
public void render(Batch batch) {
float rotation = angle + 180;
batch.draw(
currentAnimation.getKeyFrame(stateTime, true),
pos.x,
pos.y,
width / 2,
height / 2,
width,
height,
1,
1,
rotation);
for (int i = 0; i < 360; i += 5) {
batch.draw(
currentAnimation.getKeyFrame(stateTime, true),
pos.x + perpendicular.x * 5 * MathUtils.sinDeg((stateTime + i)*100),
pos.y + perpendicular.y * 5 * MathUtils.cosDeg((stateTime + i)*100),
width / 2,
height / 2,
width,
height,
1,
1,
rotation);
batch.draw(
currentAnimation.getKeyFrame(stateTime, true),
pos.x + perpendicular.x * 5 * -MathUtils.sinDeg((stateTime + i)*50),
pos.y + perpendicular.y * 5 * MathUtils.cosDeg((stateTime + i)*50),
width / 2,
height / 2,
width,
height,
1,
1,
rotation);
@Override
public void render(Batch batch) {
float rotation = angle + 180;
batch.draw(
currentAnimation.getKeyFrame(stateTime, true),
pos.x,
pos.y,
width / 2,
height / 2,
width,
height,
1,
1,
rotation);
for (int i = 0; i < 360; i += 5) {
batch.draw(
currentAnimation.getKeyFrame(stateTime, true),
pos.x + perpendicular.x * 5 * MathUtils.sinDeg((stateTime + i) * 100),
pos.y + perpendicular.y * 5 * MathUtils.cosDeg((stateTime + i) * 100),
width / 2,
height / 2,
width,
height,
1,
1,
rotation);
batch.draw(
currentAnimation.getKeyFrame(stateTime, true),
pos.x + perpendicular.x * 5 * -MathUtils.sinDeg((stateTime + i) * 50),
pos.y + perpendicular.y * 5 * MathUtils.cosDeg((stateTime + i) * 50),
width / 2,
height / 2,
width,
height,
1,
1,
rotation);
}
}
}
}
Loading

0 comments on commit 27897ce

Please sign in to comment.