Group Group Group Group Group Group Group Group Group

Classic Internet Game Netrek reimplemented in Swift, source code on GitHub

#1

Netrek is the original Internet team strategy game. First developed in 1989 (years before the invention of the “graphical web browser”), Netrek pits two teams of up to 16 players against each other for control of the galaxy. Players fight with lasers and torpedoes while using bombs and armies to capture enemy planets. Classic Netrek clients range from 36,000 to 52,000 lines of C source code.

I reimplemented the Netrek client in Swift and published it as a free app in the Mac App Store for MacOS 10.14 Mojave. Source code is available under the MIT license on GitHub at https://github.com/darrellroot/SwiftNetrek

In addition to Swift, the implementation uses Apple’s “Network” framework API for Internet communication. This new interface is easier to program than the old BSD sockets API in CFNetwork (although it requires MacOS 10.14 Mojave). The reimplementation uses SpriteKit for the tactical combat window. The new implementation totals 7500 lines of Swift source code.

Darrell


#2

Very cool @darrellr! Thank you for sharing :slight_smile: