Search found 1289 matches

by ivan
Fri Jun 22, 2018 8:16 am
Forum: Support and Development
Topic: [SOLVED] Is it possible to have a config file next to executable?
Replies: 23
Views: 400

Re: [SOLVED] Is it possible to have a config file next to executable?

A malicious user could place some kind of DoS code in there though. Like, an endless loop or some kind of memory exhausting code, but other than that, it's pretty secure. Lua has a built-in memory limit so theoretically there is no risk to the user's machine. But yes, to prevent your game from ever...
by ivan
Fri Jun 22, 2018 5:03 am
Forum: Support and Development
Topic: [SOLVED] Is it possible to have a config file next to executable?
Replies: 23
Views: 400

Re: [SOLVED] Is it possible to have a config file next to executable?

Do I need to sanitize the lua file somehow? Basic sandboxing is recommended when running code from the AppData directory. setfenv is probably all you need to make configuration data secure. That's a good way to do it. On the other hand, when the user uninstalls an app, litter will be left lying aro...
by ivan
Thu Jun 21, 2018 5:34 pm
Forum: Support and Development
Topic: [SOLVED] Is it possible to have a config file next to executable?
Replies: 23
Views: 400

Re: [SOLVED] Is it possible to have a config file next to executable?

Especially that about permissions. As far as I'm aware permissions are only usually denied in mobile and web platforms, which I don't make anything for (so far, at least). Depends on the platform. Windows does have the option for "restricted" accounts too. Apps are NOT supposed to save data in the ...
by ivan
Thu Jun 21, 2018 11:58 am
Forum: Support and Development
Topic: [SOLVED] Is it possible to have a config file next to executable?
Replies: 23
Views: 400

Re: [SOLVED] Is it possible to have a config file next to executable?

For parsing ini files you could look at barbes' inifile https://github.com/bartbes/inifile Having said that, please consider what you are trying to do. Especially if your ini file is not read-only. First off, you don't want to be writing in the game directory since that could be a zipped in a .love ...
by ivan
Mon Jun 18, 2018 11:33 am
Forum: Support and Development
Topic: access to fonts directory
Replies: 5
Views: 164

Re: file system / path

So the only possible paths are in subfolders relative to my application ? Even if you could access "C:\\Windows" note that your script file won't work if I have Windows installed to drive D:\\ You can also access the appData directory but this is usually for save files and temporary data. And i fin...
by ivan
Sun Jun 17, 2018 6:59 pm
Forum: Support and Development
Topic: [SOLVED] love.physics collision issues
Replies: 4
Views: 214

Re: [SOLVED] love.physics collision issues

To be honest, I've never had to use ghost vertices, so you probably won't need to either. Yes, jump-through platforms are fairly easy, all you have to do is check the player's vertical velocity. Positive velocity means that the player is jumping and should NOT collide with the platform. You could ma...
by ivan
Sun Jun 17, 2018 5:09 am
Forum: Support and Development
Topic: [SOLVED] love.physics collision issues
Replies: 4
Views: 214

Re: love.physics collision issues

I've seen a tutorial where somebody used hexagons for the blocks, similarly to what you did with your player shape.
But yea this is a hacky way to do it.
Edge shapes are certainly the way to go as pointed out by Wscb. Plus, you can make them one-sided if you want.
by ivan
Sun Jun 10, 2018 4:27 am
Forum: Support and Development
Topic: Styles of writing game code
Replies: 3
Views: 271

Re: Styles of writing game code

You can see that all of the player functions are within an object that is returned upon calling the Player.new() function. In looking at other peoples' code I've noticed that their layouts are quite different, involving the use of functions outside of objects to be created. Some concerns I have inc...
by ivan
Sat Jun 09, 2018 3:52 pm
Forum: Support and Development
Topic: Box in water moves when Player moves
Replies: 4
Views: 168

Re: Box in water moves when Player moves

Hard to say without looking at the love file, but it sounds like this is related to mass and friction. Try to set the mass of the box to be considerably greater compared to that of the player. Massive objects are harder to push around compared to light objects. Alternatively you could try lowering t...
by ivan
Sat Jun 09, 2018 3:39 am
Forum: Support and Development
Topic: Sliding/Acceleration/Skidding in Love2D?
Replies: 1
Views: 108

Re: Sliding/Acceleration/Skidding in Love2D?

Skidding as in Super Mario is where the player's velocity points one way, but there is a constant acceleration in the opposite direction. In many games your velocity drops to 0 as soon as you release the movement keys. There are other games where you could be skidding but it's not shown explicitly o...