okay to break down the idea and where I'm at...
The game idea is a sports management simulation for a sport I've designed from scratch. The details of this aren't really important.
The game requires a considerably large database. One league will have around 20 teams and each team around 20 to 30 players (call it 25) plus staff etc. So each league has around 500 players. Each nation is likely to have on average 4 leagues (divisions) and this is to spread accross many nations (potentially 100+). So I'm talking around 200,000 players as a guideline but I want it to be able to handle more than this as I've designed it to be a dynamic world where new leagues, players and clubs are added as the interest in the sport expands.
As concerns my developments. I've got SQL to work to a certain extent, except it it unable to parse variables into the queries. From what I can understand from what I've read this is a LUA issue with SQLite3.
I'm not hardened to using SQL but is it possible to create such an extensive relational database in another way??
SQL Support
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: SQL Support
Aaargh. :-( the phone ate my beautiful answer :-(
You could build it using Lua tables.
Use a tree, with, for each level, a reference to its parent, and an index.
Stats on all players/teams would be expensive, but they could be boosted by using data structures adapted to the tasks at hand.
You can save the data to disk by using a strategy similar to this (the code is for Lua 4), or this (it uses SQLite for storage, which is of no use here, but there could be good ideas for data marshalling). use one file per table.
For efficient loading, you could use the memoization example in the PiL chapter about weak tables.
You could build it using Lua tables.
Use a tree, with, for each level, a reference to its parent, and an index.
Code: Select all
for _, team in pairs( AllPlayers[uid].team.division.teams ) do
SomethigWithThe( team )
end
You can save the data to disk by using a strategy similar to this (the code is for Lua 4), or this (it uses SQLite for storage, which is of no use here, but there could be good ideas for data marshalling). use one file per table.
For efficient loading, you could use the memoization example in the PiL chapter about weak tables.
Re: SQL Support
@pygy - Thanks for the info because I think its led me to my solution.
lua-sqlite3!
http://www.nessie.de/mroth/lua-sqlite3/ ... ation.html
However, I'm not understanding the whole makefile stuff so has anyone got experience in doing this? if so I can get a dll and it has the functionality to bind variables to lua! basically giving me what I've been looking for all along!
lua-sqlite3!
http://www.nessie.de/mroth/lua-sqlite3/ ... ation.html
However, I'm not understanding the whole makefile stuff so has anyone got experience in doing this? if so I can get a dll and it has the functionality to bind variables to lua! basically giving me what I've been looking for all along!

- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: SQL Support
In Linux you just have to do:Richyg wrote:However, I'm not understanding the whole makefile stuff so has anyone got experience in doing this? if so I can get a dll and it has the functionality to bind variables to lua! basically giving me what I've been looking for all along!
Code: Select all
./configure <options>
make
make check
sudo make install
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: SQL Support
You don't, unless you have mingw32 or cygwin, check for visual studio project files (and install visual studio if they exist)
Re: SQL Support
I really can't get these make files to work.
I've been trying to use Visual Studio's command prompt and nmake function and it keeps erroring that there is an illegal character which is bizaare!
I trolled the net to find someone is using this wrapper for the very thing I'm trying to use it for so I'm really peeved i can't get it
I've been trying to use Visual Studio's command prompt and nmake function and it keeps erroring that there is an illegal character which is bizaare!
I trolled the net to find someone is using this wrapper for the very thing I'm trying to use it for so I'm really peeved i can't get it

Re: SQL Support
Sucess at LAST!!!!
I found a lsqlite3.dll file randomly on the net and it works. I've got bound variables working to find individual records in my sqlite3 database meaning I can finally continue with my project.
Maybe I can get some of my developments in order to show you all what the fuss was for at some point
If anyone needs the file you can get it here...
http://www.autoplaymediastudio.com/uplo ... ile_53.zip
I found a lsqlite3.dll file randomly on the net and it works. I've got bound variables working to find individual records in my sqlite3 database meaning I can finally continue with my project.
Maybe I can get some of my developments in order to show you all what the fuss was for at some point

If anyone needs the file you can get it here...
http://www.autoplaymediastudio.com/uplo ... ile_53.zip
- Jasoco
- Inner party member
- Posts: 3728
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: SQL Support
Will it work cross-platform? DLL drums up fears of Windows exclusivity.
Re: SQL Support
It may well have an issue between PC and MAC. I'm developing for PC, any MAC developments will be on a backburner and may require making two seperate installs with differing ways of controlling the libaries.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: SQL Support
And not to forget Linux.
Now, the great thing with LÖVE (and Lua) is that cross-platformness doesn't cost you anything: it's the default, so to say.
You're free to include DLLs (as long as their licenses permit that, of course), but it strikes me as unlövely to say the least.
Now, the great thing with LÖVE (and Lua) is that cross-platformness doesn't cost you anything: it's the default, so to say.
You're free to include DLLs (as long as their licenses permit that, of course), but it strikes me as unlövely to say the least.
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 4 guests