Game Development Community

Downloading from database

by Daniel Brown · in General Discussion · 06/28/2004 (7:28 am) · 32 replies

Hey all,

Well I will need to, in my game, download from my database new object, enemies and other things with their stats and that, but i am asking how would be the best way to store this info when its downloaded, what way can i store it so its in a database like format so i can easily access it? and most importantly how can i stop the user from editing with ease?

i know there will be some who might spend weeks trying their best to crack it but hopefully if they do change it, the game will realise and download the correct data again.

Thanks for any help!
Page «Previous 1 2
#1
06/28/2004 (7:47 am)
Are you talking about a Torque game? I notice you've posted in the general discussion area...
#2
06/28/2004 (8:22 am)
I don't understand what you're saying Daniel, but if it's TGE you're talking about, have a look at the database resources posted. SQLLite I think is a good bet.
#3
06/28/2004 (9:22 am)
Yer im on about torque but it seemed to me something that anyone could answer, not just torque users as its not really to do with the SDK or coding as such just really tryin to get ideas on it. ok ill try explain again.

Basically I have an SQL database that contains data on weapons, stats, monsters and items etc which I will regularly update with new stuff for people to use. I have made my own methods of connecting to it and getting data from it. My game is a sort of MMORPG(miniscule multiplayer online rpg), each time you play you go on a quest, say a dungeon or search a mysitcal forest, either on your own or with a band of warriors, so I need to keep it stocked with new armour and monsters etc and store all the player stats.

The way it is going to work is like this, i am going to download(each time the game starts up) the whole item database, weapon database, monster database and any others i might need, this is so that hopefully it should run alot quicker rather than connecting to the database everytime someone needs data on something. Though each time the game starts It will check for any changes.

Now what I am stuck on is storing the data when it has been downloaded? Im not sure how I should go about it, so I am asking you guys for any ideas or opinions. Do I store it in another type of database(MySQL,SQLLite)on the clients computer? slap it in an access or excel file? in a text file? Im not sure what to do here. What I do know is that i need it to be hard to get into and change any stats.

I hope that has made it a bit more clear!
#4
06/28/2004 (10:18 am)
I would use a datablock or a regular string.. but I know many will yell out at me for saying "string" so :) Just use a regular storage class, like a datablock?
#5
06/30/2004 (12:38 pm)
I think you are optimizing something that is already very fast. Models might take a bit of time to get on an as-needed basis, but the stats of a weapon or a monster or two will download almost instantaneously.

But, if you do go ahead and download everything at startup you definitely need something that is indexed like a database. That is assuming that you have more items / weapons / monsters than will fit conveniently in memory. Even in memory, you'd want to binary search it.
#6
07/04/2004 (6:35 pm)
Sounds like you're overcomplicating it. I'm doing the same thing and aside from loading a chunk of stats at game time, there's very little you need the client to load. If it's an orpg, then most stuff takes place on the server, and the client is really just a messenger of what happens there. Downloading stats that aren't being used to a client is wasteful and insecure.

Files, on the other hand... Well, what if the player doesn't use half the files that get downloaded? Will they do so much running around that they'll need to get updates for everything in the whole world at load time? It's probably a waste of bandwidth, and you can put a loading function for zone specific content in the zoning triggers or server transfer functions, so that way the loading of objects is spaced out and only done when needed. You can further go into that by checking the dates on files and updating only what needs to be updated. And if a person wants to hack the graphics on their client without affecting anyone else, then that's their problem, IMHO. Hope that helps.
#7
08/08/2005 (12:03 am)
My team is trying to create a mutli-player game. We need to link torque to our database, which is on a Sql server. however we got no idea how to do it. can anyone point me in the direction of a tutorial or just tell me some basics so that i am able to get started.
#8
08/08/2005 (1:20 am)
You're not a Torque licensee. If you were, you could find the SQL resource.
You can't link Torque to anything without a license.
#9
08/08/2005 (1:26 am)
Http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Database_Topics_.28.ODBC.29.asp
#10
08/09/2005 (7:43 pm)
Stefan, adam is in our team. we do hold a license. we try searching and got some information. however, we r still not sure wat to do. can u suggest something.

and daniel, thks. i will go check that site.

chunwei(student of tp)
#11
08/10/2005 (5:38 am)
Temasek,

What database are you guys running? Incase it's MySQL you really should take a look at the MySQL resource, it's great.
#12
08/10/2005 (6:18 pm)
Stefan, i think the database we using is MS-SQL. is it similar to Mysql?

chunwei (student of tp)
#13
08/11/2005 (2:27 am)
I'm running ms-sql, and this is what you need

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2737

Works wonderfully. Ms-Sql and MySql are pretty similar except ms-sql as you know costs alot and mysql is free.
#14
08/12/2005 (12:49 am)
Daniel, thank for the help.
i went to that resource before and want to try it out. but i don't know where to get the two lib (ODBC32.lib and ODBCCP32.lib). tell me the way.

chunwei (tp student)
#15
08/12/2005 (3:20 am)
As I remember it you need to download MDAC, which gives you all the odbc drivers and other database drivers you need.

http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&displaylang=en
#16
08/12/2005 (5:00 am)
Temasek,

Just wanted to make sure you were aware of the EULA, you mentioned
Quote:Stefan, adam is in our team. we do hold a license.
in one of your posts.

The only person who holds the license would be Adam; not you, the team or company.

Quote:
Licensor grants Licensee a single seat to an individual, a limited non-exclusive, non-transferable license to use the Torque Game Engine (Engine) for the purposes of making source code and object code for an unlimited number of electronic single or multi-user Games ("Games").

-Ron
#17
08/14/2005 (5:55 pm)
Thk again daniel. i downloaded the file and will be trying it out later.

and Rod, wat i was trying to say was each of us in the group i having a license.
#18
08/15/2005 (1:52 am)
Daniel, i am stuck again. when i try to recompile torque after the adding of the ODBC32.lib and ODBCCP32.lib, the 2 .cc files and the 2.h file. i got the following error:

C:\PROGRAM FILES\MICROSOFT DATA ACCESS SDK\INC\sqltypes.h(275) : error C2146: syntax error : missing ';' before identifier 'Data1'
C:\PROGRAM FILES\MICROSOFT DATA ACCESS SDK\INC\sqltypes.h(275) : error C2501: 'DWORD' : missing storage-class or type specifiers
:
:
Error executing cl.exe.

a total of 36 error.

any idea y this happen? what can i do?

chunwei
#19
08/15/2005 (4:02 am)
Temasek,
Quote:
and Rod, wat i was trying to say was each of us in the group i having a license.
Adam's profile says he doesn't have a license, so that is not true.
#20
08/15/2005 (5:10 pm)
He just use another acc to post therefore it appear as no license. can someone tell me wat i can do about those error.

chunwei
Page «Previous 1 2