began working on game screen; changing entity system; clean up assets
0
android/assets/1280x720/RhythmBulletBG.png → android/assets/1280x720/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
0
android/assets/1280x800/RhythmBulletBG.png → android/assets/1280x800/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
0
android/assets/1366x768/RhythmBulletBG.png → android/assets/1366x768/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
0
android/assets/1920x1080/RhythmBulletBG.png → android/assets/1920x1080/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
0
android/assets/1920x1200/RhythmBulletBG.png → android/assets/1920x1200/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
0
android/assets/2560x1440/RhythmBulletBG.png → android/assets/2560x1440/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 6.4 MiB After Width: | Height: | Size: 6.4 MiB |
0
android/assets/3840x2160/RhythmBulletBG.png → android/assets/3840x2160/backgrounds/mainBG.png
Normal file → Executable file
Before Width: | Height: | Size: 15 MiB After Width: | Height: | Size: 15 MiB |
@ -38,11 +38,13 @@ import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
|
|||||||
|
|
||||||
|
|
||||||
public class RhythmBullet extends Game {
|
public class RhythmBullet extends Game {
|
||||||
|
public static final int WORLD_WIDTH = 64;
|
||||||
|
public static final int WORLD_HEIGHT = 48;
|
||||||
|
public static final int SPAWN_CIRCLE_RADIUS = 4;
|
||||||
|
public static float pixels_per_unit;
|
||||||
private boolean initComplete = false;
|
private boolean initComplete = false;
|
||||||
private boolean resizing;
|
private boolean resizing;
|
||||||
private int screenWidth, screenHeight;
|
private int screenWidth, screenHeight;
|
||||||
public static final int GAME_AREA_WIDTH = 64;
|
|
||||||
public static final int GAME_AREA_HEIGHT = 48;
|
|
||||||
public static final String VERSION = "(0.1)R1-PreAlpha";
|
public static final String VERSION = "(0.1)R1-PreAlpha";
|
||||||
|
|
||||||
private AssetManager assetManager = new AssetManager();
|
private AssetManager assetManager = new AssetManager();
|
||||||
@ -165,6 +167,9 @@ public class RhythmBullet extends Game {
|
|||||||
if (width != screenWidth || height != screenHeight) {
|
if (width != screenWidth || height != screenHeight) {
|
||||||
screenWidth = Gdx.graphics.getWidth();
|
screenWidth = Gdx.graphics.getWidth();
|
||||||
screenHeight = Gdx.graphics.getHeight();
|
screenHeight = Gdx.graphics.getHeight();
|
||||||
|
|
||||||
|
pixels_per_unit = screenHeight/WORLD_HEIGHT;
|
||||||
|
|
||||||
if (initComplete) {
|
if (initComplete) {
|
||||||
Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height);
|
Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height);
|
||||||
rRHandler.setResolution(width, height);
|
rRHandler.setResolution(width, height);
|
||||||
@ -238,7 +243,7 @@ public class RhythmBullet extends Game {
|
|||||||
assetManager.load("beateffect.p", ParticleEffect.class);
|
assetManager.load("beateffect.p", ParticleEffect.class);
|
||||||
assetManager.load("tpSelector.png", Texture.class);
|
assetManager.load("tpSelector.png", Texture.class);
|
||||||
assetManager.load("magic1.png", Texture.class);
|
assetManager.load("magic1.png", Texture.class);
|
||||||
assetManager.load("RhythmBulletBG.png", Texture.class);
|
assetManager.load("backgrounds/mainBG.png", Texture.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void generateFonts(final int height) {
|
public void generateFonts(final int height) {
|
||||||
|
@ -4,8 +4,6 @@ import java.security.InvalidParameterException;
|
|||||||
|
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class AudioDataPackage {
|
public class AudioDataPackage {
|
||||||
private FloatArray bassPeaks;
|
private FloatArray bassPeaks;
|
||||||
private FloatArray mPeaks;
|
private FloatArray mPeaks;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
package zero1hd.rhythmbullet.util;
|
package zero1hd.rhythmbullet.audio;
|
||||||
|
|
||||||
import com.badlogic.gdx.audio.Music;
|
import com.badlogic.gdx.audio.Music;
|
||||||
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
@ -5,7 +5,7 @@ import java.util.concurrent.Executors;
|
|||||||
|
|
||||||
import com.badlogic.gdx.utils.Disposable;
|
import com.badlogic.gdx.utils.Disposable;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class AudioAnalyzer implements Disposable {
|
public class AudioAnalyzer implements Disposable {
|
||||||
private ExecutorService exec;
|
private ExecutorService exec;
|
||||||
|
@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx;
|
|||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.audio.AudioDataPackage;
|
import zero1hd.rhythmbullet.audio.AudioDataPackage;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class PeakDetectionRunnable implements Runnable {
|
public class PeakDetectionRunnable implements Runnable {
|
||||||
boolean work = true, done;
|
boolean work = true, done;
|
||||||
|
@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.audio.analyzer;
|
|||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class PruneFluxRunnable implements Runnable {
|
public class PruneFluxRunnable implements Runnable {
|
||||||
boolean work = true;
|
boolean work = true;
|
||||||
|
@ -5,7 +5,7 @@ import com.badlogic.gdx.math.MathUtils;
|
|||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D;
|
import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class SpectralFluxAnalysisRunnable implements Runnable {
|
public class SpectralFluxAnalysisRunnable implements Runnable {
|
||||||
boolean work = true;
|
boolean work = true;
|
||||||
|
@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.audio.analyzer;
|
|||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class ThresholdCalcRunnable implements Runnable {
|
public class ThresholdCalcRunnable implements Runnable {
|
||||||
boolean work = true;
|
boolean work = true;
|
||||||
|
@ -11,7 +11,7 @@ import com.badlogic.gdx.math.MathUtils;
|
|||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class BasicVisualizer extends VisualizerCore {
|
public class BasicVisualizer extends VisualizerCore {
|
||||||
private Pixmap pixmap;
|
private Pixmap pixmap;
|
||||||
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.g2d.Batch;
|
|||||||
import com.badlogic.gdx.utils.Disposable;
|
import com.badlogic.gdx.utils.Disposable;
|
||||||
|
|
||||||
import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D;
|
import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class VisualizerCore implements Disposable {
|
public class VisualizerCore implements Disposable {
|
||||||
protected MusicManager mm;
|
protected MusicManager mm;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package zero1hd.rhythmbullet.entity;
|
package zero1hd.rhythmbullet.entity;
|
||||||
|
|
||||||
|
import java.security.InvalidParameterException;
|
||||||
|
|
||||||
import com.badlogic.gdx.Preferences;
|
import com.badlogic.gdx.Preferences;
|
||||||
import com.badlogic.gdx.assets.AssetManager;
|
import com.badlogic.gdx.assets.AssetManager;
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
@ -22,7 +24,6 @@ public class Entity implements Poolable {
|
|||||||
protected EntityManager ec;
|
protected EntityManager ec;
|
||||||
|
|
||||||
protected boolean enemy;
|
protected boolean enemy;
|
||||||
protected boolean nonStnrd = false;
|
|
||||||
protected boolean move = true;
|
protected boolean move = true;
|
||||||
|
|
||||||
protected boolean dead;
|
protected boolean dead;
|
||||||
@ -62,7 +63,14 @@ public class Entity implements Poolable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init(float deg, float speed, int hp) {
|
public void init(float deg, float speed, int hp) {
|
||||||
|
rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle));
|
||||||
|
sprite.setSize(sprite.getTexture().getWidth()/RhythmBullet.pixels_per_unit, sprite.getTexture().getHeight()/RhythmBullet.pixels_per_unit);
|
||||||
|
float r = RhythmBullet.SPAWN_CIRCLE_RADIUS - sprite.getWidth();
|
||||||
|
if (r < RhythmBullet.SPAWN_CIRCLE_RADIUS -1) {
|
||||||
|
throw new InvalidParameterException("Entity is too big! Calculated final distance from center: " + r);
|
||||||
|
}
|
||||||
|
sprite.setPosition(r*rotRatios.x, r*rotRatios.y);
|
||||||
|
updatePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,21 +93,19 @@ public class Entity implements Poolable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void calculate(float delta) {
|
public void calculate(float delta) {
|
||||||
if (!nonStnrd) {
|
if (coordinator != null) {
|
||||||
if (coordinator != null) {
|
coordinator.coordinate(delta);
|
||||||
coordinator.coordinate(delta);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (dead) {
|
if (dead) {
|
||||||
ef.recycleEntity(this);
|
ef.recycleEntity(this);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (angle >= 360f) {
|
if (angle >= 360f) {
|
||||||
angle -= 360f;
|
angle -= 360f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sprite.getX() > RhythmBullet.GAME_AREA_WIDTH || sprite.getY() > RhythmBullet.GAME_AREA_HEIGHT || sprite.getX() < 0-sprite.getWidth() || sprite.getX() < 0-sprite.getWidth()) {
|
if (sprite.getX() > RhythmBullet.WORLD_WIDTH || sprite.getY() > RhythmBullet.WORLD_HEIGHT || sprite.getX() < 0-sprite.getWidth() || sprite.getX() < 0-sprite.getWidth()) {
|
||||||
dead = true;
|
dead = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,18 +113,16 @@ public class Entity implements Poolable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Batch batch) {
|
public void draw(Batch batch) {
|
||||||
if (!nonStnrd) {
|
sprite.draw(batch);
|
||||||
sprite.draw(batch);
|
|
||||||
}
|
|
||||||
batch.setColor(Color.WHITE);
|
batch.setColor(Color.WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveBy(float x, float y) {
|
public void moveBy(float x, float y) {
|
||||||
rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle));
|
sprite.setCenter(sprite.getX() + x, sprite.getY() + y);
|
||||||
sprite.setCenter(x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePosition() {
|
public void updatePosition() {
|
||||||
|
rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle));
|
||||||
sprite.setOriginCenter();
|
sprite.setOriginCenter();
|
||||||
sprite.setRotation(angle);
|
sprite.setRotation(angle);
|
||||||
hitbox.setCenter(sprite.getOriginX(), sprite.getOriginY());
|
hitbox.setCenter(sprite.getOriginX(), sprite.getOriginY());
|
||||||
|
@ -28,7 +28,7 @@ public class Laser extends Entity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void calculate(float delta) {
|
public void calculate(float delta) {
|
||||||
if (getY() > RhythmBullet.GAME_AREA_HEIGHT) {
|
if (getY() > RhythmBullet.WORLD_HEIGHT) {
|
||||||
dead = true;
|
dead = true;
|
||||||
}
|
}
|
||||||
super.calculate(delta);
|
super.calculate(delta);
|
||||||
|
@ -19,12 +19,11 @@ public class PolyjetEntity extends Entity {
|
|||||||
private float rate;
|
private float rate;
|
||||||
private int maxH;
|
private int maxH;
|
||||||
public PolyjetEntity(AssetManager assets, float speed, float accel,int maxHealth, String jet) {
|
public PolyjetEntity(AssetManager assets, float speed, float accel,int maxHealth, String jet) {
|
||||||
nonStnrd = true;
|
|
||||||
health = 100;
|
health = 100;
|
||||||
this.speed = speed;
|
this.speed = speed;
|
||||||
this.accel = accel;
|
this.accel = accel;
|
||||||
setSize(1.5f, 1.5f);
|
setSize(1.5f, 1.5f);
|
||||||
setPosition(RhythmBullet.GAME_AREA_WIDTH/2 - getWidth()/2, -4f);
|
setPosition(RhythmBullet.WORLD_WIDTH/2 - getWidth()/2, -4f);
|
||||||
maxH = maxHealth;
|
maxH = maxHealth;
|
||||||
hitbox = new Rectangle(getX(), getY(), getWidth(), getHeight());
|
hitbox = new Rectangle(getX(), getY(), getWidth(), getHeight());
|
||||||
polyjet = assets.get("polyjet-" + jet + ".png", Texture.class);
|
polyjet = assets.get("polyjet-" + jet + ".png", Texture.class);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package zero1hd.rhythmbullet.desktop.audio.map;
|
package zero1hd.rhythmbullet.game;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package zero1hd.rhythmbullet.desktop.stages;
|
package zero1hd.rhythmbullet.game;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.InputProcessor;
|
import com.badlogic.gdx.InputProcessor;
|
||||||
@ -8,7 +8,6 @@ import com.badlogic.gdx.graphics.g2d.Batch;
|
|||||||
import com.badlogic.gdx.utils.Disposable;
|
import com.badlogic.gdx.utils.Disposable;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.controls.KeyMap;
|
import zero1hd.rhythmbullet.controls.KeyMap;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.map.GamePlayMap;
|
|
||||||
import zero1hd.rhythmbullet.entity.CollisionDetector;
|
import zero1hd.rhythmbullet.entity.CollisionDetector;
|
||||||
import zero1hd.rhythmbullet.entity.EntityManager;
|
import zero1hd.rhythmbullet.entity.EntityManager;
|
||||||
import zero1hd.rhythmbullet.entity.ally.Laser;
|
import zero1hd.rhythmbullet.entity.ally.Laser;
|
||||||
@ -19,7 +18,6 @@ import zero1hd.rhythmbullet.util.ScoreManager;
|
|||||||
|
|
||||||
public class GameController implements Disposable, InputProcessor {
|
public class GameController implements Disposable, InputProcessor {
|
||||||
public PolyjetEntity polyjet;
|
public PolyjetEntity polyjet;
|
||||||
private GamePlayMap audioMap;
|
|
||||||
|
|
||||||
public CoordinatorManager cm;
|
public CoordinatorManager cm;
|
||||||
public EntityManager em;
|
public EntityManager em;
|
||||||
@ -58,14 +56,6 @@ public class GameController implements Disposable, InputProcessor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAudioMap(GamePlayMap audioMap) {
|
|
||||||
this.audioMap = audioMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GamePlayMap getAudioMap() {
|
|
||||||
return audioMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean keyDown(int keycode) {
|
public boolean keyDown(int keycode) {
|
||||||
if (keycode == KeyMap.left) {
|
if (keycode == KeyMap.left) {
|
@ -1,10 +1,10 @@
|
|||||||
package zero1hd.rhythmbullet.desktop.audio.map;
|
package zero1hd.rhythmbullet.game;
|
||||||
|
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityFrame;
|
import zero1hd.rhythmbullet.entity.EntityFrame;
|
||||||
import zero1hd.rhythmbullet.entity.coordinator.Coordinator;
|
import zero1hd.rhythmbullet.entity.coordinator.Coordinator;
|
||||||
import zero1hd.rhythmbullet.entity.coordinator.CoordinatorFrame;
|
import zero1hd.rhythmbullet.entity.coordinator.CoordinatorFrame;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class GamePlayMap {
|
public class GamePlayMap {
|
||||||
private MusicManager musicData;
|
private MusicManager musicData;
|
@ -1,8 +1,7 @@
|
|||||||
package zero1hd.rhythmbullet.desktop.audio.map;
|
package zero1hd.rhythmbullet.game;
|
||||||
|
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
|
|
||||||
|
|
||||||
public class MapWindowData {
|
public class MapWindowData {
|
||||||
Array<EntitySpawnInfo> entityDatas;
|
Array<EntitySpawnInfo> entityDatas;
|
||||||
public MapWindowData() {
|
public MapWindowData() {
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
|||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.desktop.screens.LoadingScreen;
|
import zero1hd.rhythmbullet.desktop.screens.SplashScreen;
|
||||||
|
|
||||||
public class DesktopLauncher {
|
public class DesktopLauncher {
|
||||||
public static void main (String[] arg) {
|
public static void main (String[] arg) {
|
||||||
@ -20,7 +20,7 @@ public class DesktopLauncher {
|
|||||||
config.allowSoftwareMode = true;
|
config.allowSoftwareMode = true;
|
||||||
config.useHDPI = true;
|
config.useHDPI = true;
|
||||||
core = new RhythmBullet();
|
core = new RhythmBullet();
|
||||||
core.setInitialScreen(new LoadingScreen(core));
|
core.setInitialScreen(new SplashScreen(core));
|
||||||
new LwjglApplication(core, config);
|
new LwjglApplication(core, config);
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import javazoom.jl.decoder.DecoderException;
|
|||||||
import javazoom.jl.decoder.Header;
|
import javazoom.jl.decoder.Header;
|
||||||
import javazoom.jl.decoder.MP3Decoder;
|
import javazoom.jl.decoder.MP3Decoder;
|
||||||
import javazoom.jl.decoder.OutputBuffer;
|
import javazoom.jl.decoder.OutputBuffer;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
|
|
||||||
public class Mp3Manager implements MusicManager {
|
public class Mp3Manager implements MusicManager {
|
||||||
|
@ -9,8 +9,8 @@ import com.badlogic.gdx.files.FileHandle;
|
|||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import com.badlogic.gdx.utils.Sort;
|
import com.badlogic.gdx.utils.Sort;
|
||||||
|
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.util.FileHandleAlphabeticalComparator;
|
import zero1hd.rhythmbullet.util.FileHandleAlphabeticalComparator;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class MusicList extends Observable {
|
public class MusicList extends Observable {
|
||||||
private Array<FileHandle> musicList;
|
private Array<FileHandle> musicList;
|
||||||
|
@ -9,7 +9,7 @@ import com.badlogic.gdx.Preferences;
|
|||||||
import com.badlogic.gdx.audio.Music;
|
import com.badlogic.gdx.audio.Music;
|
||||||
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class MusicListController extends Observable implements OnCompletionListener, Observer {
|
public class MusicListController extends Observable implements OnCompletionListener, Observer {
|
||||||
private MusicList musicList;
|
private MusicList musicList;
|
||||||
|
@ -12,8 +12,8 @@ import com.badlogic.gdx.audio.Music;
|
|||||||
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
||||||
import com.badlogic.gdx.files.FileHandle;
|
import com.badlogic.gdx.files.FileHandle;
|
||||||
|
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.audio.wavedecoder.WAVSampleReader;
|
import zero1hd.rhythmbullet.audio.wavedecoder.WAVSampleReader;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class WAVManager implements MusicManager {
|
public class WAVManager implements MusicManager {
|
||||||
private int readWindowSize = 1024;
|
private int readWindowSize = 1024;
|
||||||
|
@ -2,13 +2,13 @@ package zero1hd.rhythmbullet.desktop.audio.map;
|
|||||||
|
|
||||||
import org.apache.commons.math3.random.MersenneTwister;
|
import org.apache.commons.math3.random.MersenneTwister;
|
||||||
|
|
||||||
import com.badlogic.gdx.math.MathUtils;
|
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
|
||||||
import zero1hd.rhythmbullet.audio.AudioDataPackage;
|
import zero1hd.rhythmbullet.audio.AudioDataPackage;
|
||||||
import zero1hd.rhythmbullet.entity.EntityManager;
|
import zero1hd.rhythmbullet.entity.EntityManager;
|
||||||
import zero1hd.rhythmbullet.entity.coordinator.CoordinatorManager;
|
import zero1hd.rhythmbullet.entity.coordinator.CoordinatorManager;
|
||||||
|
import zero1hd.rhythmbullet.game.EntitySpawnInfo;
|
||||||
|
import zero1hd.rhythmbullet.game.GamePlayMap;
|
||||||
|
|
||||||
public class RhythmMapAlgorithm implements Runnable {
|
public class RhythmMapAlgorithm implements Runnable {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.badlogic.gdx.math.MathUtils;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class AudioGraph extends Actor {
|
public class AudioGraph extends Actor {
|
||||||
private MusicManager audioData;
|
private MusicManager audioData;
|
||||||
|
@ -9,7 +9,7 @@ import com.badlogic.gdx.math.MathUtils;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class AudioGraphRelation extends Actor {
|
public class AudioGraphRelation extends Actor {
|
||||||
private MusicManager audioData;
|
private MusicManager audioData;
|
||||||
|
@ -11,7 +11,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
import com.badlogic.gdx.utils.Align;
|
import com.badlogic.gdx.utils.Align;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.desktop.screens.MainMenu;
|
import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen;
|
||||||
|
|
||||||
public class GraphicsOptions extends Table {
|
public class GraphicsOptions extends Table {
|
||||||
private Label resolutions, shaders;
|
private Label resolutions, shaders;
|
||||||
@ -28,7 +28,7 @@ public class GraphicsOptions extends Table {
|
|||||||
_1366x768;
|
_1366x768;
|
||||||
|
|
||||||
|
|
||||||
public GraphicsOptions(final MainMenu mainMenu, Skin skin, final Preferences prefs) {
|
public GraphicsOptions(final MainMenuScreen mainMenu, Skin skin, final Preferences prefs) {
|
||||||
align(Align.center);
|
align(Align.center);
|
||||||
defaults().space(10f);
|
defaults().space(10f);
|
||||||
this.prefs = prefs;
|
this.prefs = prefs;
|
||||||
|
@ -17,8 +17,8 @@ import com.badlogic.gdx.utils.reflect.ClassReflection;
|
|||||||
import com.badlogic.gdx.utils.reflect.Field;
|
import com.badlogic.gdx.utils.reflect.Field;
|
||||||
import com.badlogic.gdx.utils.reflect.ReflectionException;
|
import com.badlogic.gdx.utils.reflect.ReflectionException;
|
||||||
|
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.audio.visualizer.BasicVisualizer;
|
import zero1hd.rhythmbullet.audio.visualizer.BasicVisualizer;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class Visualizer extends Widget implements Disposable {
|
public class Visualizer extends Widget implements Disposable {
|
||||||
private BasicVisualizer vis;
|
private BasicVisualizer vis;
|
||||||
|
@ -14,8 +14,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.audio.MusicInfo;
|
import zero1hd.rhythmbullet.audio.MusicInfo;
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.audio.analyzer.AudioAnalyzer;
|
import zero1hd.rhythmbullet.audio.analyzer.AudioAnalyzer;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class AnalysisPage extends Page {
|
public class AnalysisPage extends Page {
|
||||||
private boolean confirmed;
|
private boolean confirmed;
|
||||||
|
@ -14,12 +14,12 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
|||||||
import com.badlogic.gdx.utils.Align;
|
import com.badlogic.gdx.utils.Align;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicControls;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicControls;
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText;
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.components.TitleBarVisualizer;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.components.TitleBarVisualizer;
|
||||||
import zero1hd.rhythmbullet.desktop.screens.MainMenu;
|
import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class MainPage extends Page implements Observer {
|
public class MainPage extends Page implements Observer {
|
||||||
private Label versionLabel;
|
private Label versionLabel;
|
||||||
@ -32,10 +32,10 @@ public class MainPage extends Page implements Observer {
|
|||||||
private TextButton quitButton;
|
private TextButton quitButton;
|
||||||
|
|
||||||
private MusicControls musicControls;
|
private MusicControls musicControls;
|
||||||
private MainMenu mMenu;
|
private MainMenuScreen mMenu;
|
||||||
private ScrollText scrollText;
|
private ScrollText scrollText;
|
||||||
|
|
||||||
public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenu mainMenu) {
|
public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenuScreen mainMenu) {
|
||||||
this.mlc = mlc;
|
this.mlc = mlc;
|
||||||
this.mMenu = mainMenu;
|
this.mMenu = mainMenu;
|
||||||
titleBar = new TitleBarVisualizer(core.getAssetManager());
|
titleBar = new TitleBarVisualizer(core.getAssetManager());
|
||||||
|
@ -26,11 +26,11 @@ import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
|||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.audio.MusicInfo;
|
import zero1hd.rhythmbullet.audio.MusicInfo;
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicInfoController;
|
import zero1hd.rhythmbullet.desktop.audio.MusicInfoController;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicSelectable;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicSelectable;
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class MusicSelectionPage extends Page implements Observer {
|
public class MusicSelectionPage extends Page implements Observer {
|
||||||
Preferences musicFileAnnotation;
|
Preferences musicFileAnnotation;
|
||||||
|
@ -10,14 +10,14 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.components.GraphicsOptions;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.components.GraphicsOptions;
|
||||||
import zero1hd.rhythmbullet.desktop.screens.MainMenu;
|
import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen;
|
||||||
|
|
||||||
public class VideoOptionsPage extends Page {
|
public class VideoOptionsPage extends Page {
|
||||||
private ScrollPane scrollPane;
|
private ScrollPane scrollPane;
|
||||||
private GraphicsOptions graphicsTable;
|
private GraphicsOptions graphicsTable;
|
||||||
private TextButton backButton;
|
private TextButton backButton;
|
||||||
|
|
||||||
public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenu menu, AssetManager assets) {
|
public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenuScreen menu, AssetManager assets) {
|
||||||
graphicsTable = new GraphicsOptions(menu, skin, prefs);
|
graphicsTable = new GraphicsOptions(menu, skin, prefs);
|
||||||
scrollPane = new ScrollPane(graphicsTable, skin);
|
scrollPane = new ScrollPane(graphicsTable, skin);
|
||||||
scrollPane.setFadeScrollBars(false);
|
scrollPane.setFadeScrollBars(false);
|
||||||
|
@ -10,7 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.audio.AudioDataPackage;
|
import zero1hd.rhythmbullet.audio.AudioDataPackage;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class BeatViewer extends Window {
|
public class BeatViewer extends Window {
|
||||||
Pixmap lights;
|
Pixmap lights;
|
||||||
|
@ -9,7 +9,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Slider;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
|
|
||||||
public class VolumeWindow extends Window {
|
public class VolumeWindow extends Window {
|
||||||
|
|
||||||
|
29
desktop/src/zero1hd/rhythmbullet/desktop/screens/GameScreen.java
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
package zero1hd.rhythmbullet.desktop.screens;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Preferences;
|
||||||
|
import com.badlogic.gdx.ScreenAdapter;
|
||||||
|
import com.badlogic.gdx.assets.AssetManager;
|
||||||
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||||
|
import com.badlogic.gdx.utils.viewport.ExtendViewport;
|
||||||
|
|
||||||
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
import zero1hd.rhythmbullet.game.GameController;
|
||||||
|
|
||||||
|
public class GameScreen extends ScreenAdapter {
|
||||||
|
private AssetManager assets;
|
||||||
|
private SpriteBatch batch;
|
||||||
|
private ExtendViewport viewport;
|
||||||
|
private GameController gc;
|
||||||
|
|
||||||
|
public GameScreen(AssetManager assets, Preferences prefs) {
|
||||||
|
this.assets = assets;
|
||||||
|
batch = new SpriteBatch();
|
||||||
|
viewport = new ExtendViewport(RhythmBullet.WORLD_WIDTH, RhythmBullet.WORLD_HEIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(float delta) {
|
||||||
|
super.render(delta);
|
||||||
|
}
|
||||||
|
}
|
@ -20,6 +20,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
|||||||
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicInfoController;
|
import zero1hd.rhythmbullet.desktop.audio.MusicInfoController;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicList;
|
import zero1hd.rhythmbullet.desktop.audio.MusicList;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
||||||
@ -31,9 +32,8 @@ import zero1hd.rhythmbullet.desktop.graphics.ui.pages.MusicSelectionPage;
|
|||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.pages.OptionsPage;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.pages.OptionsPage;
|
||||||
import zero1hd.rhythmbullet.desktop.graphics.ui.pages.VideoOptionsPage;
|
import zero1hd.rhythmbullet.desktop.graphics.ui.pages.VideoOptionsPage;
|
||||||
import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
|
import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
|
||||||
import zero1hd.rhythmbullet.util.MusicManager;
|
|
||||||
|
|
||||||
public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen {
|
public class MainMenuScreen extends ScreenAdapter implements AdvancedResizeScreen {
|
||||||
public Stage stage;
|
public Stage stage;
|
||||||
private Texture background;
|
private Texture background;
|
||||||
private Vector3 cameraPosition;
|
private Vector3 cameraPosition;
|
||||||
@ -65,7 +65,7 @@ public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen {
|
|||||||
private ScreenViewport screenViewport;
|
private ScreenViewport screenViewport;
|
||||||
private boolean shaderLoaded;
|
private boolean shaderLoaded;
|
||||||
|
|
||||||
public MainMenu(RhythmBullet core) {
|
public MainMenuScreen(RhythmBullet core) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
stage = new Stage(new ScreenViewport());
|
stage = new Stage(new ScreenViewport());
|
||||||
cameraPosition = new Vector3(stage.getCamera().position);
|
cameraPosition = new Vector3(stage.getCamera().position);
|
||||||
@ -90,7 +90,7 @@ public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen {
|
|||||||
stage.addActor(mainPage);
|
stage.addActor(mainPage);
|
||||||
//End main menu
|
//End main menu
|
||||||
|
|
||||||
background = core.getAssetManager().get("RhythmBulletBG.png", Texture.class);
|
background = core.getAssetManager().get("backgrounds/mainBG.png", Texture.class);
|
||||||
|
|
||||||
keybindPage = new KeybindOptionsPage(core.getDefaultSkin(), core.getAssetManager(), cameraPosition);
|
keybindPage = new KeybindOptionsPage(core.getDefaultSkin(), core.getAssetManager(), cameraPosition);
|
||||||
keybindPage.setPosition(-1f*Gdx.graphics.getWidth(), -1f*Gdx.graphics.getHeight());
|
keybindPage.setPosition(-1f*Gdx.graphics.getWidth(), -1f*Gdx.graphics.getHeight());
|
@ -13,14 +13,14 @@ import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
|||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
|
import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
|
||||||
|
|
||||||
public class LoadingScreen extends ScreenAdapter implements AdvancedResizeScreen {
|
public class SplashScreen extends ScreenAdapter implements AdvancedResizeScreen {
|
||||||
private Stage stage;
|
private Stage stage;
|
||||||
private RhythmBullet core;
|
private RhythmBullet core;
|
||||||
private Texture splash;
|
private Texture splash;
|
||||||
private Image zero1HD;
|
private Image zero1HD;
|
||||||
private boolean done;
|
private boolean done;
|
||||||
|
|
||||||
public LoadingScreen(RhythmBullet core) {
|
public SplashScreen(RhythmBullet core) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ public class LoadingScreen extends ScreenAdapter implements AdvancedResizeScreen
|
|||||||
if (!done) {
|
if (!done) {
|
||||||
Gdx.app.debug("Loading Screen", "queue has all been loaded. Action is done playing.");
|
Gdx.app.debug("Loading Screen", "queue has all been loaded. Action is done playing.");
|
||||||
done = true;
|
done = true;
|
||||||
core.setScreen(new MainMenu(core));
|
core.setScreen(new MainMenuScreen(core));
|
||||||
zero1HD.remove();
|
zero1HD.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|