Welcome, Guest! Login | Register
Saving data in SQLITE
Info
Report
49 Posts

if in a game i want to save position and location and other parameters in database like sqlite. how can i do that?
is there anyway out?
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
330 Posts

You need an SQLite driver to properly save the data in the SQLite file. Unfortunately, 3D Rad doesn't have an easy API for that. You'll have to use the available DLL functions to integrate the SQLite driver.

The easiest you can do is just save those to a file using the iFile functions. SQLite or anything else remotely is mostly impossible or really hard to pull off.
Created on: 1 month ago
Info
Report
99 Posts

actually, i believe jestermon already wrote a dll wrapper just for that some years ago...
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
217 Posts

Why use SQL in a game? External database queries?
Created on: 1 month ago
Info
Report
99 Posts

likely as he needs to monitor 500 objects, though i'm unsure of the advantage of having 500 lines in a text file vs 500 lines in an SQlite database, it seems to be somehow faster, but even the documentation says to use it sparingly, saying to use at level start/end rather than in real time gameplay.
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
49 Posts

where can i upload jestermon sql database project?
what dll wrapper means?
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
330 Posts

DLL (or Dynamic Link Library) is the file that contains the code for interacting with the SQLite file. The wrapper is making your code (script) interact with that DLL.

And again, why SQLite? Why don't you just use a plain text file to save data? You should really keep it simple while using 3D Rad, or consider other engine alternatives if you need SQLite so desperately.
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
99 Posts

@jayburn: think you mean download not upload, is english your 2nd language?
so anyway, i 'uploaded' it so that you can 'download' it, but i have never used it so don't ask me how - you'll have to use the included short manual and example project.
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
458 Posts

@icanseethat

Have you got jestermans hashpool project ?

if not, i attached the source script here.

It is a pre written script to save out data to a text file and read it back in and display it onscreen, to validate the saved data.

I believe this is what you need or are looking for.

To use it, just open a new 3drad project, add a script object & a textprint object.
connect the textprint to the script and run it.

now you have a working sample of how to save out different data types and read it back to use them in your project.
Created on: 1 month ago
Info
Report
49 Posts

i got jestermon hashpool project. find that in one of my backups.
how to encrypt the data in a text file so that player cant edit it.
thanks tin soldier. I will upload the jestermon project on google drive. if somebody need he can download.
Created on: 1 month ago
Edited on: 1 month ago
Info
Report
330 Posts

This is getting more and more complicated. 3D Rad does not have a built-in encryption API. You'd have to implement that on your own (again). The closest you can get is writing the data in binary via iFileByteWrite / iFileByteRead.
Created on: 1 month ago
Info
Report
99 Posts

Quote from: Jaysonbourn

I will upload the jestermon project on google drive. if somebody need he can download.

where would you post the link to it so people can find it - on here? the only 3drad fan site, where they can already download it? and do you realize you are likely the only person in the world who has use for such a thing?
...for basic encryption you can obfuscate your code using math equations that only your script will know, and surrounding the written results with related numbers, and only reading the parts you need for the equation, who's values can be changed each time the game is played by writing a separate equation identifier for verification of the current one in use.
e.g- 'value88=0.4637156765767265740654367623' & 'id=768957487582.8956' instead of just 'health=100'

of course, if you want stronger encryption so that the code is invisible, you'll have to buy it.
Created on: 1 month ago
Edited on: 1 month ago
Reply
Preview
Post
Or use the advanced reply form here...
Sponsored