Jump to content

network support


panz3r
 Share

Recommended Posts

Long story short: Leadwerks 3 doesn't have a networking API and I doubt it will be build in really soon. It has not been mentioned on the previous roadmaps (as far as I can remember) and there are many other features that have a higher priority.

 

Leadwerks allows you to use whatever library you want to work with or even write your own library. If networking is that important for you to have in the API of the engine, then we can conclude (for now) that Leadwerks is not suitable for your needs. Hope that makes your decision easier. smile.png

 

I do want to say that cross platform network support would be cool to have in the API. I don't have the experience to say how complex or easy it is to implement this though. And although we can implement whatever we want, it could be very useful and might attract a lot of people.

  • Upvote 1
Link to comment
Share on other sites

Long story short: Leadwerks 3 doesn't have a networking API and I doubt it will be build in really soon. It has not been mentioned on the previous roadmaps (as far as I can remember) and there are many other features that have a higher priority.

 

Leadwerks allows you to use whatever library you want to work with or even write your own library. If networking is that important for you to have in the API of the engine, then we can conclude (for now) that Leadwerks is not suitable for your needs. Hope that makes your decision easier. smile.png

Thank you.

Link to comment
Share on other sites

@panz3r just wanted to throw in my 2 cents. Just b/c LE3 doesn't directly have a networking lib built in doesn't mean you can't link your own. I want to make sure i get this right. i gathered that you want an external lib because you don't know how the mobile platform handles sockets like how to set them up and listen for messages? if that is the case i'm going to think out loud. TCP/IP and UDP are industry standards, because they are industry standards that allows them to connect to any WIFI, communicate with the WIFI hotspot, send TCP/IP web requests on port 80 receive the incoming packets on what ever port was decided on the TCP/IP handshaking that was done. So with that logic, i don't see why networking on the mobile will be any different than networking on a desktop. Now if you really wanted to know (as i did no research for this) then you can always google iOS/Android Network protocols, API or something along those lines.

 

EDIT:

here is the link for iOS documentation in its entirety. There is a topic on the left hand side called "networking" I have used apples documentation and they do include code samples for the topics they are explaining.

https://developer.ap...tion/index.html

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

@xtreampb. Thank you for the advice and for the links.

 

I think i made my mind, i will let mobile out of the scope for now as i don;t have any experience with ios or android and is to much to chew right now. I will focus on windows (and even better linux if/when we will have linux).

Link to comment
Share on other sites

Not to detract from the value of networking in LE but if your looking for an instant fix for mmorpg that requires less coding then check out RealmCrafter, I had a license there when it was pre-release and I hadn't used the language before and could handle anything an mmorpg required via there editors.

Operation Mosquito

Recruiting 3d Modeller/Animator. (pm if interested)

 

It is the greatest of all mistakes to do nothing because you can do only a little. Do what you can. - Sydney Smith
Link to comment
Share on other sites

I dont want you to stop your dream project, just do it. I guess anyone here has a big (unreachable (at this moment) dream project).

 

You can believe it or not but a modern c++ compiler knows best whats todo compared to a hobbyist programmer ( you can ask in every c++ forum / msdn mailing list )

 

 

 

To the networking thing:

 

For windows you have to use winsock (winsock2).

For linux its posix (berkeley) sockets.

The good thing is the functions have nearly the same names and the better thing is they work nearly (exactly?) the same.

 

Im right on developing my own networking library but just for windows/linux, you have two options in my opinion (if you are doing it yourself)

1) write an interface and create an implementation for windows/linux

class ISocket
{
public:
virtual void send(byte* data, int size, ....);
virtual void recv(....);
};

class WindowsSocket : public ISocket
{
public:
void send(....)
{
// do something send in here
}
void recv(...)
{
// do something receive in here
}
};

class LinuxSocket : public ISocket
{
public:
void send(....)
{
// do something send in here
}
void recv(...)
{
// do something receive in here
}
};

 

But that's just the beginning, you have to care about complete sending/reading of packets, order of packets, resending lost packets (only if reliable (UDP)), how to send data (Endianness, Compression, Data Type (byte array is just an example its pretty old and out of date, today you would use something like bit/byte-streams).

 

A lot of work, as you can see wink.png

 

Im just doing this task because i want to know how things work internally, once i get a simple library to work - i will probably use also RakNet afterwards.

 

2) write your socket class with many #ifdef #else #endif

 

Or you could use Enet/RakNet and before you say "unity..." Raknet isn't unity... go for it and test it. If your test reveal its not suitable for you then you can switch to an more low level API like ENet.

Link to comment
Share on other sites

@Furbolg, thank you for your example.

My confusion was coming from thinking that leadwerks is transforming c code in java for android and i wasn;t sure how can i hoock in that java code. Also i wasn;t very sure if is alowed to call random OS api from leadwerks application.

Today I spent some more time and i understood is NDK and there is no code transformation done.

 

I am cool with c programing and sockets, i am programing pretty much daily in c under linux at low level (sockets, network protocol analysis etc). (not much experience with windows api but leadwerks will hide that for me and sockets are simillar)

Also i am very familiar with low latency realtime network protocol from my voip and iptv programing background.

Having this experience is better for me to write myself the communication protocol instead of relying on an external library. I believe this will also help me on optimizing server side. (for example in eve one of the major bottleneck was server side network).

 

@Josh. Thank you for enet library hint, it will be my fallback plan if socket plan fails.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...