Writing into TXT
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Writing into TXT
So, i was thinking...a save file should be placed in the same folder too? That's pretty...annoying, to be honest.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Writing into TXT
Well it seems you have never looked for Chrome or Firefox configuration files, they are in AppData hidden in thousand of files that are used internally... Horrible just as you said, but a common problem~Tidal wrote:So, i was thinking...a save file should be placed in the same folder too? That's pretty...annoying, to be honest.
A solution, make subdirectories in your save folder, Configuration, Saved Games, Private, etc. I would totally go with!
Another solution, change the identity (save folder), for example when you write your private files use love.filesystem.setIdentity("YourGame Privates") and when you want to save the game do love.filesystem.setIdentity("YourGame")... Note that LÖVE had some issues with this in the past (I think they are fixed now)
Lastly: Just make names clear, or document which files should be touched by the user and which ones should be ignored (you should probably do this even if you use some of the above solutions)
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Writing into TXT
Oh.
I'll probably hijack the whole stuff, making the user backup its save file if it want to directly from the game in some way.
Sounds decent enough?
I'll probably hijack the whole stuff, making the user backup its save file if it want to directly from the game in some way.
Sounds decent enough?
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Writing into TXT
Well old Flash games had those codes, were you would end up a level and this code would pop up and if you played another time you could put the code in a text box and you would start on that level... So yeah something like that maybe (you can [wiki]love.system.getClipboardText[/wiki] and [wiki]love.system.setClipboardText[/wiki], just dont do it without user consent)~Tidal wrote:Oh.
I'll probably hijack the whole stuff, making the user backup its save file if it want to directly from the game in some way.
Sounds decent enough?
Or you could just use [wiki]love.system.openURL[/wiki] (I would really prefer this!)
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Writing into TXT
Well, cookie clicker does this, for example.
Even just displaying the code itself would do the trick, I think, adding some sort of encryption (so it wouldn't be SO simple cheating).
Even just displaying the code itself would do the trick, I think, adding some sort of encryption (so it wouldn't be SO simple cheating).
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Writing into TXT
Dont worry about that stuff!! People that wants to have fun, will have fun!... Also it was a nice thing to play in a friends computer and say "Hey! I've got a code for level 10!!", even if the code is distributed online and people "cheat" I dont consider that a bad thing... Not if they are playing my game hahaha... Do you have a solid reason to think encrypting the code is needed?~Tidal wrote:Well, cookie clicker does this, for example.
Even just displaying the code itself would do the trick, I think, adding some sort of encryption (so it wouldn't be SO simple cheating).
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Writing into TXT
Because I like the idea of people breaking my code, but not just changing, for example "Chinese_Vase.unlock = false" into "Chinese_Vase.unlock = true". It would be too simple. And I'm evil inside. Actually just saving in quads or bits will do the goal. I just don't want everything to be a nominal value .
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Writing into TXT
Oh! Of course! The user doesnt need to know what the data means.
Also If you can dont make it long, try to keep it less than 30 characters if possible (will allow the user to write it down on paper)
Also If you can dont make it long, try to keep it less than 30 characters if possible (will allow the user to write it down on paper)
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Writing into TXT
there is something (library, function, user function) that converts data in quads, bits, and then ascii (a-z, 0-9)? Do you have any idea how to do that? I did this in a previous game, but it was a mess since it included EVERY symbol in the chart and not only a-z/0-9 (or at the best "usual" punctuation).
Thanks in advance.
Sorry, I am a beginner in programming and coding...and I don't even study this.
Thanks in advance.
Sorry, I am a beginner in programming and coding...and I don't even study this.
Re: Writing into TXT
It sounds like you need two things, a Lua binary serialization library and something like a Lua ascii85 encoder or Lua base64 encoder.
Always helps to know what you're looking for.
Always helps to know what you're looking for.
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests