Repository navigation
Releases
3.5.1
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
New Features and Major Changes
SystemManagerwas refactored and is now calledWorld. This new class includes a variety of useful ways to query for objects, including accepting an arbitrary predicate. A new interface calledWorldListenerallows 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
Gridclass provides a common interface for this data.DefaultContextcan read and write.sntfiles usingGrids. DAMCON team status is now represented by the stand-alone classDamconTeam.EngGridUpdatePacketnow contains aListofGridNodes and aListofDamconTeams.Vessel.getInternalDataFile()is now calledgetSntFile(),getInternals()is nowgetGrid(), andpreloadInternals()is nowpreloadGrids(). ArtemisNetworkInterfacenow supports auto-heartbeat management. By default, heartbeat packets will be automatically sent so that code that consumes IAN need not send heartbeats itself.@Listenerscan now listen for two newConnectionEventsubclasses related to heartbeats:HeartbeatLostEventandHeartbeatRegainedEvent. As part of this update,HeartbeatPacketis now an abstract superclass ofServerHeartbeatPacketandClientHeartbeatPacket.- Determining IFF between two objects is now determined by comparing their
sideproperties, then falls back to usingFactionattributes. This has caused changes toCommsRecipientTypeandCommsOutgoingPacket. VesselDatanow hasgetFactions()andgetVessels()to getLists of allFactions andVessels, respectively.Modelnow supports transformation of any arbitrary point cloud, andGridcan 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.
ArtemisGenericObjectno longer exists, having been broken intoArtemisAsteroid,ArtemisBlackHole, andArtemisMineclasses. - All
ArtemisObjects now havegetScanLevel()andgetMaxScans()methods. CallinggetMaxScans()on non-scannable objects returns0. ArtemisObjects now handleTags with thegetTags(),addTag(), andisTagged()methods.ArtemisObjects now report side visibility via thegetVisibility()method.BiomechRagePacketis supported, allowing the client to detect when the biomech tribe's stance toward the player changes.TensionPacketis supported, which is used by the stock client to control music playback.ArtemisOrientablenow exposes theshieldsFrontMax,shieldsRearMax, andsideproperties.ArtemisBasenow reports pitch, roll, heading, and side.ArtemisCreaturenow 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 itssideproperty with the player's.ArtemisNpcnow has anisNpcTagged()method.- The new
SetupManagerclass can be used by custom servers to track connected clients and their ship and console assignments. Consolecan now report aClaimTypeenum value that represents any limitations on the clients that claim it. Possible values areONE_PER_SHIP(pertains toHELM,WEAPONS, andENGINEERING),ONE_PER_GAME(pertains toGAME_MASTER), andNO_LIMIT(pertains to all other consoles).TagPacketnow reports the tag with a separateTagclass.OrdnanceType.HOMINGhas been changed toOrdnanceType.TORPEDOto 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 titledEngGridUpdatePackage.isFullUpdate().ArtemisNetworkInterface.send()is now overloaded to allow sending aCollectionof packets.- Events can now be manually dispatched to listeners via the
ArtemisNetworkInterface.dispatch()method. ArtemisObjectnow has agetNameString()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 specificIllegalStateExceptionrather than aRuntimeExceptionif 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()andArtemisObject.setUnknownProp(). BaseArtemisShielded.extractCallsign()will intelligently determine a contact's short name if it has one.BaseArtemisShielded.getVessel()is now null-safe.BaseArtemisShipnow has a convenience constructor which accepts an ID and aVesseland populates all relevant properties.ArtemisOrientablenow extendsArtemisObject, andArtemisShieldednow extendsArtemisOrientable.Shipnow has a clone constructor.PausePacket.isPaused()now returns abooleaninstead of aBoolState, as the packet does not supportBoolState.UNKNOWN.PacketReaderhas 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.ArtemisPacketExceptionnow has afatalproperty so that you can tell whether the error caused the interface to shut down, and will dump the packet with a stack trace print.BoolStatenow has atoValue()method, which provides an equivalent to the Java ternary operator, selecting a value based on whether theBoolStateisTRUE,FALSE, orUNKNOWN.Polynow implementsIterable<String>.- You can now retrieve the scaling factor specified by
RenderParamswith thescale()method. AnomalyType.toString()now returns a human-oriented label.ServerDiscoveryRespondernow 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 Systemfor consistency. - Added
toString()implementations to various objects to provide more useful information while debugging. Util.joinSpaceDelimited()now acceptsObjects, not justStrings.- Added distribution management information for GitHub Packages.
- Documentation improvements.
Bug Fixes
ArtemisBasenow 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(). BeamFiredPacketwas reporting the incorrectTargetingMode. This has been fixed.Vesseltorpedo tubes were incorrectly created as instances ofBeamPort. They are nowVesselPointinstances.- Fixed a minor issue where unknown object packet fields were inconsistently named.
3.4.0
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
SpecialAbilitynow has theSHIELD_VAMP,TELE_BACK, andSHIELD_RESETvalues introduced in Artemis v2.7.2.
Bug Fixes
- Fixed a bug where
DisconnectEventwas not firing when the connection was closed. A test was added to cover this in the future.
3.3.1
3.3.0
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
OrdnanceTypeandBaseMessage). - 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
AnomalyTypefor the different kinds of anomalies. Includes agetUpgrade()which returns the kind ofUpgradeyou get from picking up this anomaly (if thisAnomalyTypesupports that). RemovedUpgrade.fromAnomalyIndex()andUpgrade.getAnomalyIndex();Upgrade.fromActivationIndex()is now just namedfromIndex(). - New enum
BeaconModefor representing "attract" and "repel" modes for beacons. - New enum
CommFilterfor the different types of filters that can be applied to comm messages.CommsIncomingPacket.matches()returnstruewhen the message matches the given filter.GameMasterMessagePacketupdated to support filters. CreatureType.CLASSICrenamed toTYPHONto match its new name;CreatureType.JELLYadded.GameTypeenum now includesBORDER_WARandINFESTATION.OrdinanceTypecan now translate to and from the three-character codes that are now used invesselData.xml.- IAN can announce and discover games on the LAN. Use
ServerDiscoveryRequesterto discover games, andServerDiscoveryResponderto announce them. - Support for turning off parsing in
PacketReaderhas been removed. (You can get access to raw bytes through theDebuggerinterface). ThreadedArtemisNetworkInterfacenow allows you to attach aDebuggerto be notified of low-level events.ThreadedArtemisNetworkInterfacehas aproxyTo()method to forward uncaptured events to anotherArtemisNetworkInterface.DestroyObjectPacketwas renamed toDeleteObjectPacketso as to not imply that it caused an explosion effect.EndGamePacketandGameOverPacketwere refactored so thatGameOverPacketis sent when the simulation ends (victory, player's ship is destroyed, etc.), whileEndGamePacketis sent when theEnd Gamebutton is clicked on the statistics page.GameOverStatsPacketnow supports section header rows.GameMasterButtonClickPackethas been renamed toButtonClickPacket(since now custom buttons are available for comms, too).GameMasterMessagePacketsupports a newPresentationenum that describes how the message is presented on the client.ExplosionPacketnow handles both packet subtypes0x00and0x13.SingleSeatCraftclass now available.Bayis nowComparable.Vesselefficiency has been split into three separate properties:shipEfficiency,warpEfficiency, andjumpEfficiency.- 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
NaNwhen 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
ArtemisPlayerreceives a nebula type other than 0 - 3 inclusive, since apparently the actual game server does send other values. Shipno longer throws an exception when given an accent color value of1.0and 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)
ThreadedArtemisNetworkInterfacenow uses a separate thread for event dispatching. This prevents the receiver thread from blocking on listeners.- Documentation improvements.
3.2.0
New Features and Improvements
- IAN no longer requires a
Contextobject, except for certain very specific functionality. This means that nowThreadedArtemisNetworkInterfacedoes not require aContextin its constructor, andArtemisObject.updateFrom()no longer hasContextas an argument. This, by extension, means that IAN now has no hard requirement to readvesselData.xml. - The
Contextclass has been extracted to an interface, with the implementation code moved to theDefaultContextclass. This allows you to implement your ownContextthat doesn't have to parse a stream to build the context data (which was particularly useful in the testing code).PathResolverand its implementation classes have been moved to the same package as theContextinterface. - The
ConnectionTypeenumhas been renamed toOrigin, 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 ArtemisNpcandArtemisAnomalynow expose per-side scan levels, and bothArtemisNpcandArtemisPlayerexpose their sides.JumpStatusPackethas been split intoJumpBeginPacketandJumpEndPacket.ToggleShieldsPacketwas renamed toSetShieldsPacketand its functionality expanded to handle raising and lowering shields as well as toggling them.DifficultyPacketwas renamed toGameStartPacketand moved to the core protocol's root package. TheMINandMAXconstants were renamed toMIN_DIFFICULTYandMAX_DIFFICULTY.ReadyPacket2has been renamed toEngRequestGridUpdatePacket.- Target selection packets have been renamed for consistency and clarity (e.g.
CaptainSelectPacket->CaptainTargetPacket). - Torpedoes now have their own object class (
ArtemisTorpedo) instead of usingArtemisGenericObject. - The
Upgradeenumnow 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 invesselData.xml. To support this, theVesselAttributeenumhas been removed. Instead, these values are represented as plain oldStrings, and there is now aVesselAttributeclass withStringconstants representing the default ArtemisbroadTypes. - IAN will no longer throw an exception and close the connection when an
ArtemisPacketExceptionis encountered while parsing a packet's payload. Instead, the exception will be reported to the attachedDebuggerinstance, and the packet will be reported as anUnknownPacket. 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 abooleanargument to indicate whether unspecified properties should be included. (They are always excluded, now.)ArtemisPlayernow supports themissilesproperty for fighters. As this uses the same property in the protocol asavailableCoolant, there is now anavailableCoolantOrMissilesproperty, from which theavailableCoolantandmissilesproperties read. If the vessel type is unknown or the wrong type, attempting to read or writeavailableCoolantormissileswill fail, but theavailableCoolantOrMissilesproperty will always work regardless of vessel type.ArtemisCreaturenow supports thehealthandmaxHealthproperties.- You can now create an
ObjectUpdatePacketand populate it. This lets you create custom proxies that can insert objects visible to clients. ObjectUpdatePacketsupports mixedObjectTypepayloads, 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,ObjectUpdatePacketnow has a static method calledsegregate()which accepts aCollectionofArtemisObjectsand generates aListof correspondingObjectUpdatePacketswhere each has payloads with homogeneousObjectTypes.ArtemisPlayerhas asplit()method that will break it into several objects, with the appropriate properties set for eachObjectType. It also has multiple update methods to only update the properties for a particularObjectType.- The
AllShipSettingsPacket.Shipclass was extracted to its own top-level class, and is now used by theSetShipSettingsPacket. - A new example package contains some sample client and proxy code. The example code in
README.mdwas replaced with a mention of the new package. VesselInternalsobjects can now be built from scratch and be exported to anOutputStreamin.sntformat.GameMasterButtonClickPacketsupports 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 ofPLAYER,FRIENDLY, orENEMY; 2) not specifying one ofSTANDARD,SUPPORT, orLONERforENEMYfactions; 3) specifying bothWHALEHATERandWHALELOVER; 4) specifyingJUMPMASTERwithout specifyingPLAYER.- The
EngGridUpdatePacketinner classes (GridDamageandDamconStatus) now have public constructors. FighterBayStatusPacketnow lets you add bays to it.ThreadedArtemisNetworkInterfacewas 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
ArtemisNpcwill 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/clientvesselData.xmlmismatch, for example). This was done to improve symmetrical read/write support for proxies. - All parsed
Strings are now instances of the newNullTerminatedStringclass, and all API methods that may have referenced a parsed string now use theCharSequenceinterface, which is implemented by bothStringandNullTerminatedString. This was done to improve symmetrical read/write support for proxies. You can convert aStringto aNullTerminatedStringusing theNullTerminatedString(String)constructor, and convert aNullTerminatedStringto aStringusing thetoString()method.NullTerminatedStringalso features static methods to convertLists ofStrings orNullTerminatedStrings. This change will not cause problems for most code, but if you're doing anequals()comparison between aStringand a string value that was parsed from a packet, it will fail becauseStrings andNullTerminatedStrings can't be equal. The best approach is to calltoString()on theNullTerminatedStringand compare that against yourString. BoolStatehas been refactored to be a regular class instead of anenum. It now stores the original representation of thebooleanvalue 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 renamedsetSystemEnergyAsPercentto be more explicit.- Added
DEFAULT_PORTconstant to Artemis class. WelcomePacketallows you to specify a custom message (not that that's terribly important, but whatever).- Removed setters from
FighterBayStatusPacket.Bayso that the class is immutable. GameMasterButtonClickPacketnow displays the hash in hex instead of decimal intoString().- Removed
GridCoord.getUniqueId(), as it wasn't really being used. OutputStreamDebuggernow accepts both an output and an errorOutputStream.- Removed connection tracking for nodes in
VesselInternals(will eventually replace with something better). ArtemisPacketnow exposes a timestamp property which contains the value ofSystem.nanoTime()when the packet was constructed.- IAN now confirms that classes which have methods with the
@Listenerannotation are public. BeamFiredPacket.autoFiredis now calledtargetingMode, and returns aTargetingMode`enu...
3.1.1
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
- Artemis 2.4.0 support. This includes: support for the new ships and the new Ximni faction, new
jumpmasterfaction attribute,elitefaction attribute changed tohasspecials,playershieldsattribute 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 aContextobject and pass it to the required classes. This was done in order to allow automated testing with differentvesselData.xmlfiles 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
Contextclass passing in an object that implements thePathResolverinterface. This gives you much more flexibility when it comes to loading Artemis resource files. IAN comes with twoPathResolverimplementations out of the box:FilePathResolver(to read from disk) andClasspathResolver(to read resources packaged inside your JAR). - Way easier proxying.
ArtemisNetworkInterfacenow has aproxyTo()method. Simply pass in a recipientArtemisNetworkInterfaceobject, 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
DisconnectEventsare expected to occur when a connection is terminated intentionally. TheisNormal()method onDisconnectEventwill now tell you whether thisDisconnectEventis expected or not. README.mdupdated. 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 themvn installcommand. - 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 newContextobject with the more powerfulPathResolvermechanism. Construct aContextobject and pass in an object which implementsPathResolver. There are a few constructors and methods which now require you to pass in theContext(most notably, constructors forThreadedArtemisNetworkInterface).- 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.