task 9
@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# Specifies the map used by the opponent in single mode.
|
# Specifies the map used by the opponent in single mode.
|
||||||
# Single mode is activated if this property is set.
|
# Single mode is activated if this property is set.
|
||||||
#map.opponent=maps/map2.json
|
map.opponent=maps/map2.json
|
||||||
#
|
#
|
||||||
# Specifies the map used by the player in single mode.
|
# Specifies the map used by the player in single mode.
|
||||||
# The player must define their own map if this property is not set.
|
# The player must define their own map if this property is not set.
|
||||||
|
@ -249,8 +249,8 @@ public class BattleshipApp extends SimpleApplication implements BattleshipClient
|
|||||||
private void setupInput() {
|
private void setupInput() {
|
||||||
inputManager.deleteMapping(INPUT_MAPPING_EXIT);
|
inputManager.deleteMapping(INPUT_MAPPING_EXIT);
|
||||||
inputManager.setCursorVisible(false);
|
inputManager.setCursorVisible(false);
|
||||||
inputManager.addMapping(ESC, new KeyTrigger(KeyInput.KEY_ESCAPE));
|
|
||||||
inputManager.addMapping(CLICK, new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
|
inputManager.addMapping(CLICK, new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
|
||||||
|
inputManager.addMapping(ESC, new KeyTrigger(KeyInput.KEY_ESCAPE));
|
||||||
inputManager.addListener(escapeListener, ESC);
|
inputManager.addListener(escapeListener, ESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,14 +309,18 @@ public class BattleshipApp extends SimpleApplication implements BattleshipClient
|
|||||||
*
|
*
|
||||||
* @param isPressed Indicates whether the Escape key is pressed.
|
* @param isPressed Indicates whether the Escape key is pressed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private void escape(boolean isPressed) {
|
private void escape(boolean isPressed) {
|
||||||
if (!isPressed) return;
|
if (!isPressed) return;
|
||||||
if (dialogManager.showsDialog())
|
LOGGER.log(Level.INFO, "Escape key pressed"); // Debugging
|
||||||
|
if (dialogManager.showsDialog()) {
|
||||||
|
LOGGER.log(Level.INFO, "Closing current dialog");
|
||||||
dialogManager.escape();
|
dialogManager.escape();
|
||||||
else
|
} else {
|
||||||
|
LOGGER.log(Level.INFO, "Opening menu");
|
||||||
new Menu(this).open();
|
new Menu(this).open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link Draw} instance used for rendering graphical elements in the game.
|
* Returns the {@link Draw} instance used for rendering graphical elements in the game.
|
||||||
*
|
*
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package pp.battleship.client.gui;
|
package pp.battleship.client.gui;
|
||||||
|
|
||||||
|
|
||||||
import com.jme3.material.Material;
|
import com.jme3.material.Material;
|
||||||
import com.jme3.material.RenderState.BlendMode;
|
import com.jme3.material.RenderState.BlendMode;
|
||||||
import com.jme3.math.ColorRGBA;
|
import com.jme3.math.ColorRGBA;
|
||||||
@ -35,6 +36,9 @@ import static pp.util.FloatMath.PI;
|
|||||||
class SeaSynchronizer extends ShipMapSynchronizer {
|
class SeaSynchronizer extends ShipMapSynchronizer {
|
||||||
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
||||||
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
|
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
|
||||||
|
private static final String BOAT_SMALL_MODEL = "Models/BoatSmall/12219_boat_v2_L2.j3o"; //NON-NLS
|
||||||
|
private static final String CV_MODEL = "Models/CV/CV.j3o"; //NON-NLS
|
||||||
|
private static final String BATTLE_MODEL = "Models/Battle/Battle.j3o"; //NON-NLS
|
||||||
private static final String COLOR = "Color"; //NON-NLS
|
private static final String COLOR = "Color"; //NON-NLS
|
||||||
private static final String SHIP = "ship"; //NON-NLS
|
private static final String SHIP = "ship"; //NON-NLS
|
||||||
private static final String SHOT = "shot"; //NON-NLS
|
private static final String SHOT = "shot"; //NON-NLS
|
||||||
@ -45,6 +49,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
private final ShipMap map;
|
private final ShipMap map;
|
||||||
private final BattleshipApp app;
|
private final BattleshipApp app;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a {@code SeaSynchronizer} object with the specified application, root node, and ship map.
|
* Constructs a {@code SeaSynchronizer} object with the specified application, root node, and ship map.
|
||||||
*
|
*
|
||||||
@ -69,7 +74,20 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Spatial visit(Shot shot) {
|
public Spatial visit(Shot shot) {
|
||||||
return shot.isHit() ? handleHit(shot) : createCylinder(shot);
|
return shot.isHit() ? handleHit(shot) : handleMiss(shot);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles a miss by representing it with a blue cylinder
|
||||||
|
* and attaching a water splash effect to it.
|
||||||
|
* @param shot the shot to be processed
|
||||||
|
* @return a Spatial simulating a miss with water splash effect
|
||||||
|
*/
|
||||||
|
private Spatial handleMiss(Shot shot) {
|
||||||
|
Node shotNode = new Node("ShotNode");
|
||||||
|
Geometry shotCylinder = createCylinder(shot);
|
||||||
|
shotNode.attachChild(shotCylinder);
|
||||||
|
return shotNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,17 +95,10 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
* contains the ship model as a child so that it moves with the ship.
|
* contains the ship model as a child so that it moves with the ship.
|
||||||
*
|
*
|
||||||
* @param shot a hit
|
* @param shot a hit
|
||||||
* @return always null to prevent the representation from being attached
|
* @return always null to prevent the representation from being attached to the items node as well
|
||||||
* to the items node as well
|
|
||||||
*/
|
*/
|
||||||
private Spatial handleHit(Shot shot) {
|
private Spatial handleHit(Shot shot) {
|
||||||
final Battleship ship = requireNonNull(map.findShipAt(shot), "Missing ship");
|
final Battleship ship = requireNonNull(map.findShipAt(shot), "Missing ship");
|
||||||
final Node shipNode = requireNonNull((Node) getSpatial(ship), "Missing ship node");
|
|
||||||
|
|
||||||
final Geometry representation = createCylinder(shot);
|
|
||||||
representation.getLocalTranslation().subtractLocal(shipNode.getLocalTranslation());
|
|
||||||
shipNode.attachChild(representation);
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +152,13 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
* @return the spatial representing the battleship
|
* @return the spatial representing the battleship
|
||||||
*/
|
*/
|
||||||
private Spatial createShip(Battleship ship) {
|
private Spatial createShip(Battleship ship) {
|
||||||
return ship.getLength() == 4 ? createBattleship(ship) : createBox(ship);
|
switch (ship.getLength()) {
|
||||||
|
case 4: return createBattleship(ship);
|
||||||
|
case 3: return createCV(ship);
|
||||||
|
case 2: return createBattle(ship);
|
||||||
|
case 1: return createSmallship(ship);
|
||||||
|
default: return createBox(ship);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,6 +208,57 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
|
|
||||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
model.scale(1.48f);
|
model.scale(1.48f);
|
||||||
|
// model.scale(0.0007f);
|
||||||
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a detailed 3D model to represent a small tug boat.
|
||||||
|
*
|
||||||
|
* @param ship the battleship to be represented
|
||||||
|
* @return the spatial representing a small tug boat
|
||||||
|
*/
|
||||||
|
private Spatial createSmallship(Battleship ship) {
|
||||||
|
final Spatial model = app.getAssetManager().loadModel(BOAT_SMALL_MODEL);
|
||||||
|
|
||||||
|
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
|
model.scale(0.0005f);
|
||||||
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a detailed 3D model to represent a "German WWII UBoat".
|
||||||
|
*
|
||||||
|
* @param ship the battleship to be represented
|
||||||
|
* @return the spatial representing the "German WWII UBoat"
|
||||||
|
*/
|
||||||
|
private Spatial createCV(Battleship ship) {
|
||||||
|
final Spatial model = app.getAssetManager().loadModel(CV_MODEL);
|
||||||
|
|
||||||
|
model.rotate(0f, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
|
model.move(0f, 0.25f, 0f);
|
||||||
|
model.scale(0.85f);
|
||||||
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a detailed 3D model to represent a battleship.
|
||||||
|
*
|
||||||
|
* @param ship the battleship to be represented
|
||||||
|
* @return the spatial representing a battleship
|
||||||
|
*/
|
||||||
|
private Spatial createBattle(Battleship ship) {
|
||||||
|
final Spatial model = app.getAssetManager().loadModel(BATTLE_MODEL);
|
||||||
|
|
||||||
|
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
|
model.move(0f, -0.06f, 0f);
|
||||||
|
model.scale(0.27f);
|
||||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
|
@ -1,205 +0,0 @@
|
|||||||
////////////////////////////////////////
|
|
||||||
// Programming project code
|
|
||||||
// UniBw M, 2022, 2023, 2024
|
|
||||||
// www.unibw.de/inf2
|
|
||||||
// (c) Mark Minas (mark.minas@unibw.de)
|
|
||||||
////////////////////////////////////////
|
|
||||||
|
|
||||||
package pp.battleship.client.server;
|
|
||||||
|
|
||||||
import com.jme3.network.ConnectionListener;
|
|
||||||
import com.jme3.network.HostedConnection;
|
|
||||||
import com.jme3.network.Message;
|
|
||||||
import com.jme3.network.MessageListener;
|
|
||||||
import com.jme3.network.Network;
|
|
||||||
import com.jme3.network.Server;
|
|
||||||
import com.jme3.network.serializing.Serializer;
|
|
||||||
import pp.battleship.BattleshipConfig;
|
|
||||||
import pp.battleship.game.server.Player;
|
|
||||||
import pp.battleship.game.server.ServerGameLogic;
|
|
||||||
import pp.battleship.game.server.ServerSender;
|
|
||||||
import pp.battleship.message.client.ClientMessage;
|
|
||||||
import pp.battleship.message.client.MapMessage;
|
|
||||||
import pp.battleship.message.client.ShootMessage;
|
|
||||||
import pp.battleship.message.server.EffectMessage;
|
|
||||||
import pp.battleship.message.server.GameDetails;
|
|
||||||
import pp.battleship.message.server.ServerMessage;
|
|
||||||
import pp.battleship.message.server.StartBattleMessage;
|
|
||||||
import pp.battleship.model.Battleship;
|
|
||||||
import pp.battleship.model.IntPoint;
|
|
||||||
import pp.battleship.model.Shot;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.System.Logger;
|
|
||||||
import java.lang.System.Logger.Level;
|
|
||||||
import java.util.concurrent.BlockingQueue;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
|
||||||
import java.util.logging.LogManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Server implementing the visitor pattern as MessageReceiver for ClientMessages
|
|
||||||
*/
|
|
||||||
public class BattleshipServer implements MessageListener<HostedConnection>, ConnectionListener, ServerSender {
|
|
||||||
private static final Logger LOGGER = System.getLogger(BattleshipServer.class.getName());
|
|
||||||
private static final File CONFIG_FILE = new File("server.properties");
|
|
||||||
|
|
||||||
private final BattleshipConfig config = new BattleshipConfig();
|
|
||||||
private Server myServer;
|
|
||||||
private final ServerGameLogic logic;
|
|
||||||
private final BlockingQueue<ReceivedMessage> pendingMessages = new LinkedBlockingQueue<>();
|
|
||||||
private boolean running = true; // Condition for stopping the server
|
|
||||||
|
|
||||||
static {
|
|
||||||
// Configure logging
|
|
||||||
LogManager manager = LogManager.getLogManager();
|
|
||||||
try {
|
|
||||||
manager.readConfiguration(new FileInputStream("logging.properties"));
|
|
||||||
LOGGER.log(Level.INFO, "Successfully read logging properties"); //NON-NLS
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
LOGGER.log(Level.INFO, e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts the Battleships server.
|
|
||||||
*/
|
|
||||||
public static void main(String[] args) {
|
|
||||||
new BattleshipServer().run();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the server.
|
|
||||||
*/
|
|
||||||
BattleshipServer() {
|
|
||||||
config.readFromIfExists(CONFIG_FILE);
|
|
||||||
LOGGER.log(Level.INFO, "Configuration: {0}", config); //NON-NLS
|
|
||||||
logic = new ServerGameLogic(this, config);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void run() {
|
|
||||||
startServer();
|
|
||||||
try {
|
|
||||||
while (running) {
|
|
||||||
processNextMessage();
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
stopServer(); // Stop the server when the loop exits
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts the server and initializes required settings.
|
|
||||||
*/
|
|
||||||
private void startServer() {
|
|
||||||
try {
|
|
||||||
LOGGER.log(Level.INFO, "Starting server..."); //NON-NLS
|
|
||||||
myServer = Network.createServer(config.getPort());
|
|
||||||
initializeSerializables();
|
|
||||||
myServer.start();
|
|
||||||
registerListeners();
|
|
||||||
LOGGER.log(Level.INFO, "Server started: {0}", myServer.isRunning()); //NON-NLS
|
|
||||||
} catch (IOException e) {
|
|
||||||
LOGGER.log(Level.ERROR, "Couldn't start server: {0}", e.getMessage()); //NON-NLS
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops the server and closes all connections.
|
|
||||||
*/
|
|
||||||
private void stopServer() {
|
|
||||||
LOGGER.log(Level.INFO, "Stopping server..."); //NON-NLS
|
|
||||||
if (myServer != null) {
|
|
||||||
for (HostedConnection client : myServer.getConnections()) {
|
|
||||||
if (client != null) client.close("Game over");
|
|
||||||
}
|
|
||||||
myServer.close();
|
|
||||||
LOGGER.log(Level.INFO, "Server stopped."); //NON-NLS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gracefully stops the server loop by setting the running flag to false.
|
|
||||||
*/
|
|
||||||
public void stop() {
|
|
||||||
running = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void processNextMessage() {
|
|
||||||
try {
|
|
||||||
pendingMessages.take().process(logic);
|
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
LOGGER.log(Level.INFO, "Interrupted while waiting for messages"); //NON-NLS
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeSerializables() {
|
|
||||||
Serializer.registerClass(GameDetails.class);
|
|
||||||
Serializer.registerClass(StartBattleMessage.class);
|
|
||||||
Serializer.registerClass(MapMessage.class);
|
|
||||||
Serializer.registerClass(ShootMessage.class);
|
|
||||||
Serializer.registerClass(EffectMessage.class);
|
|
||||||
Serializer.registerClass(Battleship.class);
|
|
||||||
Serializer.registerClass(IntPoint.class);
|
|
||||||
Serializer.registerClass(Shot.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerListeners() {
|
|
||||||
myServer.addMessageListener(this, MapMessage.class);
|
|
||||||
myServer.addMessageListener(this, ShootMessage.class);
|
|
||||||
myServer.addConnectionListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void messageReceived(HostedConnection source, Message message) {
|
|
||||||
LOGGER.log(Level.INFO, "message received from {0}: {1}", source.getId(), message); //NON-NLS
|
|
||||||
if (message instanceof ClientMessage clientMessage)
|
|
||||||
pendingMessages.add(new ReceivedMessage(clientMessage, source.getId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void connectionAdded(Server server, HostedConnection hostedConnection) {
|
|
||||||
LOGGER.log(Level.INFO, "new connection {0}", hostedConnection); //NON-NLS
|
|
||||||
logic.addPlayer(hostedConnection.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void connectionRemoved(Server server, HostedConnection hostedConnection) {
|
|
||||||
LOGGER.log(Level.INFO, "connection closed: {0}", hostedConnection); //NON-NLS
|
|
||||||
final Player player = logic.getPlayerById(hostedConnection.getId());
|
|
||||||
if (player == null)
|
|
||||||
LOGGER.log(Level.INFO, "closed connection does not belong to an active player"); //NON-NLS
|
|
||||||
else {
|
|
||||||
LOGGER.log(Level.INFO, "closed connection belongs to {0}", player); //NON-NLS
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void exit(int exitValue) {
|
|
||||||
LOGGER.log(Level.INFO, "close request"); //NON-NLS
|
|
||||||
stop();
|
|
||||||
System.exit(exitValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send the specified message to the specified connection.
|
|
||||||
*
|
|
||||||
* @param id the connection id
|
|
||||||
* @param message the message
|
|
||||||
*/
|
|
||||||
public void send(int id, ServerMessage message) {
|
|
||||||
if (myServer == null || !myServer.isRunning()) {
|
|
||||||
LOGGER.log(Level.ERROR, "no server running when trying to send {0}", message); //NON-NLS
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final HostedConnection connection = myServer.getConnection(id);
|
|
||||||
if (connection != null)
|
|
||||||
connection.send(message);
|
|
||||||
else
|
|
||||||
LOGGER.log(Level.ERROR, "there is no connection with id={0}", id); //NON-NLS
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
////////////////////////////////////////
|
|
||||||
// Programming project code
|
|
||||||
// UniBw M, 2022, 2023, 2024
|
|
||||||
// www.unibw.de/inf2
|
|
||||||
// (c) Mark Minas (mark.minas@unibw.de)
|
|
||||||
////////////////////////////////////////
|
|
||||||
|
|
||||||
package pp.battleship.client.server;
|
|
||||||
|
|
||||||
import pp.battleship.message.client.ClientInterpreter;
|
|
||||||
import pp.battleship.message.client.ClientMessage;
|
|
||||||
|
|
||||||
record ReceivedMessage(ClientMessage message, int from) {
|
|
||||||
void process(ClientInterpreter interpreter) {
|
|
||||||
message.accept(interpreter, from);
|
|
||||||
}
|
|
||||||
}
|
|
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 9.3 KiB |
BIN
Projekte/battleship/client/src/main/resources/Models/CV/CV.j3o
Normal file
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 264 KiB |
BIN
Projekte/battleship/client/src/main/resources/Models/CV/_2.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
Projekte/battleship/client/src/main/resources/Models/CV/_6.png
Normal file
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 98 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 82 KiB |
BIN
Projekte/battleship/client/src/main/resources/Models/CV/prev.png
Normal file
After Width: | Height: | Size: 670 KiB |
@ -42,6 +42,9 @@ public class ModelExporter extends SimpleApplication {
|
|||||||
@Override
|
@Override
|
||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
export("Models/KingGeorgeV/King_George_V.obj", "KingGeorgeV.j3o"); //NON-NLS
|
export("Models/KingGeorgeV/King_George_V.obj", "KingGeorgeV.j3o"); //NON-NLS
|
||||||
|
export("Models/BoatSmall/12219_boat_v2_L2.obj", "BoatSmall.j3o"); //NON-NLS
|
||||||
|
export("Models/Battle/14084_WWII_Ship_German_Type_II_U-boat_v2_L1.obj", "Battle.j3o"); //NON-NLS
|
||||||
|
export("Models/CV/essex_scb-125_generic.obj", "CV.j3o"); //NON-NLS
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||||
|
# File Created: 29.03.2012 14:25:39
|
||||||
|
|
||||||
|
newmtl default
|
||||||
|
Ns 35.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 1.0000 1.0000 1.0000
|
||||||
|
Kd 1.0000 1.0000 1.0000
|
||||||
|
Ks 0.5400 0.5400 0.5400
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
map_Ka 14084_WWII_ship_German_Type_II_U-boat_diff.jpg
|
||||||
|
map_Kd 14084_WWII_ship_German_Type_II_U-boat_diff.jpg
|
After Width: | Height: | Size: 168 KiB |
@ -0,0 +1,104 @@
|
|||||||
|
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||||
|
# File Created: 16.12.2011 14:18:52
|
||||||
|
|
||||||
|
newmtl white
|
||||||
|
Ns 53.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 0.6667 0.6667 0.6667
|
||||||
|
Kd 0.6667 0.6667 0.6667
|
||||||
|
Ks 0.1800 0.1800 0.1800
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
|
||||||
|
newmtl boat_elements_black
|
||||||
|
Ns 55.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 0.0000 0.0000 0.0000
|
||||||
|
Kd 0.0000 0.0000 0.0000
|
||||||
|
Ks 0.3600 0.3600 0.3600
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
|
||||||
|
newmtl boat_glass
|
||||||
|
Ns 60.0000
|
||||||
|
Ni 7.0000
|
||||||
|
d 0.4000
|
||||||
|
Tr 0.6000
|
||||||
|
Tf 0.4000 0.4000 0.4000
|
||||||
|
illum 2
|
||||||
|
Ka 0.1059 0.1569 0.1451
|
||||||
|
Kd 0.1059 0.1569 0.1451
|
||||||
|
Ks 0.6750 0.6750 0.6750
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
|
||||||
|
newmtl boat_screw_hooks_bronze
|
||||||
|
Ns 80.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 0.2941 0.2157 0.0510
|
||||||
|
Kd 0.2941 0.2157 0.0510
|
||||||
|
Ks 0.7200 0.7200 0.7200
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
|
||||||
|
newmtl boat_silver
|
||||||
|
Ns 80.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 0.3333 0.3333 0.3333
|
||||||
|
Kd 0.3333 0.3333 0.3333
|
||||||
|
Ks 0.7200 0.7200 0.7200
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
|
||||||
|
newmtl boat_buffer
|
||||||
|
Ns 10.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 1.0000 1.0000 1.0000
|
||||||
|
Kd 1.0000 1.0000 1.0000
|
||||||
|
Ks 0.2700 0.2700 0.2700
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
map_Ka boat_buffer_diffuse.jpg
|
||||||
|
map_Kd boat_buffer_diffuse.jpg
|
||||||
|
|
||||||
|
newmtl boat_roof_accessory
|
||||||
|
Ns 15.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 1.0000 1.0000 1.0000
|
||||||
|
Kd 1.0000 1.0000 1.0000
|
||||||
|
Ks 0.3600 0.3600 0.3600
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
map_Ka boat_roof_accessory_diffuse.jpg
|
||||||
|
map_Kd boat_roof_accessory_diffuse.jpg
|
||||||
|
|
||||||
|
newmtl boat_body
|
||||||
|
Ns 55.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 1.0000 1.0000 1.0000
|
||||||
|
Kd 1.0000 1.0000 1.0000
|
||||||
|
Ks 0.3600 0.3600 0.3600
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
map_Ka boat_body_diffuse.jpg
|
||||||
|
map_Kd boat_body_diffuse.jpg
|
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 264 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 98 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 79 B |
After Width: | Height: | Size: 78 B |