Project 1999

Go Back   Project 1999 > General Community > Off Topic

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 11-13-2018, 10:39 AM
maskedmelon maskedmelon is offline
Planar Protector

maskedmelon's Avatar

Join Date: Nov 2011
Location: not far from here
Posts: 5,798
Question Semi-mmo (rpg) Netcode: WCF or GRPC

trying to decide a direction to go for building the client-server communication interface system (netcode?), and have been tiptoeing into related information, but thought I'd solicit some opinions. Any thoughts on which of these would work better, or if i should just make my own thing with liek binaryformatters and UDP or something? My experience is super limited and I know next to NOTHING, so any/all feedback is appreciated and feel free to ridicule me!

also, im using c# and while i would prefer a c# amenable solution, im not opposed to learning another language if it would work much better or be simpler or otherwise offer a robust set of advantages of c#.
__________________
<Millenial Snowfkake Utopia>
  #2  
Old 11-14-2018, 10:20 AM
Secrets Secrets is offline
VIP / Contributor

Secrets's Avatar

Join Date: Oct 2009
Posts: 1,354
Default

Quote:
Originally Posted by maskedmelon [You must be logged in to view images. Log in or Register.]
trying to decide a direction to go for building the client-server communication interface system (netcode?), and have been tiptoeing into related information, but thought I'd solicit some opinions. Any thoughts on which of these would work better, or if i should just make my own thing with liek binaryformatters and UDP or something? My experience is super limited and I know next to NOTHING, so any/all feedback is appreciated and feel free to ridicule me!

also, im using c# and while i would prefer a c# amenable solution, im not opposed to learning another language if it would work much better or be simpler or otherwise offer a robust set of advantages of c#.
UDP is unreliable. You can get away with having UDP if you implement your own version of TCP on top of the protocol. This normally requires a lot of knowledge of bitflags and optimization. By far, it's the fastest though. If it's your first project, I don't recommend that. It can get confusing.

You could do a RESTful API (ie; json messaging over HTTP), but it won't be synchronous like an MMORPG server would require/prefer. If you're going this route, make sure the server is the only one who makes important calls to the API like managing inventory, stats, etc - and make sure the player has one session at all times. It's normally easier said than done. Still would need a type of netcode on top of that.

Raw TCP sockets are great for server to server communication. Not so much for other things like gameplay. Look into stuff like websockets if you must use TCP; it works with C# nicely.
__________________
Engineer of Things and Stuff, Wearer of Many Hats

“Knowing yourself is the beginning of all wisdom.” — Aristotle
  #3  
Old 11-14-2018, 10:33 AM
Izmael Izmael is offline
Planar Protector

Izmael's Avatar

Join Date: Jul 2015
Posts: 2,289
Default

Using TCP means any minor network hiccup will result in lag spikes that you can't really do much about - the lost packet / retransmission / reordering logic is handled by the OS, not you.

Using UDP means managing it all is up to you. Like Secrets said, it is obviously a lot more work, but you get to adapt the netcode to the precise needs of your application.

For anything even remotely ressembling an FPS or a 3D MMO, UDP is IMO the only reasonable approach.

You can look at the ioquake3.org project. The project is opensource and the netcode is done by John Carmack who is basically a demigod as far as 3D multiplayer gaming is concerned. Suited for fast-paced FPS. Very efficient, and fault tolerant on bad networks. Hard to scale past 64 players (will require a lot of reworking).

EqEmu is also opensource and also relies on UDP netcode. Better suited for larger scale games, such as *surprize* Everquest, but has nowhere near the efficiency of the above.

It might be worth checking the iodoom3 project as well. Basically it's the next generation of the ioquake3 engine. I think it's in C++ and not in C though (like ioquake3). Not sure how much better it is, if at all.
  #4  
Old 11-14-2018, 03:31 PM
Secrets Secrets is offline
VIP / Contributor

Secrets's Avatar

Join Date: Oct 2009
Posts: 1,354
Default

Also relevant: https://arstechnica.com/gadgets/2018...-be-using-tcp/
__________________
Engineer of Things and Stuff, Wearer of Many Hats

