Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: MySQL instructions [Re: Dark_samurai] #269257
06/02/09 12:09
06/02/09 12:09
Joined: May 2009
Posts: 445
Peine, Germany
Razoron Offline OP
Senior Member
Razoron  Offline OP
Senior Member

Joined: May 2009
Posts: 445
Peine, Germany
and how to get for example pos_x in the table x, where acc="andavos"?

Re: MySQL instructions [Re: Razoron] #269358
06/02/09 19:37
06/02/09 19:37
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
SELECT pos_x FROM table_x WHERE acc LIKE 'andavos'

May you should get some experience in the SQL-Synatx language.

Regards
TSGames

Re: MySQL instructions [Re: TSG_Torsten] #273397
06/22/09 19:16
06/22/09 19:16
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I have been playing around with lite-c for a few months and wanted to try out a mutiplayer rpg now that I feel at home with this language. I have finally bought A-Net today and will start with that manual tonight.

I would also need a database for my game and have a few questions. My database is not for serverlists, it is for items/players/mobs/skills stats and stuff like that. My game server will be on one computer on my lan and my mysql server will be on another computer also on my lan, the clients will conect from internet (I have set up port forwarding on my router to my game server computer).

I do not know anything about php, but what I do know is that I do not want clients to access my database, only the server will. The game server and the database server will both be on the same lan (not accessed through internet, because i need direct fast access through lan since there will be lots of traffic. For example: each time a player attacks I have to do several "selects", one on the player database for his attributes and equipped weapon, then on the weapons database for the damage, (do calculations with player str, dex and weapon damage), and then again another select on the player database for the defenders attributes and equipped armour, and again on the items database for the armor properties and do final calculations with defender's dex, constitution and armor).

I have lots of experience with SQL as it was one of my courses at my university, but unfortunately I have no experience with php yet.
I was wondering... since I do not need my clients to access my database from the internet... could I connect my gs/anet server to mysql server on the same lan and pass it the queries directly withought having to use php?

(mabe it sounds like a stupid question because I still have not learned anet and have no idea of php)

Last edited by Carlos3DGS; 06/22/09 19:18.

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: MySQL instructions [Re: Carlos3DGS] #273448
06/23/09 00:23
06/23/09 00:23
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
There was a MySQL plugin floating around somewhere.
As far as I know, ANet is has no connection interface to MySQL.

Using the databas is nice but not nessesary at the beginning of the development, as you can handle the basic stuff (prototype)
with 3dgs, using directly implemented data /calculations.

Getting the client/server protocol to run smothely is
harder than getting data excchange for the server and a database.

Re: MySQL instructions [Re: Damocles_] #273590
06/23/09 15:58
06/23/09 15:58
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
A direct connection to MySQL is not supported, but over php you can easily get access.

Here a german site explaining php-sql programming in detail: http://www.schattenbaum.net/php/

But for php you will also need a webserver? (sorry, but I have no clue of how the servers have to be set up).


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: MySQL instructions [Re: Dark_samurai] #274006
06/25/09 10:32
06/25/09 10:32
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I have a few of questions.

-Can anyone point me to a MySQL plugin like that? (Lite-C to MySQL)

-do you know of a php-sql web like that but in english?

-In the ANet manual it says "the latest VC 2008 Redistributable Package must be installed", will the pc running the final client also need to install this?

-My server and client will be two different gs applications because I dont want them to have my server code. In the manual I read this
Quote:
"It's better to use Lite-C instead of C-Script. Some functions like enet_send_var cause much less traffic in Lite-C. In Lite-C you can only use clients and servers that are started with exactly the same version of your game. In C-Script, you can use different Versions."
but I also read this other thing in the manual
Quote:
"Please notice: If enet_send_var, enet_send_array or enet_send_string are used in Lite-C, all clients and the server has to be started with the same application (= the same source code)!
Please notice also that all clients and the server have to use the same scripting language!"
. So I wanted to know... if I use Lite-C, will those three functions be the only ones i cannot use? If there are more, what other functions will not work?


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: MySQL instructions [Re: Carlos3DGS] #274013
06/25/09 11:06
06/25/09 11:06
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Quote:
-Can anyone point me to a MySQL plugin like that? (Lite-C to MySQL)

This is the one from Joozey:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=220503&page=1

Quote:
-do you know of a php-sql web like that but in english?


Google result: http://www.freewebmasterhelp.com/tutorials/phpmysql/2

Quote:
-In the ANet manual it says "the latest VC 2008 Redistributable Package must be installed", will the pc running the final client also need to install this?


This should be automatically be installed on all new pc's. The old ones have to install that, yes! But that would also be the same when anet would be written with older vc++ versions.

Quote:
-My server and client will be two different gs applications because I dont want them to have my server code.


Lite-C uses the handle of vars, arrays and strings by default. This causes less traffic then using the name of those elements. C-Script has no handle function like that => names are used by default. You can switch the Lite-C mode to also use the names with the function anet_use_handles().
But I would dehort you to use the variable names, better find a methode to protect your code so that they can't get access to the server code.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: MySQL instructions [Re: Dark_samurai] #274308
06/26/09 13:21
06/26/09 13:21
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
I had also found that plugin by Joozey, but it only connects to his own database which is not viable for this project. and also he said:
Originally Posted By: Joozey
It's suspended for an undefined amount of time.

Do you now of any other MySQL plugin?

Originally Posted By: Dark_samurai
You can switch the Lite-C mode to also use the names with the function anet_use_handles().
But I would dehort you to use the variable names, better find a methode to protect your code so that they can't get access to the server code.

Im afraid having the server code on the clients is not a good option. The code is compiled in ann exe and that would be sufficient to protect from the average user, but I would prefer not to have any part of the server code there for more advanced users.
I will take a look at the function anet_use_handles().

Thanks for the info smile


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: MySQL instructions [Re: Carlos3DGS] #274429
06/26/09 19:09
06/26/09 19:09
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands


Click and join the 3dgs irc community!
Room: #3dgs
Re: MySQL instructions [Re: Joozey] #274671
06/27/09 22:44
06/27/09 22:44
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline
User
Carlos3DGS  Offline
User

Joined: Oct 2008
Posts: 513
thankyou very much smile


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Page 2 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1