Skip to content

Releases: rjwut/ian

3.5.1

10 Oct 22:47
Compare
Choose a tag to compare

This release removes the upper bound on the Artemis version that is accepted by IAN on connect. As it does not look like Artemis 2 will have any further protocol changes, this should allow any further patches to Artemis 2 to work with IAN.

3.5.0

25 Jun 19:18
9c466a5
Compare
Choose a tag to compare

New Features and Major Changes

  • SystemManager was refactored and is now called World. This new class includes a variety of useful ways to query for objects, including accepting an arbitrary predicate. A new interface called WorldListener allows you to be notified when objects are created or deleted or when players spawn (meaning the player's the ship index is known).
  • Vessel internals and system damage has been refactored so that data is stored in the same structure and can be updated in a consistent fashion. The new Grid class provides a common interface for this data. DefaultContext can read and write .snt files using Grids. DAMCON team status is now represented by the stand-alone class DamconTeam. EngGridUpdatePacket now contains a List of GridNodes and a List of DamconTeams. Vessel.getInternalDataFile() is now called getSntFile(), getInternals() is now getGrid(), and preloadInternals() is now preloadGrids().
  • ArtemisNetworkInterface now supports auto-heartbeat management. By default, heartbeat packets will be automatically sent so that code that consumes IAN need not send heartbeats itself. @Listeners can now listen for two new ConnectionEvent subclasses related to heartbeats: HeartbeatLostEvent and HeartbeatRegainedEvent. As part of this update, HeartbeatPacket is now an abstract superclass of ServerHeartbeatPacket and ClientHeartbeatPacket.
  • Determining IFF between two objects is now determined by comparing their side properties, then falls back to using Faction attributes. This has caused changes to CommsRecipientType and CommsOutgoingPacket.
  • VesselData now has getFactions() and getVessels() to get Lists of all Factions and Vessels, respectively.
  • Model now supports transformation of any arbitrary point cloud, and Grid can export a point cloud of its nodes. This allows system grids to be more easily overlaid on a ship model render, as is done in the stock engineering console.
  • All object types now have a unique class that represents them. ArtemisGenericObject no longer exists, having been broken into ArtemisAsteroid, ArtemisBlackHole, and ArtemisMine classes.
  • All ArtemisObjects now have getScanLevel() and getMaxScans() methods. Calling getMaxScans() on non-scannable objects returns 0.
  • ArtemisObjects now handle Tags with the getTags(), addTag(), and isTagged() methods.
  • ArtemisObjects now report side visibility via the getVisibility() method.
  • BiomechRagePacket is supported, allowing the client to detect when the biomech tribe's stance toward the player changes.
  • TensionPacket is supported, which is used by the stock client to control music playback.
  • ArtemisOrientable now exposes the shieldsFrontMax, shieldsRearMax, and side properties.
  • ArtemisBase now reports pitch, roll, heading, and side.
  • ArtemisCreature now reports scans.
  • ArtemisNpc.isEnemy() has been removed, as it has become clear that this property in the protocol is not what it was originally believed to be. To determine whether a ship is an enemy vessel, you should compare its side property with the player's.
  • ArtemisNpc now has an isNpcTagged() method.
  • The new SetupManager class can be used by custom servers to track connected clients and their ship and console assignments.
  • Console can now report a ClaimType enum value that represents any limitations on the clients that claim it. Possible values are ONE_PER_SHIP (pertains to HELM, WEAPONS, and ENGINEERING), ONE_PER_GAME (pertains to GAME_MASTER), and NO_LIMIT (pertains to all other consoles).
  • TagPacket now reports the tag with a separate Tag class.
  • OrdnanceType.HOMING has been changed to OrdnanceType.TORPEDO to match the change to the in-game nomenclature.
  • To reflect its wider use cases, all references to "vertices" have been changed to "points."

Minor Updates and Internal Changes

  • EngGridUpdatePacket.isRequested() is now more accurately titled EngGridUpdatePackage.isFullUpdate().
  • ArtemisNetworkInterface.send() is now overloaded to allow sending a Collection of packets.
  • Events can now be manually dispatched to listeners via the ArtemisNetworkInterface.dispatch() method.
  • ArtemisObject now has a getNameString() convenience method.
  • ArtemisObject.distanceIgnoreY() allows you to get the distance between two objects on the X-Z plane. (ArtemisObject.distance() reports actual distance in 3D space.) Both will now throw a more specific IllegalStateException rather than a RuntimeException if the distance cannot be computed because one or both objects have no position.
  • Unknown properties can be retrieved and set by byte and bit number via ArtemisObject.getUnknownProp() and ArtemisObject.setUnknownProp().
  • BaseArtemisShielded.extractCallsign() will intelligently determine a contact's short name if it has one.
  • BaseArtemisShielded.getVessel() is now null-safe.
  • BaseArtemisShip now has a convenience constructor which accepts an ID and a Vessel and populates all relevant properties.
  • ArtemisOrientable now extends ArtemisObject, and ArtemisShielded now extends ArtemisOrientable.
  • Ship now has a clone constructor.
  • PausePacket.isPaused() now returns a boolean instead of a BoolState, as the packet does not support BoolState.UNKNOWN.
  • PacketReader has improved error handling that will provide more information in the event of a parsing error. Packet parsing is more resilient: as long as IAN is confident that the packet size is correct, any subsequent parsing errors will be non-fatal. ArtemisPacketException now has a fatal property so that you can tell whether the error caused the interface to shut down, and will dump the packet with a stack trace print.
  • BoolState now has a toValue() method, which provides an equivalent to the Java ternary operator, selecting a value based on whether the BoolState is TRUE, FALSE, or UNKNOWN.
  • Poly now implements Iterable<String>.
  • You can now retrieve the scaling factor specified by RenderParams with the scale() method.
  • AnomalyType.toString() now returns a human-oriented label.
  • ServerDiscoveryResponder now uses the username as the name of the server instead of the host name. This was done to be consistent with Artemis.
  • Minor label changes to Ship System for consistency.
  • Added toString() implementations to various objects to provide more useful information while debugging.
  • Util.joinSpaceDelimited() now accepts Objects, not just Strings.
  • Added distribution management information for GitHub Packages.
  • Documentation improvements.

Bug Fixes

  • ArtemisBase now correctly reports max shields. (Previously, the max shields value was erroneously reported as rear shields.)
  • Fixed a bug where undocking was not always properly reported by ArtemisPlayer.getDockingBase().
  • BeamFiredPacket was reporting the incorrect TargetingMode. This has been fixed.
  • Vessel torpedo tubes were incorrectly created as instances of BeamPort. They are now VesselPoint instances.
  • Fixed a minor issue where unknown object packet fields were inconsistently named.

3.4.0

13 Feb 23:40
7b30936
Compare
Choose a tag to compare

IAN v3.4.0 Release Notes

This release updates IAN to support Artemis v2.7.2 and later and fixes a critical bug with DisconnectEvent not firing.

New Features and Improvements

  • SpecialAbility now has the SHIELD_VAMP, TELE_BACK, and SHIELD_RESET values introduced in Artemis v2.7.2.

Bug Fixes

  • Fixed a bug where DisconnectEvent was not firing when the connection was closed. A test was added to cover this in the future.

3.3.1

11 Feb 15:48
19acb22
Compare
Choose a tag to compare

IAN v3.3.1 Release Notes

This is a patch release that fixes a bug accidentally released in version 3.3.0 that prevented the dispatch thread from accepting packets.

3.3.0

05 Feb 18:57
19acb22
Compare
Choose a tag to compare

IAN v3.3.0 Release Notes

The principal goal of IAN v3.3.0 is to provide support for Artemis v2.7.0-1. Below are the full release notes.

New Features and Improvements

  • Support for beacons, probes, and tags (includes updates to OrdnanceType and BaseMessage).
  • New packet types supported: BayStatusPacket, BeaconConfigPacket, CommsButtonPacket, IdleTextPacket, SetSingleSeatSettingsPacket, SingleSeatTextPacket, TagPacket.
  • New properties exposed: ArtemisNebula.type, ArtemisNpc.targetX, ArtemisNpc.targetY, ArtemisNpc.targetZ, ArtemisNpc.tagged, ArtemisPlayer.climbDive, ArtemisPlayer.emergencyJumpCooldown, ArtemisPlayer.beaconType, ArtemisPlayer.beaconMode, ArtemisPlayer.nebulaType, ArtemisDrone.side, ArtemisDrone.y.
  • New enum AnomalyType for the different kinds of anomalies. Includes a getUpgrade() which returns the kind of Upgrade you get from picking up this anomaly (if this AnomalyType supports that). Removed Upgrade.fromAnomalyIndex() and Upgrade.getAnomalyIndex(); Upgrade.fromActivationIndex() is now just named fromIndex().
  • New enum BeaconMode for representing "attract" and "repel" modes for beacons.
  • New enum CommFilter for the different types of filters that can be applied to comm messages. CommsIncomingPacket.matches() returns true when the message matches the given filter. GameMasterMessagePacket updated to support filters.
  • CreatureType.CLASSIC renamed to TYPHON to match its new name; CreatureType.JELLY added.
  • GameType enum now includes BORDER_WAR and INFESTATION.
  • OrdinanceType can now translate to and from the three-character codes that are now used in vesselData.xml.
  • IAN can announce and discover games on the LAN. Use ServerDiscoveryRequester to discover games, and ServerDiscoveryResponder to announce them.
  • Support for turning off parsing in PacketReader has been removed. (You can get access to raw bytes through the Debugger interface).
  • ThreadedArtemisNetworkInterface now allows you to attach a Debugger to be notified of low-level events.
  • ThreadedArtemisNetworkInterface has a proxyTo() method to forward uncaptured events to another ArtemisNetworkInterface.
  • DestroyObjectPacket was renamed to DeleteObjectPacket so as to not imply that it caused an explosion effect.
  • EndGamePacket and GameOverPacket were refactored so that GameOverPacket is sent when the simulation ends (victory, player's ship is destroyed, etc.), while EndGamePacket is sent when the End Game button is clicked on the statistics page.
  • GameOverStatsPacket now supports section header rows.
  • GameMasterButtonClickPacket has been renamed to ButtonClickPacket (since now custom buttons are available for comms, too).
  • GameMasterMessagePacket supports a new Presentation enum that describes how the message is presented on the client.
  • ExplosionPacket now handles both packet subtypes 0x00 and 0x13.
  • SingleSeatCraft class now available.
  • Bay is now Comparable.
  • Vessel efficiency has been split into three separate properties: shipEfficiency, warpEfficiency, and jumpEfficiency.
  • Carrier-type vessels now expose the number of bays they have.
  • Weapon ports now expose the player damage they inflict (apparently only applies to single-seat craft).
  • Removed ArtemisBase.getIndex(), since bases don't have indexes anymore.
  • Float properties are now NaN when unspecified, unless the documentation says otherwise.
  • Compiled JDK version moved to Java 7, as Java 6 has reached end-of-life and Travis CI was complaining.

Bug Fixes

  • Fixed a bug with unspecified front and rear shields on BaseArtemisShip.
  • Fixed a bug where single and double scanning of NPC ships was incorrectly handled.
  • Removed error that occurs if an ArtemisPlayer receives a nebula type other than 0 - 3 inclusive, since apparently the actual game server does send other values.
  • Ship no longer throws an exception when given an accent color value of 1.0 and no longer incorrectly reports whether it has a name.
  • Fixed an error reading arguments in the ProxyDemo.
  • Fixed #10 (SenderThread does not terminate on IOException)
  • Fixed #18 (Newly registered protocols are not forwarded to PacketReader)
  • Fixed #19 (ServerDiscoveryRequester never terminates)
  • Fixed #20 (Server.java equals() method has a bug)

Internal Changes (no direct impact on users)

  • ThreadedArtemisNetworkInterface now uses a separate thread for event dispatching. This prevents the receiver thread from blocking on listeners.
  • Documentation improvements.

3.2.0

28 Mar 19:20
Compare
Choose a tag to compare

New Features and Improvements

  • IAN no longer requires a Context object, except for certain very specific functionality. This means that now ThreadedArtemisNetworkInterface does not require a Context in its constructor, and ArtemisObject.updateFrom() no longer has Context as an argument. This, by extension, means that IAN now has no hard requirement to read vesselData.xml.
  • The Context class has been extracted to an interface, with the implementation code moved to the DefaultContext class. This allows you to implement your own Context that doesn't have to parse a stream to build the context data (which was particularly useful in the testing code). PathResolver and its implementation classes have been moved to the same package as the Context interface.
  • The ConnectionType enum has been renamed to Origin, and all references to "connection type" have been renamed to "origin." This makes it more clear which direction packets are being sent, and it's shorter.
  • New packets: ActivateUpgradePacket, CloakDecloakPacket, DockedPacket, EngResetCoolant, ExplosionPacket, HeartbeatPacket, HelmEmergencyJumpPacket, KlaxonPacket,
    SingleSeatPilotPacket, SingleSeatShootPacket, SmokePacket, TitlePacket
  • Exposed new properties on various packets: BayStatusPacket.bays, BeamFiredPacket.origin, BeamFiredPacket.targetId, EngRequestGridUpdatePacket.requested, FighterLaunchPacket.objectId, FireBeamPacket.targetId, FireBeamPacket.x, FireBeamPacket.y, FireBeamPacket.z, FireTubePacket.tubeIndex, GameMasterMessagePacket.recipients, GameMasterSelectObjectPacket.targetId, GameStartPacket.difficulty, GameStartPacket.gameType, HelmSetWarpPacket.warpFactor, LoadTubePacket.ordnanceType, LoadTubePacket.tubeIndex, PlayerShipDamagePacket.duration, PlayerShipDamagePacket.shipIndex, SciScanPacket.targetId, SciSelectPacket.targetId, SetConsolePacket.console, SetConsolePacket.selected, SetBeamFreqPacket.beamFrequency, SetShipPacket.shipNumber, SetShipSettingsPacket.drive, SetShipSettingsPacket.hullId, SetShipSettingsPacket.accentColor, SetShipSettingsPacket.name, SetWeaponsTargetPacket.targetId, UnloadTubePacket.tubeIndex
  • ArtemisNpc and ArtemisAnomaly now expose per-side scan levels, and both ArtemisNpc and ArtemisPlayer expose their sides.
  • JumpStatusPacket has been split into JumpBeginPacket and JumpEndPacket.
  • ToggleShieldsPacket was renamed to SetShieldsPacket and its functionality expanded to handle raising and lowering shields as well as toggling them.
  • DifficultyPacket was renamed to GameStartPacket and moved to the core protocol's root package. The MIN and MAX constants were renamed to MIN_DIFFICULTY and MAX_DIFFICULTY.
  • ReadyPacket2 has been renamed to EngRequestGridUpdatePacket.
  • Target selection packets have been renamed for consistency and clarity (e.g. CaptainSelectPacket -> CaptainTargetPacket).
  • Torpedoes now have their own object class (ArtemisTorpedo) instead of using ArtemisGenericObject.
  • The Upgrade enum now contains all known upgrade types, including those not obtainable from anomalies.
  • The underlying protocol has standardized on zero-based ship index values, so IAN has followed suit. All references to the one-based "ship number" have been changed to the zero-based "ship index."
  • IAN now gracefully accepts custom vessel broadTypes in vesselData.xml. To support this, the VesselAttribute enum has been removed. Instead, these values are represented as plain old Strings, and there is now a VesselAttribute class with String constants representing the default Artemis broadTypes.
  • IAN will no longer throw an exception and close the connection when an ArtemisPacketException is encountered while parsing a packet's payload. Instead, the exception will be reported to the attached Debugger instance, and the packet will be reported as an UnknownPacket. Note that if an exception occurs while parsing the packet's header, IAN will still close the connection and throw an exception, since it can't know how long the packet is without parsing the header.
  • ArtemisObject.getProps() no longer accepts a boolean argument to indicate whether unspecified properties should be included. (They are always excluded, now.)
  • ArtemisPlayer now supports the missiles property for fighters. As this uses the same property in the protocol as availableCoolant, there is now an availableCoolantOrMissiles property, from which the availableCoolant and missiles properties read. If the vessel type is unknown or the wrong type, attempting to read or write availableCoolant or missiles will fail, but the availableCoolantOrMissiles property will always work regardless of vessel type.
  • ArtemisCreature now supports the health and maxHealth properties.
  • You can now create an ObjectUpdatePacket and populate it. This lets you create custom proxies that can insert objects visible to clients.
  • ObjectUpdatePacket supports mixed ObjectType payloads, as used by some custom software. Stock Artemis clients appear to handle this fine. However, if you wish to ensure that you generate packets how the Artemis server does, ObjectUpdatePacket now has a static method called segregate() which accepts a Collection of ArtemisObjects and generates a List of corresponding ObjectUpdatePackets where each has payloads with homogeneous ObjectTypes. ArtemisPlayer has a split() method that will break it into several objects, with the appropriate properties set for each ObjectType. It also has multiple update methods to only update the properties for a particular ObjectType.
  • The AllShipSettingsPacket.Ship class was extracted to its own top-level class, and is now used by the SetShipSettingsPacket.
  • A new example package contains some sample client and proxy code. The example code in README.md was replaced with a mention of the new package.
  • VesselInternals objects can now be built from scratch and be exported to an OutputStream in .snt format.
  • GameMasterButtonClickPacket supports providing the label of the button to click, which will then compute the hash for you.
  • FactionAttribute.build(String) will now complain if certain invalid combinations of attributes are used: 1) not specifying one of PLAYER, FRIENDLY, or ENEMY; 2) not specifying one of STANDARD, SUPPORT, or LONER for ENEMY factions; 3) specifying both WHALEHATER and WHALELOVER; 4) specifying JUMPMASTER without specifying PLAYER.
  • The EngGridUpdatePacket inner classes (GridDamage and DamconStatus) now have public constructors.
  • FighterBayStatusPacket now lets you add bays to it.
  • ThreadedArtemisNetworkInterface was updated to report time since the last heartbeat.
  • Most references to "fighters" were changed to "single-seat craft," since a fighter is only one kind of single-seat craft.
  • The special bits properties for ArtemisNpc will now preserve the original data, even in the case where garbage data gives special abilities to a non-special ship. However, the special abilities properties that don't have the word "Bits" in their names will compensate for this Artemis server error, so in general you should use those instead. However, note that they will not claim to know the special abilities status if the properties in question are unspecified or if the hull ID is unspecified or does not correspond to a known vessel (due to a server/client vesselData.xml mismatch, for example). This was done to improve symmetrical read/write support for proxies.
  • All parsed Strings are now instances of the new NullTerminatedString class, and all API methods that may have referenced a parsed string now use the CharSequence interface, which is implemented by both String and NullTerminatedString. This was done to improve symmetrical read/write support for proxies. You can convert a String to a NullTerminatedString using the NullTerminatedString(String) constructor, and convert a NullTerminatedString to a String using the toString() method. NullTerminatedString also features static methods to convert Lists of Strings or NullTerminatedStrings. This change will not cause problems for most code, but if you're doing an equals() comparison between a String and a string value that was parsed from a packet, it will fail because Strings and NullTerminatedStrings can't be equal. The best approach is to call toString() on the NullTerminatedString and compare that against your String.
  • BoolState has been refactored to be a regular class instead of an enum. It now stores the original representation of the boolean value as read from the bit stream so that it can be written out exactly as it was read (again to support symmetrical read/write for proxies).
  • ArtemisPlayer.setSystemEnergy(ShipSystem, int) is renamed setSystemEnergyAsPercent to be more explicit.
  • Added DEFAULT_PORT constant to Artemis class.
  • WelcomePacket allows you to specify a custom message (not that that's terribly important, but whatever).
  • Removed setters from FighterBayStatusPacket.Bay so that the class is immutable.
  • GameMasterButtonClickPacket now displays the hash in hex instead of decimal in toString().
  • Removed GridCoord.getUniqueId(), as it wasn't really being used.
  • OutputStreamDebugger now accepts both an output and an error OutputStream.
  • Removed connection tracking for nodes in VesselInternals (will eventually replace with something better).
  • ArtemisPacket now exposes a timestamp property which contains the value of System.nanoTime() when the packet was constructed.
  • IAN now confirms that classes which have methods with the @Listener annotation are public.
  • BeamFiredPacket.autoFired is now called targetingMode, and returns a TargetingMode `enu...
Read more

3.1.1

31 Aug 15:28
Compare
Choose a tag to compare

This release resolves a problem which was preventing IAN from being usable on Android. The new rendering code used classes from java.awt, which is not available on Android. The rendering code has now been removed, while the code which parses .dxs files and stores the points and polys has been retained so that rendering code can still be written for any platform. The plan is to eventually release the rendering code separately.

3.1.0

30 Aug 15:39
Compare
Choose a tag to compare
  • Artemis 2.4.0 support. This includes: support for the new ships and the new Ximni faction, new jumpmaster faction attribute, elite faction attribute changed to hasspecials, playershields attribute for fighters, support for game master custom buttons, support for ship accent colors and fighter capital ship IDs. All references to "elite" changed to "special" in the code base.
  • VesselData refactor. There is no longer a static instance of VesselData. Instead, you create a Context object and pass it to the required classes. This was done in order to allow automated testing with different vesselData.xml files to exercise various scenarios.
  • Load Artemis resources however you want. Instead of simply giving a path to the Artemis install, you can now construct the Context class passing in an object that implements the PathResolver interface. This gives you much more flexibility when it comes to loading Artemis resource files. IAN comes with two PathResolver implementations out of the box: FilePathResolver (to read from disk) and ClasspathResolver (to read resources packaged inside your JAR).
  • Way easier proxying. ArtemisNetworkInterface now has a proxyTo() method. Simply pass in a recipient ArtemisNetworkInterface object, and any packets which are not caught by your listeners are automatically passed through to the proxied connection.
  • Ship number/index consistency fix. The Artemis protocol isn't 100% consistent about whether Artemis is ship 1 or ship 0. This change makes your life easier by making IAN consistent (Artemis is ship 1) even though the protocol isn't.
  • Determine whether a disconnection was "normal." Some DisconnectEvents are expected to occur when a connection is terminated intentionally. The isNormal() method on DisconnectEvent will now tell you whether this DisconnectEvent is expected or not.
  • README.md updated. It now includes detailed information about how to create clients or server proxies, including updated example source code.
  • Added pom.xml. Don't know why this wasn't in there before! Anyway, this should let you build the JAR from a local copy of the repository with the mvn install command.
  • A bunch of documentation updates. Yay for documentation!
  • More automated test coverage. We are currently at 44.1% coverage.
  • A bunch of internal improvements which you probably won't care about, but which make IAN better.

Here are the things to watch for that may break your existing code upon updating to IAN 3.1.0:

  • VesselData.setArtemisInstallPath() doesn't exist anymore, since we're now using the new Context object with the more powerful PathResolver mechanism. Construct a Context object and pass in an object which implements PathResolver. There are a few constructors and methods which now require you to pass in the Context (most notably, constructors for ThreadedArtemisNetworkInterface).
  • To be consistent with the new terminology used in vesselData.xml, all references to the term "elite" in the code have been changed to "special." Any references you may have in your code will need to be changed accordingly.
  • Make sure that any code that identifies a ship by number/index is one-based and not zero-based.