Skip to content

Commit

Permalink
Finalize V-FINAL for me
Browse files Browse the repository at this point in the history
- Forgot to change back the dash cooldown from testing, oops
- level number shows in UI
- Update README
- Clean up repo
  • Loading branch information
nrebei2 committed May 22, 2023
1 parent e89b2b0 commit 3714046
Show file tree
Hide file tree
Showing 16 changed files with 235 additions and 102,348 deletions.
Binary file added Poster.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 11 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
# Lunar-Haze
## Game Control Lists:
| Action | Key |
|-------------------|------------|
| Move | Arrow Keys |
| Collect Moonlight | Space |
| Dash | Left Shift |
| Light Attack | Z |
| Heavy Attack | X |
| Pause | ESC |
<img src="Poster.jpg"
width="900"
height=auto />

## Rules for the game:
## Features
One of the unique highlights of Lunar Haze is its fully customizable level editor.
Thanks to ImGui Java bindings provided by SpaiR/imgui-java, the editor has a robust GUI for level creation.

Stealth Phase:
- Move around to collect moonlight
- You can not attack enemies in this phase
- Try to be hide from enemies to keep your health

End of Stealth Phase:
- Choose the power you want to increase by using the moonlight you collected in the previous phase

Battle Phase:
- Kill all the enemies to win the game

Good luck!
<img src="editor-to-game.png"
width="1500"
height=auto />

To play Lunar Haze, head over to the Releases page. We provide an executable for Windows and an application for macOS. Just download the suitable version for your operating system, install it, and you're good to go.

If you would like to build from source, the source code comes with the gradle build system.

Binary file removed Snap.20230413.162129.85895.0003.trc
Binary file not shown.
Binary file removed Snap.20230413.162203.85980.0003.trc
Binary file not shown.
4 changes: 2 additions & 2 deletions core/src/infinityx/lunarhaze/combat/PlayerAttackHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class PlayerAttackHandler extends MeleeHandler {
private float dashTimer;
private Vector2 dashDirection;
public boolean isDashing;
public static float DASH_COOLDOWN_BATTLE = 4.0f;
public static float DASH_COOLDOWN_STEALTH = 1f;
public static float DASH_COOLDOWN_BATTLE = 4f;
public static float DASH_COOLDOWN_STEALTH = 8f;

public static float DASH_IMPULSE_BATTLE = 3f;
public static float DASH_IMPULSE_STEALTH = 4f;
Expand Down
2 changes: 2 additions & 0 deletions core/src/infinityx/lunarhaze/graphics/UIRender.java
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,12 @@ public void drawLevelStats(GameCanvas canvas, GameplayController.Phase phase,
int remaining = gameplayController.getRemainingEnemies();
stat = " " + remaining;
}
String levelText = "Level " + level.getLevel();
canvas.drawText(text, UIFont_small, canvas.getWidth() / 2 - UIFont_small.getAscent() * text.length() * 1.8f, canvas.getHeight() - HEALTH_STROKE_HEIGHT * 0.7f);
canvas.drawText(stat, UIFont_small,
canvas.getWidth() / 2 - UIFont_small.getAscent() * 7,
canvas.getHeight() - HEALTH_STROKE_HEIGHT * 2 + UIFont_small.getCapHeight() * 2.5f);
canvas.drawText(levelText, UIFont_small, canvas.getWidth() / 2 - UIFont_small.getAscent() * levelText.length() * 1.6f, canvas.getHeight() - HEALTH_STROKE_HEIGHT * 1.9f);
canvas.draw(title_left, Color.WHITE, canvas.getWidth() / 2 - COUNTER_WIDTH - UIFont_small.getAscent() * 10,
canvas.getHeight() - HEALTH_STROKE_HEIGHT * 1.6f,
COUNTER_WIDTH, UIFont_small.getCapHeight());
Expand Down
2 changes: 1 addition & 1 deletion core/src/infinityx/lunarhaze/models/Billboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class Billboard implements Drawable {
public Billboard(Vector3 position, float scale) {
this.position = position;
this.scale = scale;
this.tint = new Color(Color.WHITE);
this.tint = new Color(1, 1, 1, 0.86f);
this.animation = new Animation();
this.pos = new Vector2();
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/infinityx/lunarhaze/models/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ public void draw(GameCanvas canvas, Vector2 pos, boolean editor) {
}
} else {
// Draw any out of bounds tiles close to player
for (int i = worldToBoardX(pos.x) - 13; i < worldToBoardX(pos.x) + 13; i++) {
for (int j = worldToBoardY(pos.y) - 13; j < worldToBoardY(pos.y) + 13; j++) {
for (int i = worldToBoardX(pos.x) - 11; i < worldToBoardX(pos.x) + 11; i++) {
for (int j = worldToBoardY(pos.y) - 11; j < worldToBoardY(pos.y) + 11; j++) {
if (!inBounds(i, j)) {
drawTile(i, j, canvas, pos, false);
}
Expand All @@ -273,7 +273,7 @@ private void drawTile(int x, int y, GameCanvas canvas, Vector2 pos, boolean edit
}

// Fast clipping test
if (!editor && pos.dst(boardCenterToWorldX(x), boardCenterToWorldY(y)) > 10) {
if (!editor && pos.dst(boardCenterToWorldX(x), boardCenterToWorldY(y)) > 11) {
return;
}

Expand Down
11 changes: 11 additions & 0 deletions core/src/infinityx/lunarhaze/models/LevelContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ public class LevelContainer {
private final ShaderProgram lightShader;
private float totalTime;

/** Level number */
private int level;

/**
* Initialize attributes
*/
Expand Down Expand Up @@ -784,6 +787,14 @@ public boolean reportFixture(Fixture fixture) {
//System.out.println(aStarMap);
pathfinder = new AStarPathFinding(aStarMap);
}

public void setLevel(int level) {
this.level = level;
}

public int getLevel() {
return level;
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions core/src/infinityx/lunarhaze/screens/GameMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ public void setupLevel() {
Gdx.app.exit();
}
levelContainer = ps.loadLevel(directory, levelData);
levelContainer.setLevel(level);
gameplayController.start(levelContainer);
MusicController.getInstance().playStealth();
}
Expand Down
Binary file added editor-to-game.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,762 changes: 0 additions & 3,762 deletions javacore.20230413.162129.85895.0002.txt

This file was deleted.

3,761 changes: 0 additions & 3,761 deletions javacore.20230413.162203.85980.0002.txt

This file was deleted.

Loading

0 comments on commit 3714046

Please sign in to comment.