Search found 15 matches
- Thu Dec 28, 2017 2:02 am
- Forum: Support and Development
- Topic: 2d arrays of arbitrary size
- Replies: 6
- Views: 8883
2d arrays of arbitrary size
I am curious what the best way is in lua to represent a 2d array, or for that matter, any multi-dimensional array with an arbitrary size in lua? I need it to allow arbitrary reads and writes at any integer coordinate index (something like this: array[coordinate.x][coordinate.y]). I've considered eit...
- Tue Sep 05, 2017 7:51 am
- Forum: Support and Development
- Topic: Displaying Unicode text [Solved]
- Replies: 2
- Views: 3325
Re: Displaying Unicode text
Whoops, I didn't realize that the version of the font I was using didn't support Japanese text, now that I found the Japanese version, it's working fine now. Thanks.
- Tue Sep 05, 2017 6:44 am
- Forum: Support and Development
- Topic: Displaying Unicode text [Solved]
- Replies: 2
- Views: 3325
Displaying Unicode text [Solved]
Hello all, I have a simple question, why is it when I run the following piece of code in main.lua, the japanese text in the .txt file does not display properly (the text is displayed as boxes) and how do I fix this? love.graphics.setFont(love.graphics.newFont'NotoMono.ttf') local text = love.filesys...
- Fri Aug 11, 2017 11:35 pm
- Forum: Support and Development
- Topic: Trying to create a file structure with modding in mind
- Replies: 5
- Views: 4612
Re: Trying to create a file structure with modding in mind
Thanks, I was able to narrowed down my problem to a lack of knowledge about accessing the source directory, and I found a forum post which answered most of my questions: https://love2d.org/forums/viewtopic.php?f=3&t=82499&p=200356 . With that in mind, I now know option 2 is possible with som...
- Fri Aug 11, 2017 2:45 am
- Forum: Support and Development
- Topic: Trying to create a file structure with modding in mind
- Replies: 5
- Views: 4612
Re: Trying to create a file structure with modding in mind
Option 2 is your best bet, you can have an in-game option to open the save folder/ (which is sadly restrained to appdata) However I've heard you can use the 'io' library (Built into lua) to write to any location, given that love.exe has access. ERIT: As for your assets just pack them into your '.lo...
- Fri Aug 11, 2017 12:25 am
- Forum: Support and Development
- Topic: Trying to create a file structure with modding in mind
- Replies: 5
- Views: 4612
Trying to create a file structure with modding in mind
I have been trying to create a file structure for my game that stores the game's assets (such as sprites and audio) and output data (such as the player's save files and options) outside of the working directory so that they can be easily modified even after the .love file has been fused. Here are th...
- Wed Jul 19, 2017 1:00 am
- Forum: Support and Development
- Topic: [Solved] How to delete a Sprite from a SpriteBatch
- Replies: 3
- Views: 6164
[Solved] How to delete a Sprite from a SpriteBatch
I've been studying how to use SpriteBatches from the wiki https://love2d.org/wiki/SpriteBatch From what I see, there isn't any straightforward way to delete Sprites from a SpriteBatch, is there? Or if not, what would be the next best way to remove them? Should I even be trying to remove them, or sho...
- Sat Mar 18, 2017 3:34 am
- Forum: Support and Development
- Topic: [Solved] sleep in threads
- Replies: 4
- Views: 3592
Re: sleep in threads
whoops did not see that. Ok that makes sense, thanks!
- Sat Mar 18, 2017 12:53 am
- Forum: Support and Development
- Topic: [Solved] sleep in threads
- Replies: 4
- Views: 3592
Re: sleep in threads
(Also If I am correct that love.timer in threads is a nil value, perhaps that info should be added to the love wiki, especially since the wiki already states what other modules are restricted)
- Sat Mar 18, 2017 12:48 am
- Forum: Support and Development
- Topic: [Solved] sleep in threads
- Replies: 4
- Views: 3592
[Solved] sleep in threads
I was trying threads for the first time, and it appears that love.timer in threads is a nil value, because I get the "attempted to index a nil value" error message whenever I access it. This means I do not have access to love.timer.sleep for any delays in code execution. Is there another w...