Overview Brief description of the game
JASTROBOTS is... going to be... a Java programming game that simulates large scale battles among fleets of starships on a planetary and possibly interstellar theatres of war. It is based on the development of Jrobots: Java Programming Battles an online Java programming game, but hopefully it'll give raise to a more complex and realistic game experience.
The story so far...
"Si vis pacem, para bellum" Vegetius
A long time ago, in a galaxy far, far away... a civilization developed a technology based on nuclear energy, advanced treatment of electromagnetic waves (EMWs) and efficient matter-antimatter (AM) energy conversions. The technology possessed by these intelligent species needs a lot of structures: Nuclear power plants, AM factories, ore mines and the foundries to refine it, factories that produce tools, instruments, transport means and weapons. Such a civilitation could build engines for outer space travels, colonize its star system and exploit the resources of the nearby planets. Then it could plan to expand its influence to the neighbourhoods of its star system and explore the planets of other systems. Unfortunately, our history teaches that even an advanced society is not immune from ruinous conflicts and, sad to say, this was the case, too.
This is the story background behind JASTROBOTS and a lot of different developments are possible. We can imagine two kinds of conflicts, but there are a lot of other examples, of course:
- Independence War
The first theatre of war takes place in a star system with two main inhabited planets. The first is the planet were the civilization evolved and developed its technology, while the other is a colony built to exploit the resources available on it. Year after year the inhabitants of the colony develop their own culture and habits, they could even think that the main planet has sweated enough the settlers and the resources of their planet and often the only way to solve the clash is waging war. It is a symmetric kind of conflict because both the players must attack the opponent or defend their positions and both the antagonists have full knowledge of the battle field.
- Invasion War
The second theatre takes place between two different civilizations that occupy two nearby star systems. Since interstellar travels are not so fast and simple to model considering relativistic effects, the game begins when the fleet of one of the players enters the opponent's star system. Many are the reasons for such an invasion: For example, one can imagine that the attacker's planet can't support its population any more, so the player needs to conquer the defender's planet without inflicting too many damages. This conflict is not symmetric and the attacker possesses no knowledge of the battle field at the beginning of the war, while the defender is not aware of the main direction of the attack.
Modelling Reality
"Do you believe that's air you are breathing now?" Morpheus
JASTROBOTS is not so complex that a player can't afford to play it, but it is better managed by a team of players on each side. A too realistic simulator slows down the game and increases the management difficulties, while a too simple and schematic one can be boredom and not enough involving. This means that a fine tuning of the features of the simulator is fundamental.
Now a few notes about the simulator follows. A more datailed discussion of these notes can be found in the next chapters. The paragraphs marked with "Basic Implementation" refers to the first version of the game. Advanced versions might improve the basic choices.
First of all, consider the environment where the battles take place.
The theatre of war is a star system. To model it we must include at least stars, planets and satellites:
- Stars
The region of the galaxy taken into account has a typical mean distance between stars. All the stars of this cluster orbit around the center of the galaxy. There is at least one star in every star system. Every star has a radius, a mass and a surface temperature that determines its electromagnetic emission in frequency and power according to the laws you can read in the physics section.
Basic Implementation
- No systems with multiple stars
- The star is at rest in the absolute reference frame (ARF) - more about this in the physics section
- The star emits single frequency photons.
- Planets
The stars all around are at least of second generation so there is plenty of heavy chemical elements that form other celestial bodies. Every star is surrounded by zero or more planets. The planets are subject to the newtonian laws of gravitation. Every planet has a radius, a mass and an angular velocity. A gaseous atmosphere might surround the planet and the surface might be irregular with solid and liquid zones. The planet reflects the light of the nearest star with a typical diffusion factor.
Basic Implementation
- The orbits of the planets are perfect circles with a fixed distance from the central star
- Orbits of different planets are far enough to drop gravitational effects among them
- Planets have no surface structure: They are perfect solid spheres
- The atmosphere, if present, is uniform and composed by an idal gas
- Satellites
The planets are surrounded by zero or more satellites. The satellites are subject to the newtonian laws of gravitation. Every satellite has a radius, a mass and an angular velocity. A gaseous atmosphere might surround the satellite and the surface might be irregular with solid and liquid zones. The satellite reflects the light of the nearest star with a typical diffusion factor.
Basic Implementation
- The orbits of the satellites are perfect circles with a fixed distance from the planet
- Orbits of different satellites are far enough to drop gravitational effects among them
- Satellites have no surface structure: They are perfect solid spheres
- No atmosphere is present
Then, consider how the parts of the environment interact.
To reduce the complexity of the game one can't dare to model the environment without the adoption of some approximations, but these must be chosen to avoid strange behaviours and unrealistic effects. The main branches of physics needed are Newtonian mechanics, electromagnetic waves physics and a bit of thermodynamics:
- Newtonian Laws of Gravitation and Inertia
These laws are used to model the motion of celestial bodies and outer space objects including vehicles. To improve realism a rigid body simulator and a simple collision detection algorithm are needed.
Outer space vehicles can interact with the atmosphere of the planets and each other, when in close contact. The propulsion of the vehicles is produced by the usual rocket laws.
The simulator needs an integrator to solve the equations of motion of the different bodies.
Basic Implementation
- The simulator uses a fixed step Euler integrator and a Verlet integration scheme
- Integrator apart no other approximation is applied to the newtonian laws
- Vehicles have a simple boxed geometry and the inner masses are distributed uniformly
- Some devices used by hehicles can emit jets of matter or EMWs
- Effects of planets and satellites on vehicles are considered only if they are above a fixed threshold
- No relativistic effects, except the constancy of the speed of light, are taken into account. The velocity of the starships is going to be sufficiently low during the battles
- Electromagnetic Waves Physics
The physics of electromagnetic waves is the most complex part of the simulator. The light speed has a finite value, so one must track all the electromagnetic signals and light rays all around. In addition, light acts in various ways depending on the hit surface. Since EMWs are used in combat as a mean to inflict damages (see the technology section below) and even as a transport mean, the model of light and in general of EMWs is important to achieve a credible level of realism. A more detailed description of the physics of light can be found in a chapter below.
Basic Implementation
- The solar wind generated by the central star permits the use of solar sails (more about this in the technology section)
- Some devices can emit spherical EMWs
- Some devices can emit light rays (laser)
- Some devices can detect EMWs and light received in a cone shaped region. Long exposure time and high incident energy can damage the device
- EMWs are subject to the laws of reflection and absorption
- The surface materials of the vehicles can emit EMWs according to their temperature
- The surface materials absorb incident EMWs. Heat capacity and fusion temperature must be taken into account
- Thermodynamics
Some devices included in starships are subject to restrictions in the applied acceleration and the range of temperatures. Heat exchanges rule the last restriction.
Basic Implementation
- Some devices can heat receiving energy from other devices and can radiate that heat in the form of EMWs
Finally, consider the technology developed by the civilization.
The intelligent species populating the star system need power sources to sustain the different devices, a kind of propulsion to move in outer space, devices to emit and detect EMWs to communicate, probe the surrounding space, detect light and infrared waves and, finally, offensive and defensive weapons to disable enemy units and repel their attacks. Most of these tools use EMWs to perform their actions so one can concentrate on a specialized and at the same time versatile simulator. Let's consider a detailed list of these tools in sparse order referred to their typical use in outer space vehicles:
- Hulls, Devices and Connections
The meaning of the word hull in this acception regards a shell that contains a number of different devices. A hull with all its inner devices can be interpreted as a vehicle (space stations, battleships, carriers, fighters, bombers, missiles, probes, heavy and light transports etc.) or as a surface structure (headquarters, buildings, power plants, storehouses, observatories, factories, mines and so on).
Basic Implementation
- Every kind of device has a volume, a mass, a temperature and other scalar or vectorial properties. When a set of devices is collected together, it forms a hull that must have enough volume to include the sum of the volumes of the devices plus the tickness of the hull. The mass of the vehicle or the structure built is equal to the sum of the masses of the devices (plus the mass of the hull itself given by its tickness and the density of its material)
- The shape of the hull is a simple box with height, width and depth and the overall mass of the hull is considered uniformly distributed on the occupied volume
- The material of the hull can interact with incident EMWs and reflect or absorb them. Too much incident energy can overheat the hull causing fusion and the destruction of the unit (it happens, for example, when a nuclear explosion takes place within a certain distance from the hull). Some materials can change their absorption coefficient to absorb enough EMWs to be invisible to telescopes or to reflect a large amount of laser rays and nuclear explosion radiations to preserve hull integrity
- Some devices need to be connected to other devices to exchange energy, heat, materials or information, so its available a mechanism to define these links. Connections transport a single property in a well defined direction or in both directions from a device to another. For example, a nuclear reactor must be linked to any device that needs power with power lines and a radiator must be linked with a heat conductor to laser cannons to refrigerate them
- Some devices have special properties that define their status. The status can change when a number of conditions are reached. For example, consider the cockpit of a fighter that constains a pilot or the deck of a carrier or battleship that contains the crew: When the temperature is out of a certain range of values or the acceleration raises above a certain threshold the status of the pilot or the crew changes from ALIVE to DEAD
- Some devices need to be connected to the hull to perform some special task. For example, a portal device is used by bombers and fighters to get out of carriers and two vectorial properties define the location of the portal relative to the center of mass (CM) of the hull and the out direction. Other examples are propulsion devices (two vectors give the location of the engine and the direction of the jet), laser cannons (two vectors give the location of the cannon and the direction of the shot) and so on
- Propulsion engines
The main kinds of propulsion devices are rockets and solar sails.
The first ones use the action-reaction newtonian law to propel the vehicle in the opposite direction of a jet of matter or EMWs. This kind of engine requires fuel stored on the vehicle and the mass of this fuel influences the motion. The most important factors are the exhaust speed and mass (when applicable).
The last propulsion method uses large sails to intercept the solar wind or the light emitted by powerful lasers to propel the vehicle. The light is reflected by the sail and the neat effect is an acceleration in the direction given by the variation of the momentum of the incident light. Sails must be very large to produce useful effects on heavy vehicles, so this kind of propulsion is not very practical and manageable in a combat condition.
Basic Implementation
- Solar sails are very light and thin reflective square surfaces fixed to the hull
- Rockets employ two different kinds of propellent and physical principles: To get low impulses, they use chemical reactions based on a mixture of Hydrogen-Oxygen, while, to get high and efficient impulses, they use matter-antimatter annihilation
- Power Sources
The main kinds of power sources are solar panels and nuclear reactors of the fission type. It would be very nice to use the clean and abundant deuterium-tritium fusion reaction, but our intelligent species have not developed such a technology in a reliably way yet. They are still slave of uranium that must be found, extracted and refined.
Basic Implementation
- Solar panels absorb star light and transform it in energy distributed throught power lines
- Nuclear power depends on a reactor that has several properties and produces energy distributed throught power lines
- EMWs Emitters
This kind of devices are the most difficult to model since the simulator must keep track of all the emitted EMWs and their number is multiplied by reflections.
EMWs emitters are laser sources that emit linear light rays, or radios and radars that emit spherical waves in the radio band, but every surface might reflect light, radio waves and radiate infrared waves according to its temperature.
Basic Implementation
- when a radio wave is generated it becomes independent from its source and travels at the speed of light in the empty space
- The speed of light is equal to c in the reference frame of the central star (more on this issue in the section about physics) and no special relativistic corrections are considered. This approximation is safe enough since the velocity of vehicles and celestial bodies remain within a few percent of c during the reasonable time of a battle within the star system
- To avoid the tracking of too many waves we apply a penalty based on the emitted energy: The farther the wave can go considering a detection threshold, the longer the emitter must wait to shot another energetic wave. This mechanism can be simulated with a fixed amount of energy available to radiate waves that needs time to be restored. Of course, this is not a very realistic choice for a civilization where the energy is so freely available, but the simulator has its limits
- Hulls and in general the emitters of infrared waves and reflected light need the tracking of the path followed by the vehicle at least until the EMW reach a far distance where they are no more detectable. The path is sampled to reduce the occupation of memory and only considerable displacements are considered
- Always in order to reduce the number of EMWs all around, the basic implementation adopts a limit of only one reflection for every emitted wave. So the life cycle of an EMW is the following: It is emitted and travels throught empty space, then it can be reflected, but the generated wave can't be reflected any more and can only be detected until its intensity falls below a given threshold. This choice reduces the amount of computations needed to simulate the EMWs, but at the same time reduces the realism of the behaviour of waves and rays
- Nuclear or matter-antimatter bombs become high energy EMWs spherical sources when they explode
- EWMs Detectors
Detectors of EMWs are omnidirectional radio receivers or directional light and infrared optical devices.
Basic Implementation
- Directional detectors has a cone-shaped sensibility region. All the signals outside that aperture are not detected
- Detectors has a sensibilty threshold that the incident wave must reach to be received
- Detectors can be damaged if the incident energy in above a given value
- Special Devices
[Work in Progress]
Basic Implementation
Programming the Units
"Veni, vidi, vici" Caesar
JASTROBOTS units are programmed using the Java language. The... [Work in Progress]
Summary
The basic implementation of the game includes:
- A schematic environment with stars, planets and satellites
- stars radiate a solar wind depending on their temperature
- planets can have an atmosphere and a solid surface
- planets and satellites doesn't have a complex surface (flat ground)
- planets and satellites can host ground structures
- A simple technology similar for humans and aliens
- antimatter production (propulsion and weapons)
- nuclear energy (energy supply and weapons)
- high energy lasers (propulsion and weapons)
- light solar sails (propulsion)
- metallic materials (structures)
- gas fuels (propulsion)
- A simple AI programming interface
- Java language supported
- Interpreted JVM
- easy Java bean-like environment interaction
- A simple physics engine
- basic newtonian laws of gravitation and inertia for rigid body dynamics and the motion of celestial bodies
- basic thermodynamics for energy management and heat exchanges
- basic electomagnetic waves physics
- possibly special relativity effects during interstellar travels
- fixed step Euler integrator using a Verlet integration scheme
Back to Index
|