Skip to content

Commit

Permalink
release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
raydac committed Sep 26, 2021
1 parent e1a06f7 commit 726ad01
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 29 deletions.
113 changes: 90 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,77 @@

> A company called Game Federation in Sweden had created games for the Palm Pilot. They had employed Russian developers. - [Mikko Honkakorpi](https://www.linkedin.com/in/mikkoh/), ["Finnish Video Games: History and Catalog"](https://www.amazon.com/Finnish-Video-Games-History-Catalog/dp/0786499621) p.93
# Changelog

## 1.1.0 (26-sep-2021)

- __PC: added serverless LAN network game mode__
- PC: embedded JDK updated to 17+35
- PC: improved send of fire request through network in the end of fire animation
- PC: refactoring

## 1.0.3 (23-may-2021)

- PC: mproved select of start frame for ships
- PC: fixed ratio of morse2 sound
- PC: improved select of firing ship to make better probability for air-carrier and dreadnoughts

[Full changelog](changelog.txt)

# Disclaimer
__All Copyrights to both graphics and sound stuff belong to their authors. The project is already 20 years old, and I can't find any footsteps of companies involved into the project. All sources and materials have been published just to be saved for history and as an example of game programming in Java for who may concern.__

__All Copyrights to both graphics and sound stuff belong to their authors. The project is already 20 years old, and I
can't find any footsteps of companies involved into the project. All sources and materials have been published just to
be saved for history and as an example of game programming in Java for who may concern.__

# What is it?

It is just a commemorative project in an attempt to restore and save old archived sources found on my disks.

The Battleships game project was started in the beginning of 2001 under umbrella of Ru-Soft Ltd. (Russia) by order of Gamefederation company (Sweden) and had to be completed before the E3 2001 exhibition start. I have written pair articles on [habr.com](https://habr.com/ru/post/458124/) and in [my blog](http://raydac.blogspot.com/2015/05/the-battleships-game-e3-2001.html). The project took about 2.5 months and was successfully completed in time. For me the project is remarkable one because it was my first game experience in J2ME world (a year later I would take part in a big mobile project for a Finnish company to produce 20 mobile games in two months).
The Battleships game project was started in the beginning of 2001 under umbrella of Ru-Soft Ltd. (Russia) by order of
Gamefederation company (Sweden) and had to be completed before the E3 2001 exhibition start. I have written pair
articles on [habr.com](https://habr.com/ru/post/458124/) and
in [my blog](http://raydac.blogspot.com/2015/05/the-battleships-game-e3-2001.html). The original project took about 2.5
months and was successfully completed in time. For me the project is remarkable one because it was my first game
experience in J2ME world (a year later I took a part in a big mobile project for a Finnish company to produce 20 mobile
games in two months).

The restored PC client has been written entirely in Java 11 without any 3-th side library, and it can be used as some
example of Java programming for casual desktop games.

# Screen-cast
There is short screen-cast of a game session including GFX-compatible server, restored PC-client and emulated Motorola A008 client.

There is short screen-cast of a game session including GFX-compatible server, restored PC-client and emulated Motorola
A008 client.

[![Link to the youtube screen-cast](assets/game-session-screenshot-youtube.jpg)](http://www.youtube.com/watch?v=f1cfqRjnRgk "Battleships screencast")

# Pre-built components

| OS | Download link |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![Windows](assets/icons/win64x64.png) | __[Game client for Windows x64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/battleships-resurrection-1.0.3-windows-amd64-jdk.zip)__ |
| ![OSX](assets/icons/macos64x64.png) | __[Game client for OSX x64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/battleships-resurrection-1.0.3-macos-amd64-jdk.zip)__ |
| ![OSX Arm64](assets/icons/macosarm64x64.png) | __[Game client for OSX Arm64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/battleships-resurrection-1.0.3-macos-arm64-jdk.zip)__ |
| ![Linux](assets/icons/linux64x64.png) | __[Game client for Linux x64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/battleships-resurrection-1.0.3-linux-amd64-jdk.tar.gz)__ |
| ![Java](assets/icons/java64x64.png) | __[Game client, cross-platform JAR file](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/battleships-resurrection-1.0.3.jar)__ |
| ![Java](assets/icons/java64x64.png) | _[pre-built GFX-compatible server (only JAR)](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/gfx-playroom-server-1.0.3.jar)_ |
| ![Java](assets/icons/java64x64.png) | _[pre-built J2ME midlet for Motorola A008 (zipped JAD+JAR)](https://github.com/raydac/battleships-resurrection/releases/download/1.0.3/BattleShip_A008.zip)_ |
| ![Windows](assets/icons/win64x64.png) | __[Game client for Windows x64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/battleships-resurrection-1.1.0-windows-jdk-amd64.zip)__ |
| ![OSX](assets/icons/macos64x64.png) | __[Game client for OSX x64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/battleships-resurrection-1.1.0-macos-jdk-amd64.zip)__ |
| ![OSX Arm64](assets/icons/macosarm64x64.png) | __[Game client for OSX Arm64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/battleships-resurrection-1.1.0-macos-jdk-aarch64.zip)__ |
| ![Linux](assets/icons/linux64x64.png) | __[Game client for Linux x64 (JRE included)](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/battleships-resurrection-1.1.0-linux-jdk-amd64.tar.gz)__ |
| ![Java](assets/icons/java64x64.png) | __[Game client, cross-platform JAR file](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/battleships-resurrection-1.1.0.jar)__ |
| ![Java](assets/icons/java64x64.png) | _[pre-built GFX-compatible server (only JAR)](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/gfx-playroom-server-1.1.0.jar)_ |
| ![Java](assets/icons/java64x64.png) | _[pre-built J2ME midlet for Motorola A008 (zipped JAD+JAR)](https://github.com/raydac/battleships-resurrection/releases/download/1.1.0/BattleShip_A008.zip)_ |

# Short historical review
I took a part in the project as a Java developer and both the network communication part, and the mobile game client were in my responsibility. The original PC game client was developed by another two developers in C++ exclusively for Windows (it strongly required Direct3D for work).

Initially artists developed very detailed and smooth graphics and PC client got size about 160 Mb but then guys from Gamefederation notified us that they were going to load the PC client distributive during presentation and 160 Mb was too big size for network in 2001. As solution, the game graphics was reworked, and it started look a bit blurry. The resulted PC client size was decreased to about 60 Mb.
I took a part in the project as a Java developer and both the network communication part, and the mobile game client
were in my responsibility. The original PC game client was developed by another two developers in C++ exclusively for
Windows (it strongly required Direct3D for work).

The network part was entirely implemented in Java 1.2 and communicated with C++ part through JNI. The mobile client for Motorola A008 was written in J2ME (MIDP1.0/CLDC1.0 profile).
Initially artists developed very detailed and smooth graphics and PC client got size about 160 Mb but then guys from
Gamefederation notified us that they were going to load the PC client distributive during presentation and 160 Mb was
too big size for network in 2001. As solution, the game graphics was reworked, and it started look a bit blurry. The
resulted PC client size was decreased to about 60 Mb.

## Team

All guys directly involved in management and development in 2001 (as I recall):
All guys directly involved in management and development in 2001 (as I recall):

### Producing

Expand Down Expand Up @@ -70,26 +107,56 @@ All guys directly involved in management and development in 2001 (as I recall):
# Requirements to build

## Mobile client
The mobile client is most hard part today to be built because it requires Sun WTK 2.5.2 and JDK 1.5, they both can be still found on Oracle site, but I am not sure that the picture will be the same during next several years. I have restored some Motorola A008 device profile for the WTK, and it can be used to get picture of working device. To be honesty I have not ever saw working mobile client on the real device because during development it was an absolutely new device with GPRS support and guys in Sweden had to visit the Sweden Motorola laboratory to test the client to write report for me, it was very long way to debug.

The mobile client is most hard part today to be built because it requires Sun WTK 2.5.2 and JDK 1.5, they both can be
still found on Oracle site, but I am not sure that the picture will be the same during next several years. I have
restored some Motorola A008 device profile for the WTK, and it can be used to get picture of working device. To be
honesty I have not ever saw working mobile client on the real device because during development it was an absolutely new
device with GPRS support and guys in Sweden had to visit the Sweden Motorola laboratory to test the client to write
report for me, it was very long way to debug.

![A008 screenshot](battleships-resurrection/battleships-client-a008/assets/emulator_screenshot.jpg)

To build the mobile client from the project root, you need use maven profile `midlet` and tune paths in the pom to your installed JDK 1.5 and keep in mind that the `preverify` tool is presented only for Linux.
To build the mobile client from the project root, you need use maven profile `midlet` and tune paths in the pom to your
installed JDK 1.5 and keep in mind that the `preverify` tool is presented only for Linux.

## PC client
The PC client has been totally rewritten in pure Java 11. I didn't have sources of C++ client (only graphics and sound resources from the technical version), so that I had to restore whole game process from the scratch (but I've made an endeavor to make it as much as possible close to the original one). The most terrible part was to calculate offsets and ship arrangements on the field because I had not any contact with designers of the original game and many steps I made through guesswork.

The new client is cross-platform one (in opposite to the original one which could work only under Windows with installed Direct3D) and there are versions for Windows, Linux and MacOS. The client jar file can be started on any platform where provided JDK 11 because it doesn't use any third-part libraries and only Swing+Java2D+JavaSound in use for media.
The PC client has been totally rewritten in pure Java 11. I didn't have sources of C++ client (only graphics and sound
resources from the technical version), so that I had to restore whole game process from the scratch (but I've made an
endeavor to make it as much as possible close to the original one). The most terrible part was to calculate offsets and
ship arrangements on the field because I had not any contact with designers of the original game and many steps I made
through guesswork.

The new client is cross-platform one (in opposite to the original one which could work only under Windows with installed
Direct3D) and there are versions for Windows, Linux and MacOS. The client jar file can be started on any platform where
provided JDK 11 because it doesn't use any third-part libraries and only Swing+Java2D+JavaSound in use for media.

| Original PC client (Windows 10) | Restored PC client (Ubuntu 20.04) |
| ----------------------------------------------------- | ------------------------------------------------ |
| ![Screenshot](assets/original_win_game_screenshot.jpg)|![Screenshot](assets/restored_game_screenshot.jpg)|

There is not any magic to build the PC client. The project has been formed as a regular maven project and can be build with `mvn`, if you want build cross-platform result images then use maven profile `publish`.
There is not any magic to build the PC client. The project has been formed as a regular maven project and can be build
with `mvn`, if you want build cross-platform result images then use maven profile `publish`.

## Multi-player modes

### GFX play-room

It is the original minimalistic GFX-compatible standalone play-room server which was prepared by me for E3 2001 in april

2001. I have no changes in its sources, and it contains all my one-year experience Java coding (I hope that after 20
years of Java programming my skills in programming a bit better). The server also formed as maven project and even
can be started directly through `exec:java`.

## GFX play-room server
I could not find either documents or presentations about the GFX platform on my disks. As I recall, the real
production-ready GFX server was delivered as a module for BEA WebLogic server. The standalone solution is not fully
production-ready because it was developed for restricted use in bounds of presentations but allows organising game
sessions between clients.

It is the original minimalistic GFX-compatible standalone play-room server which was prepared by me for E3 2001 in april 2001. I have no changes in its sources, and it contains all my one-year experience Java coding (I hope that after 20 years of Java programming my skills in programming a bit better).
The server also formed as maven project and even can be started directly through `exec:java`.
### LAN serverless

I could not find either documents or presentations about the GFX platform on my disks. As I recall, the real production-ready GFX server was delivered as a module for BEA WebLogic server. The standalone solution is not fully production-ready because it was developed for restricted use in bounds of presentations but allows organising game sessions between clients.
It is new multi-player mode allows organizing game between two PC clients in LAN (local area network). The mode requires
access for UDP-TCP ports to read-write. After start, you see in special dialog all PC clients in the LAN-network who are
ready for game, and you can send invitation to one of them or get request from them. After agreement the game will be
started.
2 changes: 1 addition & 1 deletion battleships-resurrection/battleships-client-a008/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>battleships-resurrection</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>battleships-client-a008</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion battleships-resurrection/battleships-client-pc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>battleships-resurrection</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>

<artifactId>battleships-client-pc</artifactId>
Expand Down
8 changes: 6 additions & 2 deletions battleships-resurrection/gfx-playroom-server/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
>Through our GFX technology, Gamefederation offers maximum value to game developers that will translate through the service provider to fulfill end-users' high demand for flexibility and user-friendliness. - Thomas Lindgren, CEO at Gamefederation, 12 June 2001
> Through our GFX technology, Gamefederation offers maximum value to game developers that will translate through the service provider to fulfill end-users' high demand for flexibility and user-friendliness. - Thomas Lindgren, CEO at Gamefederation, 12 June 2001

Just quickly made server from scratch to support multi-room game based on GFX technology, without any extra features,
Expand All @@ -9,4 +9,8 @@ the root. If you want start built server just from maven then use `mvn exec:java

# Historical remark

I was just a bit longer than one year in Java as started the project so that style looks absolutely terrible and bizarre from modern point of view. During development, I decided to use "long POST" operation to read data from the server and reinvented COMET technology, but it was 2001 and who knows, may be I was from the first ones. Markus Persson told me that they very liked such approach and would use it. But such approach didn't work well with mobile operators (as I recall) because many mobile operators made intermediate data buffering until whole stream end.
I was just a bit longer than one year in Java as started the project so that style looks absolutely terrible and bizarre
from modern point of view. During development, I decided to use "long POST" operation to read data from the server and
reinvented COMET technology, but it was 2001 and who knows, may be I was from the first ones. Markus Persson told me
that they very liked such approach and would use it. But such approach didn't work well with mobile operators (as I
recall) because many mobile operators made intermediate data buffering until whole stream end.
2 changes: 1 addition & 1 deletion battleships-resurrection/gfx-playroom-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.igormaznitsa</groupId>
<artifactId>battleships-resurrection</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>

<artifactId>gfx-playroom-server</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion battleships-resurrection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.igormaznitsa</groupId>
<artifactId>battleships-resurrection</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
<packaging>pom</packaging>

<properties>
Expand Down
26 changes: 26 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- 1.1.0 (26-sep-2021)
- __PC: added serverless LAN network game mode__
- PC: embedded JDK updated to 17+35
- PC: improved send of fire request through network in the end of fire animation
- PC: refactoring

- 1.0.3 (23-may-2021)
- PC: mproved select of start frame for ships
- PC: fixed ratio of morse2 sound
- PC: improved select of firing ship to make better probability for air-carrier and dreadnoughts

- 1.0.2 (25-mar-2021)

- PC: updated embedded OpenJDK to 16+36
- PC: updated Launch4J starter
- PC: minor improvements and fixes of form title show under different host-OS
- PC: fixed show of game cursor under MacOS
- PC: minor refactoring

- 1.0.1 (27-feb-2021)
- PC: reworked cursor sprite to image
- PC: improvements and fixes in full screen processing
- PC: added version for MacOS Aarch64

- 1.0.0 (31-jan-2021)
- initial release of restored version with old GFX play-room server support

0 comments on commit 726ad01

Please sign in to comment.