Hi,
I just registered minutes ago. I've been looking for a game engine o framework to develop my own videogame for a project on the college. After asking advices and reading comparisons, I've decided to choose Löve2D, but there's still one thing I must know before start working on this.
Can I use a database (like MySQL or SQLite, even an ORM, I don't really care)? I guess the answer is “yes”, but, how? I looked at the Tutorials in the wiki, but haven't find anyone about working with databases. May you help me, please?
Thanks for advance
Can I work with databases?
Re: Can I work with databases?
I think you would have to use a lua library to get that functionality. Here's one I found.
http://keplerproject.github.io/luasql/doc/us/
http://keplerproject.github.io/luasql/doc/us/
Re: Can I work with databases?
A lua library, you say? I'm taking a look to that, thanks, Skeiks!
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Can I work with databases?
BGBgus for what purpose do you need database in love2d? If its for back end you can use any server for the back end like node or any other service that may have better support for Databases or what have you
Re: Can I work with databases?
Hi bobbyjones,
I could use an online server, I hadn't thought about it. But I don't want to lose data for those player who may play offline...
Thank you, any way
I could use an online server, I hadn't thought about it. But I don't want to lose data for those player who may play offline...
Thank you, any way
Re: Can I work with databases?
What are you trying to do? Databases are great for storing large bulks of data. Databases for games are typically used if you're going to store tons of gamers' save data on a server, not storing individual players' save games on their local computers. But I guess it depends on the game, if your games stores tons of data it might make sense.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: Can I work with databases?
First of all, thanks for answering, T-Bone.
It's a simple 2D platforms game, I wouldn't really need a database, but I'm making it on a course's project, so I SHOULD use a database. I guess I'll store some high scores or something like that.
In some other project, you'd recommend me to store the data in files, maybe?
It's a simple 2D platforms game, I wouldn't really need a database, but I'm making it on a course's project, so I SHOULD use a database. I guess I'll store some high scores or something like that.
In some other project, you'd recommend me to store the data in files, maybe?
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Can I work with databases?
You should use files on client. And database on backend. And using a database for high scores is a wonderful idea. If you must use a database on client you can use SQLite3. P.S you shouldn't need one for client. Please don't do it lol.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Can I work with databases?
You can have a high score database on a server and connect to it through luasocket
Re: Can I work with databases?
Thanks again, bobbyjones, I'll check this 'luasocket' library. I hope it's no too tricky xD
And I should think on encrypting those files on the client... would be great if someone plays it, but don't need cheaters!
And I should think on encrypting those files on the client... would be great if someone plays it, but don't need cheaters!
Who is online
Users browsing this forum: pgimeno and 2 guests