“Knowing yourself is the beginning of all wisdom.” — Aristotle
  #5  
Old 11-16-2018, 02:35 PM
maskedmelon maskedmelon is offline
Planar Protector

maskedmelon's Avatar

Join Date: Nov 2011
Location: not far from here
Posts: 5,798
Default

thank you both. That helps a LOT. i was meandering in the direction of asynchronus sockets because it seemed that everything I'd read indicated it was the fastest and I hadn't even considered the issues of making sure all the clients are synchronized.

I'll look into the we sockets and eqemu's udp system. will be helpful to study some working code rather than just random tutorials :3
__________________
<Millenial Snowfkake Utopia>
Last edited by maskedmelon; 11-16-2018 at 02:38 PM..
  #6  
Old 11-16-2018, 03:53 PM
Izmael Izmael is offline
Planar Protector

Izmael's Avatar

Join Date: Jul 2015
Posts: 2,289
Default

Or you can use Unity and skip, at least for now, the need for worrying about the netcode (which may very well end up being a steep mountain to climb).
  #7  
Old 11-16-2018, 04:10 PM
maskedmelon maskedmelon is offline
Planar Protector

maskedmelon's Avatar

Join Date: Nov 2011
Location: not far from here
Posts: 5,798
Smile

yeah, I thought about that, but then I'd have to invest my time in learning unity, which isn't really transferrable and i find most of the things i want to do are easier to just write then find a way of integrating with unity. It's probably just a lack of familiarity, but liek for example with the animator I wanted to figure out how to animate a sprite sheet once and swap out textures for different armors and stuff. It's super simple to write on its own, but in unity, you have the interface where you plug all your cells and the animator class doesn't allow acces to the images (get/readonly iirc), so I'd have to work some weird IO magic on the side to swap the files or something goofy. whereas with monogame I can just uniform animations based on my sprite sheets and then swap/layer as I liek ^^ also I would have to stop coding and get to working on more art/content and I am currently super limited on time.

you might be right though, it may be a better route, it i don't feel I would learn as much and may end up spending a bunch of time to build a poorly functioning game on a proprietary platform without having learned much about creating software. I've been working with monogame and am happy with what it allows me to do without diving too low or being too removed. ^^
__________________
<Millenial Snowfkake Utopia>
  #8  
Old 11-16-2018, 07:09 PM
Secrets Secrets is offline
VIP / Contributor

Secrets's Avatar

Join Date: Oct 2009
Posts: 1,354
Default

Quote:
Originally Posted by Izmael [You must be logged in to view images. Log in or Register.]
Or you can use Unity and skip, at least for now, the need for worrying about the netcode (which may very well end up being a steep mountain to climb).
Netcode in MMORPGs is the #1 important thing to be worried about, especially if you are concerned about cheating. Validation on the server and knowledge about what the client and server are actually doing is going to be key in stopping undesirables and making an optimized gameplay experience.

Unity doesn't offer a solid netcode solution, or historically hasn't at least. I don't know about now, but Unity's netcode solutions were limited to "Photon" or "Make your own" from what I last looked. UE4 requires a bit more hand-on with replication and client/server functions but is ten times more secure (also ten times the effort, which is not good for indies)
__________________
Engineer of Things and Stuff, Wearer of Many Hats

“Knowing yourself is the beginning of all wisdom.” — Aristotle
  #9  
Old 11-16-2018, 09:05 PM
Izmael Izmael is offline
Planar Protector

Izmael's Avatar

Join Date: Jul 2015
Posts: 2,289
Default

Thing is, someone who is obviously not proficient at TCP/IP programming has ... pretty much zero shot at building a reasonably good netcode solution for an MMO from scratch.

Or at least not in a reasonable time span. So much stuff to learn before even starting.

Existing engines such as Unity or UE offer a degree of abstraction from that concern which may allow the OP to build something that actually works to an extent (before he realizes it will take him many, many years to ship something usable [You must be logged in to view images. Log in or Register.]
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:36 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.