{"id":4518,"date":"2012-12-23T14:40:28","date_gmt":"2012-12-23T19:40:28","guid":{"rendered":"http:\/\/www.tasharen.com\/?page_id=4518"},"modified":"2025-12-28T11:42:45","modified_gmt":"2025-12-28T16:42:45","slug":"tnet-tasharen-networking","status":"publish","type":"page","link":"http:\/\/www.tasharen.com\/?page_id=4518","title":{"rendered":"TNet: Tasharen Networking"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<td><img decoding=\"async\" loading=\"lazy\" class=\"alignleft\" src=\"http:\/\/www.tasharen.com\/tnet\/tnet.png\" alt=\"\" width=\"128\" height=\"128\" \/><\/td>\n<td>\n<h3><span style=\"color: #ff9900;\"><a href=\"https:\/\/discord.gg\/tasharen\">Discord<\/a>\u00a0<\/span>|\u00a0<a href=\"http:\/\/www.tasharen.com\/forum\/index.php?topic=13953.0\">Documentation<\/a><\/h3>\n<p>TNet 3\u00a0is a powerful Unity Editor extension that handles game state persistence (save game functionality) as a free side-effect of networking.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><strong>Easy-to-use<\/strong> networking: sending a message is as simple as calling a function.<\/li>\n<li>Built <strong>100% in C#<\/strong> and with its core not relying on Unity at all. Comes with full source code. No DLLs.<\/li>\n<li><strong>Tiny<\/strong> in size: server builds into a ~165 kb executable that runs natively on Windows and via Mono on OSX and Linux. The server can run anywhere. Even on a Raspberry Pi!<\/li>\n<li><strong>Battle-tested<\/strong> in games on both mobile and desktop platforms. I shipped 3 games of my own that use TNet, and am working on the 4th.<\/li>\n<li><strong>Multiple channel<\/strong> support. Have a global channel for communication, then join\/leave regional channels around the player while exploring the world. Objects in channels will be created when you join and destroyed when you leave them as you would expect.<\/li>\n<li><strong>Full persistence<\/strong> support. No need to save the game. When TNet is used properly, the game is saved in real-time. You can even use TNet in a single player game (without any sockets) to add real-time save game functionality.<\/li>\n<li>Powerful <strong>Serialization<\/strong> functionality with its <strong>DataNode<\/strong> class. Think JSON\/XML, but smaller, and capable of natively serializing to\/from plain <strong>text<\/strong>, <strong>binary<\/strong> and LZMA-<strong>compressed<\/strong> formats at will.<\/li>\n<li>The same <strong>DataNode<\/strong> class can even be used to <strong>export<\/strong> entire Game Object hierarchies or prefabs similar to how Asset Bundles work (but with some additional benefits) &#8212; for ultimate <strong>modding<\/strong> tools.<\/li>\n<li>Variety of built-in handy features, such as DataNode-based object and player data that automatically syncs across the network (think player inventory), ability to save and load files on the server (server-side player saves), settable per-server and per-channel DataNodes, ban\/admin lists, and much, much more.<\/li>\n<li>Various <strong>developer tools<\/strong> &#8212; from convenience extensions such as object.Invoke(&#8220;function&#8221;) and object.SetFieldOrPropertyValue(&#8220;name&#8221;, value),\u00a0to modding and run-time C# code compilation tools.<\/li>\n<li>Multiplayer is easily\u00a0<b>scale-able<\/b>\u00a0to support many players. When Windward launched, there were over 300 players connected to TNet running on a dev machine off a regular household broadband connection (20 Mbit up). CPU usage was between 2-4% and memory usage was about 250 MB!<a href=\"http:\/\/www.tasharen.com\/wp-content\/uploads\/2012\/12\/ww323.jpg\" rel=\"attachment wp-att-4782\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-4782\" src=\"http:\/\/www.tasharen.com\/wp-content\/uploads\/2012\/12\/ww323-300x244.jpg\" alt=\"ww323\" width=\"300\" height=\"244\" srcset=\"http:\/\/www.tasharen.com\/wp-content\/uploads\/2012\/12\/ww323-300x244.jpg 300w, http:\/\/www.tasharen.com\/wp-content\/uploads\/2012\/12\/ww323.jpg 710w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>Need more information? Check the <a href=\"http:\/\/www.tasharen.com\/forum\/index.php?topic=13953.0\">Documentation<\/a> page, watch the beginner&#8217;s tutorial, or join our <a href=\"https:\/\/discord.gg\/tasharen\">discord<\/a> and ask!<\/li>\n<\/ul>\n<p><iframe loading=\"lazy\" width=\"770\" height=\"433\" src=\"https:\/\/www.youtube.com\/embed\/7oBhEwAHU5w?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen title=\"TNet 3 Beginner's Tutorial\"><\/iframe><\/p>\n<form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\">\n<h1><input name=\"cmd\" type=\"hidden\" value=\"_s-xclick\" \/>Licensing<\/h1>\n<\/form>\n<form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\">\n<ul>\n<li>As of Q4 2025, TNet is open source: <a href=\"https:\/\/github.com\/tasharen\/tnet\">https:\/\/github.com\/tasharen\/tnet<\/a><\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.paypalobjects.com\/en_US\/i\/scr\/pixel.gif\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" \/><\/p>\n<\/form>\n","protected":false},"excerpt":{"rendered":"<p>Discord\u00a0|\u00a0Documentation TNet 3\u00a0is a powerful Unity Editor extension that handles game state persistence (save game functionality) as a free side-effect of networking. Easy-to-use networking: sending a message is as simple as calling a function. Built 100% in C# and with its core not relying on Unity at all. Comes with full source code. No DLLs. <a href='http:\/\/www.tasharen.com\/?page_id=4518' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.tasharen.com\/index.php?rest_route=\/wp\/v2\/pages\/4518"}],"collection":[{"href":"http:\/\/www.tasharen.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.tasharen.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.tasharen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tasharen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4518"}],"version-history":[{"count":42,"href":"http:\/\/www.tasharen.com\/index.php?rest_route=\/wp\/v2\/pages\/4518\/revisions"}],"predecessor-version":[{"id":4951,"href":"http:\/\/www.tasharen.com\/index.php?rest_route=\/wp\/v2\/pages\/4518\/revisions\/4951"}],"wp:attachment":[{"href":"http:\/\/www.tasharen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}