Is luasec a thing?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: Is luasec a thing?

Post by Andlac028 »

Please note, that to be able to download build artifacts, you need to be signed in in GitHub.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Is luasec a thing?

Post by ivan »

I managed to get luasec working a few months ago:
viewtopic.php?f=4&t=93856
Although like slime said, making sure everything works with the same Lua code between platforms requires a lot of effort.
That is why we need to have more appreciation for slime and everybody else involved with Love2D development.

PS. Forgot to mention, we absolutely need file locking through love.filesystem.
User avatar
togFox
Party member
Posts: 764
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Is luasec a thing?

Post by togFox »

I have no problem trying love 12 before official release. I'll take that route firstly!
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Is luasec a thing?

Post by GVovkiv »

Bigfoot71 wrote: Sat Feb 11, 2023 9:49 pm For JSON there is already a pure Lua library that works very well: https://github.com/rxi/json.lua
Personally I don't really see why it should be implemented in Love2D, unless something escapes me.
considering saving/loading data is one of "must-have" stuff that you might be doing in your game (save system, language packs, configuration files that you might want expose to users, or maybe even networking?) having out-of-box solution would be definaly handy, no need for additional libraries
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Is luasec a thing?

Post by ivan »

JSON is a good format if you plan to interact with a web browser.
If you want to store your Love2D save files, a much better option is to use Lua serialization.
User avatar
Bigfoot71
Party member
Posts: 287
Joined: Fri Mar 11, 2022 11:07 am

Re: Is luasec a thing?

Post by Bigfoot71 »

GVovkiv wrote: Sun Feb 12, 2023 12:58 pm
Bigfoot71 wrote: Sat Feb 11, 2023 9:49 pm For JSON there is already a pure Lua library that works very well: https://github.com/rxi/json.lua
Personally I don't really see why it should be implemented in Love2D, unless something escapes me.
considering saving/loading data is one of "must-have" stuff that you might be doing in your game (save system, language packs, configuration files that you might want expose to users, or maybe even networking?) having out-of-box solution would be definaly handy, no need for additional libraries
Personally, I had never thought of using JSON for local saves, especially since it would make it easier to edit backups and therefore cheat, unless there was some way to obfuscate that (apart from compression and encoding because why use JSON then)? What are the advantages for you of doing like this rather than using a table serialization technique like Ivan says?

I sincerely ask, you must have a reason and I want to know! :ultraglee:
My avatar code for the curious :D V1, V2, V3.
User avatar
zorg
Party member
Posts: 3435
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Is luasec a thing?

Post by zorg »

ivan wrote: Sun Feb 12, 2023 8:38 am PS. Forgot to mention, we absolutely need file locking through love.filesystem.
Doesn't PhysFS already handle this?
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Is luasec a thing?

Post by GVovkiv »

Bigfoot71 wrote: Sat Feb 11, 2023 9:49 pm Personally, I had never thought of using JSON for local saves, especially since it would make it easier to edit backups and therefore cheat, unless there was some way to obfuscate that (apart from compression and encoding because why use JSON then)? What are the advantages for you of doing like this rather than using a table serialization technique like Ivan says?

I sincerely ask, you must have a reason and I want to know! :ultraglee:
Personally, I had never thought of using JSON for local saves, especially since it would make it easier to edit backups and therefore cheat, unless there was some way to obfuscate that (apart from compression and encoding because why use JSON then)?
You make single player game where someone with notepad can edit save file. And what?
If save file will be somehow obfuscated, i can instead use cheat engine, 100% save file by someone, hack game, etc. What point in doing so?
What are the advantages for you of doing like this rather than using a table serialization technique like Ivan says?
I like JSON and i like out of box expirience.
User avatar
Bigfoot71
Party member
Posts: 287
Joined: Fri Mar 11, 2022 11:07 am

Re: Is luasec a thing?

Post by Bigfoot71 »

GVovkiv wrote: Mon Feb 13, 2023 8:05 am You make single player game where someone with notepad can edit save file. And what?
If save file will be somehow obfuscated, i can instead use cheat engine, 100% save file by someone, hack game, etc. What point in doing so?

I like JSON and i like out of box expirience.
You're right in a sense, personally I'm working mostly on Android and currently on a multiplayer game so I have the means to make (nearly) impossible the means you cite without the player ruining the game, on the other hand on a single player (or not) PC game is another matter indeed...

The out of the box experience seems to me to be a good reason otherwise, excuse my curiosity ^^
My avatar code for the curious :D V1, V2, V3.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Is luasec a thing?

Post by GVovkiv »

Bigfoot71 wrote: Mon Feb 13, 2023 10:04 am You're right in a sense, personally I'm working mostly on Android and currently on a multiplayer game so I have the means to make (nearly) impossible the means you cite without the player ruining the game, on the other hand on a single player (or not) PC game is another matter indeed...
I guess you talk here about multiplayer game where you can connect to other players with your characters, right?
In this case, encoding also just lame and don't do anything useful. If i see that someone is using in my lobby overpowered character (don't matter if it was achieved naturally, via file edit, via cheat engine, etc) and I'm not okay with it, i would just kick them and never ever will play again. Encoding here do nothing.
In multiplayer, server should treat any data from clients as potentialy malicious, so it always should be sanitazed and checked.
And, for example, game should balance players around their items and level and compare it to host of game. For example, like Souls games do: if you cheat character with high gear, but low level, you would connect to player with same level as you and get downgraded gear that will perform on same level as host, which makes character cheating less effective. System still not perfect, as twinks is still thing, but, yeah.
The out of the box experience seems to me to be a good reason otherwise, excuse my curiosity ^^
Yes, and fact that json will be more then enough for 90% of games to save/load data, which would work nice as part of love with documentation and examples, istead of "so, how to i save data in love?" Posts
The only place i think it might not work nicely, is where game needs to store really big amount of data. For example, games such as Minecraft or terraria, because you have big world where you store blocks with properties, etc.
In this case, writing and loading might be slower and data itself will require much more space, in comparison with something that more suited for that. (Maybe csv or even plain text file with custom parsing?)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 17 guests