Skip to content

Commit 486e10d

Browse files
committed
Optimized multiplayer initiation
1 parent 7833518 commit 486e10d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/com/redomar/game/Game.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class Game extends Canvas implements Runnable {
3333
public static final String NAME = "Game";
3434
public static Game game;
3535
private static int Jdata_Host;
36-
private static String Jdata_UserName;
36+
private static String Jdata_UserName = "";
3737

3838
private JFrame frame;
3939

@@ -212,34 +212,34 @@ public void render() {
212212

213213
public static void main(String[] args) {
214214
try {
215-
JSplash splash = new JSplash(Game.class.getResource("/splash/splash.png"), true, true, false, "v1.3 Alpha", null, Color.RED, Color.ORANGE);
215+
JSplash splash = new JSplash(Game.class.getResource("/splash/splash.png"), true, true, false, "v1.4 Alpha", null, Color.RED, Color.ORANGE);
216216
splash.splashOn();
217217
splash.setProgress(10, "Initializing Game");
218-
Thread.sleep(1500);
218+
Thread.sleep(750);
219219
splash.setProgress(25, "Loading Classes");
220-
Thread.sleep(1000);
220+
Thread.sleep(500);
221221
splash.setProgress(35, "Applying Configurations");
222-
Thread.sleep(1000);
222+
Thread.sleep(500);
223223
splash.setProgress(40, "Loading Sprites");
224-
Thread.sleep(1500);
224+
Thread.sleep(750);
225225
splash.setProgress(50, "Loading Textures");
226-
Thread.sleep(1000);
226+
Thread.sleep(500);
227227
splash.setProgress(60, "Loading Map");
228-
Thread.sleep(3000);
228+
Thread.sleep(1500);
229229
splash.setProgress(80, "Configuring Map");
230-
Thread.sleep(1000);
230+
Thread.sleep(500);
231231
splash.setProgress(90, "Pulling InputPanes");
232-
Thread.sleep(1500);
232+
Thread.sleep(750);
233233
splash.setProgress(92, "Aquring data: Multiplayer");
234234
Thread.sleep(200);
235235
Jdata_Host = JOptionPane.showConfirmDialog(game, "Do you want to be the HOST?");
236236
Thread.sleep(200);
237-
if(Jdata_Host == 0){
238-
splash.setProgress(95, "Aquring data: Username");
239-
Thread.sleep(200);
240-
Jdata_UserName = JOptionPane.showInputDialog(game, "Enter a name");
241-
Thread.sleep(200);
242-
}
237+
splash.setProgress(95, "Aquring data: Username");
238+
Thread.sleep(200);
239+
splash.setProgress(96, "Initalizing as Server:Host");
240+
Jdata_UserName = JOptionPane.showInputDialog(game, "Enter a name");
241+
splash.setProgress(97, "Connecting as" + Jdata_UserName);
242+
Thread.sleep(500);
243243
splash.splashOff();
244244
new Game().start();
245245
} catch (Exception e) {

0 commit comments

Comments
 (0)