panz3r Posted June 2, 2013 Share Posted June 2, 2013 I am wondering how tcp/ip (udp) networking can be done with leadwerks. I supose winsock can be an ideea for windows but how about the rest of platforms ? If somebody can post some small examples for sending and receiving an udp packet (maybe with storing and retriving a variable) would be great. Quote Link to comment Share on other sites More sharing options...
Rick Posted June 2, 2013 Share Posted June 2, 2013 You might want to look at something like RakNet. It has crossplatform support. Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 2, 2013 Author Share Posted June 2, 2013 Thank you for answer. Unfortunately raknet is not free. Having tcp/udp sockets available i think is a must for any game engine. Also using my udp socket i can make very good usage of bandwitch. I plan to make some sort of simple space mmo. Even if there will not be much content, i want to be able to scale hundreds of players in same location, which can easily escalate the bandwitch unless proper planning is done. Quote Link to comment Share on other sites More sharing options...
beo6 Posted June 2, 2013 Share Posted June 2, 2013 As far as i have seen there is ENet already included with Client and Server Classes. But i think is only used for making the local debug connection at the moment. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 2, 2013 Share Posted June 2, 2013 The Enet implementation will actually work across networks, but we don't have it documented and it's not officially supported. I think networking support needs total integration in the engine, not just data exchange, so we haven't attacked that area yet. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
panz3r Posted June 2, 2013 Author Share Posted June 2, 2013 Can you please share some enet doc/example even if is not yet officially supported ? No net(sockets) is a boomer for me. Quote Link to comment Share on other sites More sharing options...
beo6 Posted June 2, 2013 Share Posted June 2, 2013 Like Josh said i would not recommend using it since it is not official. The Api can always change in these parts and then your game would stop working. I am also not sure if ENet is really usable for an MMO. MMOs are really hard. Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 2, 2013 Author Share Posted June 2, 2013 Although I would prefer UDP socket directly the enet library would be better than nothing. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 2, 2013 Share Posted June 2, 2013 Why would you need us to do that? That's pretty low-level stuff. Can't you just start using it in C++? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
panz3r Posted June 2, 2013 Author Share Posted June 2, 2013 Why would you need us to do that? That's pretty low-level stuff. Can't you just start using it in C++? So everything related to sockets in this case that would work in a random c++ program compiled with MSVC 2010 will work flawless in leadwerks on windows, IOS, ANdroid and Macos ? If this is the case then yes I don;t need your help. Otherwise my case stands - i need a way to do networking and i need help for this. Edit: I want to implement this: http://krkadev.blogs...-rpg-games.html Second edit: All i need to konw the recomended way of doing this, if is something like generic sockets or standard enet calls,or an example if is something specific to leadwerks engine. I don't think that my request is unresonable, other game engines in same price range(that i look at) offer this: Unity, Esenthel. Quote Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 3, 2013 Share Posted June 3, 2013 so... lemme see if i got this right... you wanna just pop in a few lines of code here and there... and pop out the next great MMORG... well heck, i don't see anything unreasonable about that... --Mike Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 3, 2013 Author Share Posted June 3, 2013 I asked UDP sockets. If don't comprehend please don't post of topic. Quote Link to comment Share on other sites More sharing options...
Furbolg Posted June 3, 2013 Share Posted June 3, 2013 Besides the MMO(RPG) for Android/iOS thing (mmo in tablet/smartphone ?... really ?), where is the problem to write your own encapsulation of an UDP socket class in c++ ? Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 3, 2013 Author Share Posted June 3, 2013 Thank you for your answer. For windows is no problem - i can use winsock. For mac i don't really care, and i am sure there are sockets. Like you said the problem remain on tablets. I am not sure why you are dismissing mmo on tablets, but anyway this is a different topic - why i want to do that there. In any case implementing udp sockets in leadwerks engine should be extremly easy as all platforms have native sockets and sockets are more or less same evrywhere. The enet library would be better than nothing (it adds traffic overhead and potentially lag due to retransmission - if it does retransmisions). To be honest i am bit surprised by this general hostility on my request, especially considering that other engines like Unity and Esenthel have it. (ok unity require 3000$ for pro on base and one mobile but still it can do this, as for esenthel is 200 all all platform included). At the end of the day I am sure i am not the only person that needs this and having this documented (and maybe implemented if there is nothing curently) would only be benefic to the engine. Is a big feature for very little work. BTW i believe in the value of this engine - i bought all 3 packages. Quote Link to comment Share on other sites More sharing options...
Rick Posted June 3, 2013 Share Posted June 3, 2013 I actually wish Josh would integrate RakNet. They have a license where he could purchase it and wouldn't require us to purchase or follow their current license. Josh would have to distribute the one time cost to us but it's a proven cross-platform network library and if Josh does his own implementation he'll still most likely be charging us anyway. I'd be more willing to pay for a network package from a stable networking library. Quote Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 3, 2013 Share Posted June 3, 2013 I asked UDP sockets. If don't comprehend please don't post of topic. oh... i'm sorry... i failed to see the direct connection between "UDP sockets" and "MMORG" forgive me... --Mike Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 3, 2013 Author Share Posted June 3, 2013 My programming experience is mostly c in linux. I can understand the benefits of a proven library but at the end of the day a well tailored c program will beat a generic library. In a mmo every byte pushed on network counts (especially for mobile users) and every cpu cycle counts if you want big world non instanced . The mmo i dream would be a space bassed one, pretty much like eve. Obviously it will not have too much content at start . WIll be pretty much 2-3 ships, 2-3 weapons for ship, mining lasers, blueprints/receipse to build weapons and ships and that's it pretty much. However i don;t want to take any shortcut in the code optimization on server side and on the networking. Quote Link to comment Share on other sites More sharing options...
ZioRed Posted June 3, 2013 Share Posted June 3, 2013 @panz3r: there is nothing wrong in your request, and I agree that network should be in any nowadays engines, as well as a GUI system in example... but the fact that there isn't still (read Josh's post: we haven't attacked that area yet), does not imply that it will not be added at later stage since it was there on LE2 and hopefully LE3 has more features and not lesser than LE2, I think you have only to wait for it to be fully implemented and released (but I am with Rick on this topic, I'd prefer to better use RakNet than Enet). I actually wish Josh would integrate RakNet. They have a license where he could purchase it and wouldn't require us to purchase or follow their current license. From here it seems should cost about 103k $ (if I read correct: 50k for the first platform [say Windows] and 17.5k for each additional [Mac+iOS+Android]), that is definitely not peanuts... I remember that it took me few hours to integrate RakNet on LE2 (and I am not a C++ expert), so it should definitely be straight-forward to import it for an experienced C++ guy. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 3, 2013 Share Posted June 3, 2013 well... as i see it, and just to broaden the discourse a little... there's more involved in making just a simple multiplayer game than the type of connections you decide to use... and this is before we even begin thinking about creating a MMORG... a lot of people see the process as simply adding a xxxNet Lib and connecting your objects (entities, whatever) to it... i see it as being just a bit more... and i think that since Leadwerks 3, unlike LE2, IS actually a game engine... it is rapidly approaching the point where if networking isn't made as an integral part of the core logic, it's gonna mean a future of pain and suffering for the devs... that is... unless Josh is planning on doing all the heavy lifting here... then he's gonna be the one to suffer the most i always go back Torque's implementation of networking, and how it works... i base everything i do networking wise based on their model... ghosting... prediction... stuff like that are more important to me than sockets... raknet ding dongs... tcp/ip... all those things work quite well... it's how they're being exploited by the engine that's of greater interest to me... --Mike Quote Link to comment Share on other sites More sharing options...
Rick Posted June 3, 2013 Share Posted June 3, 2013 From here it seems should cost about 103k $ (if I read correct: 50k for the first platform [say Windows] and 17.5k for each additional [Mac+iOS+Android]), that is definitely not peanuts... I remember that it took me few hours to integrate RakNet on LE2 (and I am not a C++ expert), so it should definitely be straight-forward to import it for an experienced C++ guy. For sure not the cheapest and Josh would have to charge us for it, but the idea being that Josh can spread that cost out over time with the customers he gets for LE. Also, it wouldn't have to be as is. The way I look at it, this would give RakNet for Josh to use as the base networking library and can wrap it up into LE specific networking. That way you know your starting from a library that is tested and performs and handles all the platforms (and more (consoles)). Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 3, 2013 Share Posted June 3, 2013 I would rather have Josh's time spend on improving the editor, ironing out bugs, terrain and openGL4 than spending time on Networking. I agree with Red Oktober that people think it is easy to do networking once you have a proper library while most of them don't know how or even have finished a simple single player game. MMORPGs are, in my opinion, a massive undertaking that are not fit for a very small team, let alone a single person. That said, the only time that I used networking for a Game, I used Enet in combination with SFML. I thought performance was pretty good but I have no idea how it would behave in 100+ players environment with complex server structures behind it. 2 Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 3, 2013 Author Share Posted June 3, 2013 Well I can implement myself the interpolation and extrapolation for better or worse but to send the packet out I need support from engine. I think there is room for a low level and high level net lib Quote Link to comment Share on other sites More sharing options...
Furbolg Posted June 3, 2013 Share Posted June 3, 2013 I think you are on the wrong way. 1) I can understand the benefits of a proven library but at the end of the day a well tailored c program will beat a generic library. I can tell you, a modern c++ compiler will beat your well tailored c code. 2) You will definitly have tasks that require the same programm knowledge/skill (or even more) and now you are asking for a ready to use solution ("make network"). Sorry if im a bit harsh but to me its sounds like the old "im gonna make a mmo" Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 3, 2013 Author Share Posted June 3, 2013 Aggror, thank you for your tutorials, they are great. Now about networking,enet would suffice my needs, if would still work. However if I can't find any solution for mobile networking I will have to move to another engine and call it day. Quote Link to comment Share on other sites More sharing options...
panz3r Posted June 3, 2013 Author Share Posted June 3, 2013 I think you are on the wrong way. 1) I can tell you, a modern c++ compiler will beat your well tailored c code. 2) You will definitly have tasks that require the same programm knowledge/skill (or even more) and now you are asking for a ready to use solution ("make network"). Sorry if im a bit harsh but to me its sounds like the old "im gonna make a mmo" 1. Not in this world, best case they will be equal 2. I ask for an api, that works on mobile too. For windows (and probably macos) i can do myself but i know nothing about android and ios What's your problem if i try to make a mmo ? I didn;t asked you to pay my license for programs or anything. All i asked was example or at least the API for networking. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.