Tcp-22

A cross platform 3D graphics meta engine for Java

(still WiP on Github!)

The idea

Like Java provides the option for platform independent application development, the main idea of this project is to create 3D (game) applications with Java that run on several platforms like native Java, web browsers or Unity. Currently supported 3D engines are
JMonkeyEngine
The most straightforward approach, because JMonkeyEngine is also written in Java
ThreeJs
Java code is converted to JS code by GWT
Unity
Java code is converted to CS code by a simple language converter

Limitations

Like all platform independent solutions these hide some of the platform specific opportunities, so you cannot benefit from it. The major limitation currently is a lack for a good solution for platform independent shader programming.

Examples

Reference Scene
VR Scene
Showroom Scene
Gallery Scene

Use Case Maze Games

All maze games are based on the same maze game engine that uses a generic simple ASCII format for defining maze level. The game objective and all possible actions are derived from the level definition. So several different styles of maze games can be defined.

(See also Maze Games)

Sokoban

The famous game in a first person 3D view. Move the boxes to the indicated locations. This might be hard without top view, so differing to the original its also possible to pull boxes.

Mazes

Just a maze. No boxes to move and no items to collect. Objective is to find the exit. But be aware of monster that might bother you.

P-Man

Objective is to collect all diamonds in a maze. Be aware of monster that might bother you.

Dungeon

A maze with several rooms connected with corridors. Collect all diamonds. Uses the theme 'dungeon' which displays massive walls and a ceiling with simple wood textures.

Dungeon

A maze with several rooms connected with corridors. Collect all diamonds. Uses a theme 'dungeon' which displays massive walls and a ceiling combined with artwork textures.

Pulling a box needs a gap between box and player. Firing is only possible if the player has bullets (see inventory) and orthogonally.

Keyboard

Use arrow keys for moving and space for firing. Pull box by 'P'.

Touchscreen

Move by touching segments 3,5,7 on the screen. Segment 1 is for opening the control menu. Segment 4 is for firing.

VR

Use left or right controller stick for moving. Use right trigger to do an action like moving a box. The left controller has a wristwatch menu with buttons for

  • Move VR position up/down
  • Pulling a box

Use Case Traffic

Traffic

Vehicles moving on graph based tracks. Use 'M'/TouchSegment1 to open/toggle a menu and cursor keys for looking around in non VR. VR has control panel at the left wrist.

Wayland

A draft scenery created with 'osm-world-mesh'. A 'loc' moves on graph based tracks. Teleport ('t') to 'mobi' and fly it manually with PGUP/DOWN for speed and CUR*/a/d for controlling orientation.

Keyboard

Use shift CURLEFT/RIGHT for looking around. PGUP/DOWN for speed up/down. 't' for teleport.

Touchscreen

Move by touching segments 3,5,7 on the screen. Segment 1 is for opening the control menu.

VR

Use left or right controller stick for moving. The left controller has a wristwatch menu with buttons for

  • Move VR position up/down

Traffic Launch Settings

Settings for traffic scenes launched via the above buttons

offsetVR

User Controls

Controlling depends on the platform. In general, keys x/y/z can be used to fine tune the cameras position. See section 'maze' and 'traffic' for use case specific.

Launch Settings

Common settings for the scenes launched via the above buttons

Dev Mode
HUD
NearView
VR Control Panel
offsetVR
Team size

Credits

  • Thanks to the team of ThreeJs for their fantastic WebGl graphics engine.
  • Sokoban was invented by Hiroyuki Imabayashi and is copyrighted (C) 1982 by Thinking Rabbit Inc. Japan and later Falcon Co., Ltd., Japan.
  • Thanks to David Joffe for releasing 90 of his Sokoban levels to the public domain
  • Thanks to the team of JMonkeyEngine for their native Java 3D engine and to the team of LWJGL for making it all possible.
  • The CSG implementation is copyrighted by Evan Wallace .
  • Unity is copyrighted by Unity Technologies.
  • Thanks to Pat Niemeyer for his Java to Swift converter, which is the basis for the Java to CS converter.
  • Thanks to wovado (https://opengameart.org/content/stone-wall-1) for the stone wall textures. Thanks to cethiel (https://opengameart.org/content/tileable-bricks-ground-textures-set-1) for the ground textures.
  • Elevator ping 01 audio (mono/16) from https://freesound.org/people/MATRIXXX_/sounds/459349/ Elevator ping 03 audio (stereo/16) from https://freesound.org/people/MATRIXXX_/sounds/514864/ Ding audio (mono/24) from https://freesound.org/people/Aiwha/sounds/196106/
  • Thanks to Nasa for providing the shuttle 3D model "shut.3ds" from https://nasa3d.arc.nasa.gov/detail/shuttle-hi-res.
  • GLTF box sample by Cesium (https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/BoxTextured)
  • Earth textures (data/textures/earth) from Bjorn Sandviks https://github.com/turban/webgl-earth
  • GLTF AlphaBlendModeTest by Analytical Graphics, Inc. Ed Mackey (https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/AlphaBlendModeTest)