Search found 26 matches
- Tue May 22, 2018 3:29 pm
- Forum: Support and Development
- Topic: Saving/Loading big map table
- Replies: 10
- Views: 6925
Re: Saving/Loading big map table
Yes. Although using a table of tables is not the most efficient way to do this, it will work fine. For maximum effciency use a plain, one-dimensional array and index like this: local map = {} for y = 0, 2047 do for x = 1, 8192 do map[y * 8192 + x] = blob:readU8() end end That's not Blob related tho...
- Tue May 22, 2018 2:15 pm
- Forum: Support and Development
- Topic: Saving/Loading big map table
- Replies: 10
- Views: 6925
Re: Saving/Loading big map table
In my map i store type of a block 'map[x][y].type = 0' For optimal results, you should define a maximum value range for type, choose a matching data type (8 bits, 16 bits, 32 bits, 64 bits are possible) and use the corresponding Blob:write*/read* functions as shown above. I advise against serializi...
- Tue May 22, 2018 12:24 pm
- Forum: Support and Development
- Topic: Saving/Loading big map table
- Replies: 10
- Views: 6925
Re: Saving/Loading big map table
What exactly do you store in the map? Shameless plug for Blob , my binary serialization library. (De-)serialization of 2048 * 8192 ints: local blob = Blob(nil, 2048 * 8192 * 4) for y = 0, 2047 do for x = 1, 8192 do blob:writeU32(y * 8192 + x) end end local map = {} for y = 0, 2047 do for x = 1, 819...
- Mon May 21, 2018 11:02 pm
- Forum: Support and Development
- Topic: Saving/Loading big map table
- Replies: 10
- Views: 6925
Re: Saving/Loading big map table
coroutines are fine, but you'll need to yield in love.update, since love.load only gets called once at startup. otherwise you could use actual threads, but that's more complicated. as for the bitser thing, it may or may not have a bug with large amounts of data... i've tried all serializers listed ...
- Mon May 21, 2018 10:08 pm
- Forum: Support and Development
- Topic: Saving/Loading big map table
- Replies: 10
- Views: 6925
Saving/Loading big map table
Hi everyone! I'm trying to save generated map in a file, then load it. If map is small like 128x128 i have no problem saving/loading it using bitser lib. But if map is 8192x2048 i can't load it anymore, application just closes printing this to console '[Finished in 1.8s with exit code 3221225477]'. ...
- Sun May 20, 2018 2:13 pm
- Forum: Support and Development
- Topic: [Solved]Stack overflow when detecting regions of a big tiled map.
- Replies: 2
- Views: 2099
Re: Stack overflow when detecting regions of a big tiled map.
Stack space is limited. Running a recursive algorithm this many times can easily exhaust that space. AFAIK, LuaJIT does tail call optimization. Read up on that for a possible solution to your problem. I don't know whether it is applicable or not in your case though. See here for more information. T...
- Sun May 20, 2018 1:32 pm
- Forum: Support and Development
- Topic: [Solved]Stack overflow when detecting regions of a big tiled map.
- Replies: 2
- Views: 2099
[Solved]Stack overflow when detecting regions of a big tiled map.
Hi everyone! I'm trying to detect all regions of a tiled map, and store them in a table. I found example of a "paint"-like flood fill, and tried to use that. Its working if map table is small 512x512 for example. But if i chose map size 1024x1024 for example, i get stack overflow. function...
- Fri Apr 27, 2018 9:16 pm
- Forum: Support and Development
- Topic: ~3 pixel difference in jump height at 60 vs 500 fps [solved]
- Replies: 10
- Views: 6273
Re: ~3 pixel difference in jump height at 60 vs 500 fps
That did it for me, same jump height at all FPS.zorg wrote: ↑Fri Apr 27, 2018 8:16 pm An extension to what raidho was trying to say but has basically been ignored: http://openarena.ws/board/index.php?topic=5100.0
Not gonna say you're welcome, though.
Thx to everyone who replied !

- Fri Apr 27, 2018 8:03 pm
- Forum: Support and Development
- Topic: ~3 pixel difference in jump height at 60 vs 500 fps [solved]
- Replies: 10
- Views: 6273
Re: ~3 pixel difference in jump height at 60 vs 500 fps
I don't know what "numberOfTicks" is, so i set "timeToApex" to 1. At 505 fps and "jumpHeight = 200" box travels ~199.7 pixels, at 60 fps ~196.7 pixels. If i set "timeToApex" to 2, then there is ~1.5 pixel difference. At "timeToApex = 10" there is bas...
- Fri Apr 27, 2018 3:43 pm
- Forum: Support and Development
- Topic: ~3 pixel difference in jump height at 60 vs 500 fps [solved]
- Replies: 10
- Views: 6273
Re: ~3 pixel difference in jump height at 60 vs 500 fps
First of all, its quite possible for the apex of a jump to occur between frames . This is even more likely when using a variable time step. The next problem is your units - what does "gravity = 500" mean? Looks too much like a magic number in "pixels per seconds squared". :) You...