If test code is too fast (faster than 1ms)...
var t = current_time;
for (i=0; i<1000; i++)
Save your data to a string, not to a file. If game crashes, it won't affect old save file.
After string complete, write it to file. Writing string...
I'm trying to buy PyxelEdit but there is no such option on the site. How do you got it?
I mean 47-tile based tileset.
It should be comfortable to draw and test tiles (to see if they fit to each other).
I prefer using Lua for structures. I really love Lua tables which are very flexible.
I'd use 2D array for keeping tiles (1.)
And for other objects...
It's a magic!
Okay. But I don't know C++.
So it would be great if you add cjson and compile it. :) This is the main module that everbody needs.
P.S. I'm trying...
For myself I added Lua extension.
But I need to check if variable is initialized.
I use this code in main menu of the game. User can get main menu from start OR from stopping game...
if global.server_socket >= 0
GML is really bad language
But Lua is simple too and is better than GML
var server = network_connect(global.client_socket , ip, 7777);...
Is there compression in files after I built a project?
Please include Lua CJSON.
I know I can use Lua JSON, but CJSON is mush faster (14 times faster) and supports utf8.
Btw it's the most popular...
I splitted the string into small parts.
local BUFFER_SIZE = 1000;
local now = 1;
local i = 1;
while now < #MAP_STR do...
Divided the string into small parts (1 kb each).
For some reason string_ord_at and string_byte_at are very very slow if string is huge.
I'm trying to get array data from packed string ~800 kilobytes.
Tried to use string_ord_at() but it's too slow.
string_byte_at() is a bit faster...
I'm trying to send large data from Lua to GMS. The only fast method that I found is to send data as a string.
But game crashes without error...