Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / DBPro - LUA - TclTk - Mysql

Author
Message
AlfJan
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location: Germany
Posted: 27th Dec 2008 18:43
Hello,

first of all I have experience in programming TclTk and LUA and several other programming languages. After trying an other 3D Development System (based on LUA) I come to DBPro because it is more simple to use and it's royality free. Now I work me into the Engine and some addons.

I also have experience in Database Programming (Oracle and MySql ...). I figured out that there is no existing plugin to access MySql directly and DBPro is not running under Unix/Linux.

I plan to create a multiplayer enviroment and to use MySql for DBPro. With TclTk I can access MySql and TclTk is able to manage TCP or UPD pipes/sockets. So some CPU power could be split to other Computer to handle and store data (Playerstats, inventary, ...) What I can't find out is how to connect DBPro to a TclTk pipe/socket. Maybe via LUA (extension luasocket) or via an extension for TclTK (TkLua) to share data between Tcl and LUA.

But all this is not so easy. Perhaps there is a simpler way to do?
Is there a socket command in DbPro to share data with an TclTk socket?

I know the ability of dll plugins for DBPro but I do not like to make a DLL because it's a lot of work. (I can code C++ but I search for a simpler way).

Best Regards

Alfred
AlfJan
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location: Germany
Posted: 27th Dec 2008 19:05 Edited at: 27th Dec 2008 20:32
Sorry it's a double post.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Dec 2008 21:27
Quote: "Is there a socket command in DbPro to share data with an TclTk socket?"

There are several.

There's the one I include in my plug-in set which is a minimal wrapper around the windows sockets API. If you know socket programming and you don't mind messing around with the low-level details then you might find this is a good way to go.

Or there's the multisync plug-in which I'm told is easy to use and is relatively easy to interface to other languages. Benjamin is always helpful if you have questions about his plug-in.

There are others too, but the names of them always slip my mind.

AlfJan
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location: Germany
Posted: 27th Dec 2008 21:51
Tanks!

I will try it out. Multisync seams only can be used for player sync. Matrix1Util_28 seems to have an more open access to the outside of DBPro. I will try this Utility collection for connecting to a Tcl socket.

Best regards

Alfred
AlfJan
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location: Germany
Posted: 27th Dec 2008 22:28
It works!

Here the Tcl Server Code - Returned "Hello" hardcoded.



Here the DB Code (from the Echo example)



Seems it was a good decision to work with DPPro now.

Login to post a reply

Server time is: 2024-11-24 16:43:56
Your offset time is: 2024-11-24 16:43:56