RPG Resource 1 AKA SQLite3 for T3D
by Kevin Mitchell · 10/04/2009 (10:36 pm) · 30 comments
File Front:
Download Source
1: Download the .zip file and extract it.
2. Copy the Engine Folder into: "C:TorqueTorque 3D 2009 SDK 1.0"
3. Open your project code.
4. Right click the 'project name' DLL project, go to properties.
5. Expand Linker, select general, Under Add lib. Dir. add the sqlite directory:
C:TorqueTorque 3D 2009 SDK 1.0Enginelibsqlite3
6. Next select Input, and under Additional Dependencies add
sqlite3.lib
7. Right click the 'project name' DLL project, go to add folder and name it 'sqlite'.
8. Right click the sqlite folder. Add -> Existing File -> select the files in:
C:TorqueTorque 3D 2009 SDK 1.0Enginesourcesqlite3
9. Compile.
10. Add sqlite3.dll and sqlite3.exe to your game directory.
11. Create your database by running cmd and in you game directory type:
sqlite3 Database.db
12. use .help for a list of options and enjoy using sqlite in your game.
Note: the database.db file is created after you exit sqlite.
Much credit to the guy that first created the SQLite 3 source. Without that i wouldn't know how to create the lib files from the sqlite website or the changes needed to make things note crash.
Enjoy.
Back To Blog:
RPG_Blog AKA New Resources
Download Source
1: Download the .zip file and extract it.
2. Copy the Engine Folder into: "C:TorqueTorque 3D 2009 SDK 1.0"
3. Open your project code.
4. Right click the 'project name' DLL project, go to properties.
5. Expand Linker, select general, Under Add lib. Dir. add the sqlite directory:
C:TorqueTorque 3D 2009 SDK 1.0Enginelibsqlite3
6. Next select Input, and under Additional Dependencies add
sqlite3.lib
7. Right click the 'project name' DLL project, go to add folder and name it 'sqlite'.
8. Right click the sqlite folder. Add -> Existing File -> select the files in:
C:TorqueTorque 3D 2009 SDK 1.0Enginesourcesqlite3
9. Compile.
10. Add sqlite3.dll and sqlite3.exe to your game directory.
11. Create your database by running cmd and in you game directory type:
sqlite3 Database.db
12. use .help for a list of options and enjoy using sqlite in your game.
Note: the database.db file is created after you exit sqlite.
Much credit to the guy that first created the SQLite 3 source. Without that i wouldn't know how to create the lib files from the sqlite website or the changes needed to make things note crash.
Enjoy.
Back To Blog:
RPG_Blog AKA New Resources
About the author
Riding Solo since 2005. Current Project: Fated World 2005-Present RPG Engine Tool Kit - Now available.
#2
There is no add folder ... did you mean add filter?
Also did you just add that that directly to the root dll filter like so
Project DLL
.. sqlite
.. Source Files
Or Do I add it under the source section like so
Project DLL
.. Source Files
.... Engine
...... sqlite
.... Source
.... Torque.rc
10/05/2009 (4:45 pm)
Excellent resource thank you. One comment/question but in step 7.Right click the 'project name' DLL project, go to add folder and name it 'sqlite'.
There is no add folder ... did you mean add filter?
Also did you just add that that directly to the root dll filter like so
Project DLL
.. sqlite
.. Source Files
Or Do I add it under the source section like so
Project DLL
.. Source Files
.... Engine
...... sqlite
.... Source
.... Torque.rc
#3
10/05/2009 (9:19 pm)
Yes the second one, the files should be situated like the file system. If you droppeds the engine folder in the torque directory the it should work ok.
#4
10/05/2009 (10:34 pm)
thanks a lot, we need this asap! ;D
#5
10/07/2009 (7:24 am)
Please let me know if anyone is having problems. I'll see if I can help.
#7
Cooooooool!!!!!
10/08/2009 (3:03 pm)
Yes, thank you very much. It looks as if you are sharing a complete RPG 'lite' kit for T3D this way. Cooooooool!!!!!
#8
10/08/2009 (3:25 pm)
There is a lot more that's needed to consist as a kit. If anything it's a helpful stepping stone.
#9
Hey, Kevin
Thanks for the awesome resource! I'm attempting to incorporate your resource into a project that I'm working at the moment. I know the resource is using Windows, as the method to build sqlite ability into the project. However, I'm working on a project using Mac OS X which might not be in your knowledge area, but I'm been able to add sqlite.o file into the project build with no issues. The issue is, that in statements like
sqlite.closeResult(%t);
sqlite.closeDatabase();
sqlite.delete(); statements do not appear to be exposed. Did you create sqlite.dot function? Even the sqlite3 Framework on Mac OS X appears not to see these functions as well.
Any suggestions, would be awesome.
10/28/2009 (10:57 am)
Hey, Kevin
Thanks for the awesome resource! I'm attempting to incorporate your resource into a project that I'm working at the moment. I know the resource is using Windows, as the method to build sqlite ability into the project. However, I'm working on a project using Mac OS X which might not be in your knowledge area, but I'm been able to add sqlite.o file into the project build with no issues. The issue is, that in statements like
sqlite.closeResult(%t);
sqlite.closeDatabase();
sqlite.delete(); statements do not appear to be exposed. Did you create sqlite.dot function? Even the sqlite3 Framework on Mac OS X appears not to see these functions as well.
Any suggestions, would be awesome.
#10
12/23/2009 (12:05 am)
Thanks a lot man, integrated fine!
#11
04/15/2010 (8:12 am)
Stupid question i think, but where should i place the Database.db file?
#12
04/15/2010 (3:52 pm)
Game dir main
#13
and the compiler was complaining about
is this function correct?
07/28/2010 (3:57 am)
Finally got a chance to integrate this, compiles fine, but it's not able to see the script functions, just says they're not there, do I need to reference these functions somewhere else to get them to show up? (Ignore Me... build vs rebuild)and the compiler was complaining about
bool SQLiteObject::processArguments(S32 argc, const char **argv)
{
if(argc == 0)
return true;
else
return true;
return false;
}in SQLiteObject.ccis this function correct?
#14
07/28/2010 (4:34 pm)
definitely odd, this was how the code has been since i upgraded the original for sqlite 3
#16
When i go to run t3d i have the two different build options to choose from "SQLite3" and "Project Name". If i choose SQLite3 torque just minimizes but when i run "Project Name" it opens and the editor appears. I have not used the editor yet, for two reasons, I was afraid it would mess up torque if I did and Im not that far into development right now.
So my question is, If I run the build "Project Name" and use th eeditor, will it work, or do i need to use the SQLite3 build? ANd if so how do i fix the problem with that build?
04/13/2011 (2:14 pm)
Now i followed all of the instructions, but when i went to build it, it said the build failed because it could not find the debug.When i go to run t3d i have the two different build options to choose from "SQLite3" and "Project Name". If i choose SQLite3 torque just minimizes but when i run "Project Name" it opens and the editor appears. I have not used the editor yet, for two reasons, I was afraid it would mess up torque if I did and Im not that far into development right now.
So my question is, If I run the build "Project Name" and use th eeditor, will it work, or do i need to use the SQLite3 build? ANd if so how do i fix the problem with that build?
#18
But here is the error...
16>Linking...
16>LINK : fatal error LNK1104: cannot open file '......gametest project_debug.lib'
and now there are a few more after i made a new project to test the build.
18>c:torquetorque 3d 2009 pro 1.1 beta 3my projectstest projectwebsourceactivexstdafx.h(19) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory
that error links up with this line
#include <atlbase.h>
and then there is this
17>c:torquetorque 3d 2009 pro 1.1 beta 3enginesourcemainmain.cpp : fatal error C1083: Cannot open compiler generated file: '../../Link/VC2k8.Debug.Win32/Test Projectmain.sbr': Permission denied
and finally this
15>BSCMAKE: error BK1506 : cannot open file '....LinkVC2k8.Debug.Win32Test Project DLLgfxD3D9CardProfiler.sbr': No such file or directory
========== Build: 14 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========
You have any clue? And thank you for your help.
04/14/2011 (10:02 am)
Im not sure what it is saying.But here is the error...
16>Linking...
16>LINK : fatal error LNK1104: cannot open file '......gametest project_debug.lib'
and now there are a few more after i made a new project to test the build.
18>c:torquetorque 3d 2009 pro 1.1 beta 3my projectstest projectwebsourceactivexstdafx.h(19) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory
that error links up with this line
#include <atlbase.h>
and then there is this
17>c:torquetorque 3d 2009 pro 1.1 beta 3enginesourcemainmain.cpp : fatal error C1083: Cannot open compiler generated file: '../../Link/VC2k8.Debug.Win32/Test Projectmain.sbr': Permission denied
and finally this
15>BSCMAKE: error BK1506 : cannot open file '....LinkVC2k8.Debug.Win32Test Project DLLgfxD3D9CardProfiler.sbr': No such file or directory
========== Build: 14 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========
You have any clue? And thank you for your help.
#19
04/14/2011 (10:27 am)
I think i had a problem with something like that in general with compiling a new project. Make sure you right click on the bolded project and to a clean build. Also you might have double projects open if you are getting permission errors. This isn't anythign to do with the file changes for sql lite.
#20
1>c:torquetorque 3d 2009 pro 1.1 beta 3enginesourcesfxxaudiosfxxaudioprovider.cpp(9) : fatal error C1083: Cannot open include file: 'xaudio2.h': No such file or directory
1>sfxXAudioBuffer.cpp
1>c:torquetorque 3d 2009 pro 1.1 beta 3enginesourcesfxxaudiosfxxaudiobuffer.h(9) : fatal error C1083: Cannot open include file: 'xaudio2.h': No such file or directory
And about Ten other errors that are from not file or directory. I would have posted them but the word limit prevents me.
and still this error about the debug.
2>LINK : fatal error LNK1104: cannot open file '......gametest project_debug.lib
========== Build: 0 succeeded, 2 failed, 14 up-to-date, 0 skipped ==========
Does it not work for Beta 3? Or am i just screwing something up big time?
04/14/2011 (3:24 pm)
Okay, the bolded project is not the dll right? And if so I did it and i got alot of errors.1>c:torquetorque 3d 2009 pro 1.1 beta 3enginesourcesfxxaudiosfxxaudioprovider.cpp(9) : fatal error C1083: Cannot open include file: 'xaudio2.h': No such file or directory
1>sfxXAudioBuffer.cpp
1>c:torquetorque 3d 2009 pro 1.1 beta 3enginesourcesfxxaudiosfxxaudiobuffer.h(9) : fatal error C1083: Cannot open include file: 'xaudio2.h': No such file or directory
And about Ten other errors that are from not file or directory. I would have posted them but the word limit prevents me.
and still this error about the debug.
2>LINK : fatal error LNK1104: cannot open file '......gametest project_debug.lib
========== Build: 0 succeeded, 2 failed, 14 up-to-date, 0 skipped ==========
Does it not work for Beta 3? Or am i just screwing something up big time?

Torque Owner Chris Sargent
Glorious Software
Thanks for this information in both of the resources!