Search found 137 matches
- Sat Feb 13, 2021 8:47 pm
- Forum: Libraries and Tools
- Topic: Blob.lua - binary serialization library
- Replies: 28
- Views: 51099
Re: Blob.lua - binary serialization library
Awesome! And beautiful! Look at how simple and succint this is thanks to your diligent efforts: local ffi = require("ffi") local writer, reader = require("BlobWriter"), require("BlobReader") function define_struct(name, memberstr) ffi.cdef("#pragma pack(1)\ntypedef...
- Sat Feb 13, 2021 4:09 pm
- Forum: Libraries and Tools
- Topic: Blob.lua - binary serialization library
- Replies: 28
- Views: 51099
Re: Blob.lua - binary serialization library
Error BlobWriter.lua:141: bad argument #2 to 'copy' (cannot convert 'table' to 'const void *') Traceback [C]: in function 'copy' BlobWriter.lua:141: in function 'string' BlobWriter.lua:156: in function '_writeTaggedPair' BlobWriter.lua:323: in function 'write' main.lua:31: in function 'load' [C]: i...
- Sat Feb 13, 2021 3:40 pm
- Forum: Support and Development
- Topic: How to path-find in a non-tiled world?
- Replies: 3
- Views: 4038
Re: How to path-find in a non-tiled world?
If the number of entities isn't too high, what you can do is consider the distances and directions (vectors, essentially) towards each and every other entity. Begin with a vector pointing straight to the goal, or something. Then, loop over all opponents. Subtract from the initial vector the vector t...
- Sat Feb 13, 2021 3:36 pm
- Forum: Libraries and Tools
- Topic: Blob.lua - binary serialization library
- Replies: 28
- Views: 51099
Re: Blob.lua - binary serialization library
And here I was thinking I had been rudely demanding. You really delivered :3 The __serialize() and __deserialize() functions are only required for complex structs with pointers, So for plain old data structs, just need __typename ? and for cases when ffi.sizeof() is not sufficient to get the true si...
- Fri Feb 12, 2021 4:54 pm
- Forum: Libraries and Tools
- Topic: Blob.lua - binary serialization library
- Replies: 28
- Views: 51099
Re: Blob.lua - binary serialization library
cdata is supported. :raw can read and write cdata just fine. Yeah but that means I have to manually iterate over my tables doing hacky things instead of just this as per the example: local blob = BlobWriter() blob:write(data) All cdata has the same type ("cdata"). There is no ffi API that...
- Fri Feb 12, 2021 2:31 pm
- Forum: Libraries and Tools
- Topic: Blob.lua - binary serialization library
- Replies: 28
- Views: 51099
Re: Blob.lua - binary serialization library
Still no support for cdata.
- Wed Feb 10, 2021 1:42 pm
- Forum: Support and Development
- Topic: Client/Server UDP within a thread.
- Replies: 13
- Views: 8021
Re: Client/Server UDP within a thread.
I'm checking the client send for errors: local result, err = udp:sendto(message, ipaddr, 65000) print(result, err) Which should print like "1 nil", but actually prints: "nil refused". So the client is "refused" from sending anything. I don't know why. The docs say: the ...
- Wed Feb 10, 2021 11:29 am
- Forum: Support and Development
- Topic: Client/Server UDP within a thread.
- Replies: 13
- Views: 8021
Re: Client/Server UDP within a thread.
This post suggests that you should not pass 0 to udp:settimeout().
You haven't actually said what's (not) happening, by the way. What are you expecting your code to do? What does it (not) do instead?
You haven't actually said what's (not) happening, by the way. What are you expecting your code to do? What does it (not) do instead?
- Wed Feb 10, 2021 11:09 am
- Forum: Support and Development
- Topic: Client/Server UDP within a thread.
- Replies: 13
- Views: 8021
Re: Client/Server UDP within a thread.
What does the server address look like?address = "Server Address: " .. socket.dns.toip(socket.dns.gethostname())
- Mon Feb 08, 2021 10:03 pm
- Forum: General
- Topic: How to Form a Development Team
- Replies: 6
- Views: 5723
Re: How to Form a Development Team
Stop wishing to deliver something you can't make, and start delivering things you can. People will notice your skills. Look at other people's work, and find someone who's good at what you like. Then ask them, personally, if they want to collaborate. Your biggest asset is having something to display ...