|DaBooda Turbo Network Class Forum|
|Sion||After many hours of mind bending and hard work I'm finally able to present the release candidate of the network class for the DaBooda Turbo engine.
The class is build for the single purpose of providing an all-in-one interface for easy game-related communication over LAN and the internet. The class contains both the server and the client functionallity, and the *only* difference in their usages are if the connection is activated using the command .StartServer or .StartClient (unless you want to use some of the more advanced server/client only functions). This means that you just give the class instructions and it will handle the communication no matter if it's server or client. The class is extremely easy to use and starting a server/client, sending data and reading recieved data is just *one* line of code... each :)
I haven't documented the usage of the class yet, but I've included a few examples of how to use it. These examples both shows the versatility and ease of usage. The class itself is heavily commented, but some of the internal working are quite mind bending so just ask me if your curious about anything... I should probably be able to provide some kind of answer :P
Because of some limitations in the way Visual Basic works the class has to be bundled with a form, that handles the Winsock control, in order to work. So both the DBNetwork class and the frmWinsock form has to be added to a project in order to use it. The code is not final and all comments, requests, bug reports etc. are greatly appreciated.
Hope you like it :)
Download Attachment: [url="http://www.vbgamer.com/msgboard/uploaded/Sion/2004710191837_DBNetwork_RC.zip"][img]icon_paperclip.gif[/img]DBNetwork_RC.zip[/url]|
|VBBR||I've not looked at the class yet, I will do that tomorrow, but... - Why Winsock and not DirectPlay? - Can't you add the Winsock control as a REFERENCE and then create it in code like "Dim ws as WinsockControl" or something (don't know the class name of the winsock control)|
|Sion||First, I've heard nothing but bad things about DirectPlay and many people are flamming the API on game devellopment forums for being just plain stupid. Most modern games use the Winsock API for networking. They use the pure API however, which is pretty hardcore stuff to work with - especially in Visual Basic because pointer, for instance, is involved. I've also worked a little bit with Winsockets in the past so I was able to use some of that experince. Then Winsock is also multiplatform, but that really dosn't matter that great a deal in this case :P Second, well... your right, but what I is really need "Dim WITHEVENTS ws as WinsockControl". I need to be able to catch event being fired from the winsock controls. Furthermore, because I need to be able to handle multiple connections (and each TCP-connection is Peer-To-Peer) I have to create/destroy controls at runtime. This eliminates the possibility of using references because you can't handle events from a control array... using refernces that is. Because you CAN handle event from control arrays using controls instead of references. Strange but true. I've been doing a lot of reseach, and this is the cleanest and fastest way unless you want to get down and dirty with the Winsock API. Thanks for your comment! But take a look at the code and you'll see that is isn't that big a deal to have to use regular control arrays. PS. I won't be home again untill tomorrow.|
|VBBR||I've just looked at everything now, looking really good!|
|Scorpion_Blood||gj sion ;) iv also updated the news page! now im gona be off for today! and maybe in the middle of the week i will reply something, bye all|
|Sion||Okay, a very quick update!
I'm done with version 1.0.0 of the DBNetwork class. A lot of things have changed during the beta-version... hopefully it's all for the better. I have made a help-file/documentation of the class that discripes the different methods and functions availiable.
I have also made a few examples, one of which I an example of the class used to make a multiplayer game with the DaBooda-engine. It was (and still is) my plan to base a tutorial on that example, but I haven't got the time right now... In fact I havn't even got the time to fix some of the few bugs I've noticed in the example.
The reason for this is that I'm going to Lloret de Mar in Spain tomorrow, where I'm going to spend a little more than a week sunbathing, relaxing and getting insanely drunk. I'm leaving in... 9 hours.. I think, and I haven't finished packing yet, so I'm very stressed right now. And I've spend most of today trying to get version 1 completed... I hope its good enough.
I won't be home until the 26th of July, so I would have liked to chat with DaBooda about the class and version 1.4 of the engine, but I guess that will have to wait. But DaBooda, this is the version that should be included in the engine, and I will fix any bugs found while I'm gone. Although it's version 1, it's still a work-in-progress, and if it can be improved please notify me and I will try to do that. The game example is build with version 1.3 of the engine, so DaBooda please check that it's compatible with the new version...
I'm very sorry for being sloppy about this release, but I really have no more time before I'm off. I promise that I'll fix the shortcommings when I get back.
Enjoy the class, bear with the lack of final pollish and please give me any kind of feedback, good or bad.
See you when I get back!
The attachment contains the source of the class, a few different examples of usage and a documentation of the accessable methods of the class.
Download Attachment: [url="http://www.vbgamer.com/msgboard/uploaded/Sion/200471515420_DBNetwork_v1.0.0.zip"][img]icon_paperclip.gif[/img]DBNetwork_v1.0.0.zip[/url]|
|masterbooda||Well it looks like I am both late and too early, so I will download this and see what its all about... Hopefully we can get this thing going with the release of 1.4... but I was thinking... since this class is all networking and communication... will it really need to be part of the v1.4 dll... because if not, we can distribute it as a stand alone... to add on to a project... this way we can keep updating the class without having to update the engine... because after this incompatibility issue I am trying to avoid others... Of course I am jumping the gun... I will go home and try this out... I wish to god I had internet, this blows monkey chunks... having to work on this thing via library... Makes it real hard... but I will contact you again when you return.... DaBooda out...|
|Almar Joling||DirectPlay8 is nice, but you can't mae Linux servers for it. My only reason not to use it in future projects. (If you don't want to use Linux servers, DP8 is very nice) Second, on www.pscode.com there are some Winsock API wrappers that work completely like winsock.. so you do not need the 500kb ocx thing.. but still keeping .SendData and stuff :)|
|VBBR||Which versions of Windows does the Winsock OCX come with? (edit: grammar correction)|
|Sion||Hey I'm back again! (Fantastic holiday by the way [8D])
It sounds very good that you're finished with version 1.4 - I hope that we get to see it sometime soon.
quote:That sounds like a very good idea! It would allow me to make changes in the class without having to touch the main engine. The network class could also be left out in games where it isn't needed. I've just done a little bit of LAN testing of class and found a few (but very critical) bugs that I'll correct tomorrow (I'm pretty wasted after nearly 30 hours in a bus). To my surprise, the DaBooda engine didn't work on my laptop - I keep getting an "Automation error" when trying to load textures... Oh, well it's probably just some stupid mistake I'm making. I'll investigate more into it tomorrow.
|Scorpion_Blood||hey sion ;) nice vacation? hehe thats funny sometimes i get that error too... and precisely when loading the textures in my other machine (home server) not this im using... ho well hope it is fixed in 1.4 ;) welcome back Sion ;)|
|Sion||Thanks, and yes - it was a very good vacation (a long overdue one as well)! I haven't been able to find out why I'm getting an error message while loading textures on my laptop. It might be a DirectX problem. I have, however, been able to eliminate the bugs in found in my network class. They were fairly easy to locate and fix. So now I'm just waiting for DaBooda to release version 1.4 of the engine so I'll be able to make an example that works with that version. Hope the texture-problem is fixed in the new version. It's too bad that DaBooda dosn't have internet at home, it really makes communication and team-work that much harder... and more time consuming. In Denmark you can get a decent broadband internet connection for about 150 danish kroner/month - that's in the area of 25 US dollars, but if you can't afford it, you can't afford it. Come on with version 1.4 so I can get the network class done, and get some of my ideas out of my head and down in code!|
|Scorpion_Blood||here in portugal u can get to for around 15€ (around 20USD) a nice cable connection, 128Kbps... ho well, anyway were does he lives?|
|VBBR||masterbooda? I believe that's in the US...|
|masterbooda||why yes it is...lol That is great news about being able to make the networking class independent... this un complicates the release by a bunch... one day I will be a normal person again and have internet, but I have so many bills to catch up on first... As for the error during texture correction, this is a blow to me, for I did not realize this, but can you do me a favor, can you try updating your video driver and if this doesn't work, can you try a different format in the add command... see if the card just wont except the format that is default... hopefully one of those will work, and if not, I will have to figure something out... maybe another great debug...lol... because by default the engine creates textures with a 32 bit argb format... maybe that has something to do with it... also good news, for I am sure sion asked me this, v1.4 has uneven texture support... for some reason I got powers of two confused with square... lol... well I am on a tangent here... Read the turbo forum for news on the release of v1.4 and I do hope it stands up to a new version, for all the pressure of getting this thing out...lol DaBooda out... And yes still alive, just working to much...|
|Brykovian||Sion ... I haven't had a chance to look at your networking class yet ... but it looks like you're putting together a nice effort. Are you using the Microsoft Winsock Control that comes with VB? If so, you might want to switch over to the free SocketWrench control ([url]http://www.catalyst.com/products/sockettools/socketwrench[/url]) ... I've heard good things about it (as easy to use as the MS control, but better handling of memory, smaller footprint, no leaks, etc.) and plan to use it for my future projects. Otherwise, if the MS control is doing the job, then I suppose you don't need to fix what isn't broken, eh? -Bryk|