Author Topic: Just started with TNet3...  (Read 3726 times)

scornflake

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 1
  • Posts: 15
    • View Profile
Just started with TNet3...
« on: April 01, 2017, 01:40:11 AM »
Hi,

Just starting with tnet. I checked the docs page, but can't see a) how I'd start a standalone server (say, on a linux host/vm, non windows) and b) where the code is (if I need to look at it) which was mentioned in the beginners tutorial.

Feel like I'm prob missing something obvious?

scornflake

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 1
  • Posts: 15
    • View Profile
Re: Just started with TNet3...
« Reply #1 on: April 01, 2017, 02:35:17 AM »
OK. Going to reply to myself :)

Still, the fact that I had to query around to find this (as a newbie), kinda indicates a FAQ/doc could do with updating (creating?!).

- Did a search hereon the forum and found about using Mono to run the server (either linux or mac).
- I imported the tnet assets into Unity, but didn't think to check that the server was *inside* that asset bundle. That makes sense, now that I think of it, but it would have been a nice tip in the docs (is it already there and I missed it?)


....
Now to have a play via Mac :)

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Just started with TNet3...
« Reply #2 on: April 01, 2017, 11:50:43 AM »
Well, you've gotta draw the line somewhere. It seems to me the first problem is unfamiliarity with Windows Explorer (or Finder or Dolphin or whatever you use to browse your file system), and the second problem is unfamiliarity with how C# is compiled and executed (mono is essentially the cross-platform equivalent of Microsoft's own .NET framework).
If the TNet devs were to include this in the documentation, then they should also include how to download and install an IDE, and how to download and install an OS (from different media too, for completeness), and if we're going that far, perhaps they should include a tutorial for building a PC? Ah, but that wouldn't help much without a tutorial for turning on a PC, too.

In all seriousness though, I do agree that the documentation is a tad lacking. I can see how a practical guide to setting up TNet on a dedicated server could be beneficial, too. I tend to view TNet as an "advanced" networking library that, naturally, targets "advanced" users, so it's hard for me to have many complaints about it as I view it as my responsibility to figure it out; however, in today's market where anyone can make games, I believe thorough documentation and accessibility is incredibly valuable. Honestly, it seems like I spend 3/4 of my working time browsing Unity's own documentation, and I've been using Unity for years now :P

All that being said, I'm a huge fan of TNet and I hope you stick with it long enough to appreciate its awesomeness :)


Hmm, this actually got me thinking: I've met many indie devs that started out as creative-types (artists, web designers, etc) but started learning how to code to make their game. I think it's this huge influx of creative-types learning how to code that causes the disproportionate value in documentation and accessibility over, say, technical performance or extensibility. I think many of the most successful assets on the asset store target these creative-types. Assets like All-in-one complete game packs, visual scripting, etc aren't targeting programmers. Although, it could simply be the next "evolution" of development. Perhaps they exist to simplify or automate tedious, "outdated" tasks and allow for faster development. I mean, I only recently discovered how useful git is, so maybe I'm just way behind the times. One thing I've found to be certain, though: if you give indie devs a set of tools, they'll figure out a way to use them to create something totally unexpected and mind-boggingly amazing.

scornflake

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 1
  • Posts: 15
    • View Profile
Re: Just started with TNet3...
« Reply #3 on: April 01, 2017, 02:50:36 PM »
Hellooooo!
I think I mostly agree with what you've said.

I've been developing since I was ... dunno ... 12?  I'm now 45.   Yeh, ancient.
I've spent lots of time in/on Mac, Linux... windows, server side, client side - etc.  Too much Java, a little c#, more than 0 C++ (unfortunately), python blah blah blah. 

I think where I didn't find it because of unfamiliarity with C# environments.  Fine with the code, but I don't spend much/any time with the IDEs (only cos my work has been Mac / Linux for quite some time now).   So I didn't automatically make the jump to 'mono' being an option. My last 8 years dev has been primarily on Mac/Linux. So Xcode (cough, splutter), AppCode. Objective-C.

When I downloaded the asset into Unity, I didn't *expect* to have to look inside it for the .zip, because I was, for whatever reason, *expecting* some other external .zip or git repo to get the other stuff from. I had expected that the importable asset was purely game related (which you can argue it still is!).  So, what am I saying? hmm... I guess just my direction for where I looked for stuff (code, for example) was based more on how I've seen other stuff done (git, downloadable files / packages) and not necessarily on how it might be done / distributed in Unity...

I'm rambling. I don't think the docs would need much. I'd be happy to write up something if it'd help.

I think something directly off the "TNet3 Tutorials" or a sticky on it's own if you want to keep it separate... both would be fine. btw: the TNET3 Tutorials page was the canonical start point for me. I dug around a bit on the web (this is before I found the .zip and before I looked inside the TNET3 Asset package btw), and the forums / that tutorials page pretty much was where I ended up.

(btw: I got a dedicated server, and my first game clients connecting in about 30m after I worked out where things were at. I'm very happy with what I've seen of TNet so far)


So, without further ado:

(this could be a subpage directly above Examples Overview, in the Overview section of Tutorials).


Dedicated Server
===========

The TNet3 package/assets contain everything you're after. Test scenes, objects, and also the server (see TNetServer.zip inside the  asset that you downloaded from Unity).

For linux/mac users: Use 'mono' to run the TNetServer.exe (search this forum, there's quite a few posts about it).
For Mac, Mono can be got a few ways, 'brew' being a good one.

e.g: mono TNServer.exe -ip 192.168.1.61 -tcp 11889 -name MySuperGameOfAwesome

To start with, check out the examples first. These will see/connect to this dedicated server just fine, and provide a good starting point.

---------------

And really, had I know the above, I prob would not have had to post here. But then, I would also not have introduced myself to you wondrous people ;)   So maybe less docs? (no! I'm joking!)