Search found 18 matches

by ZodaInk
Thu Oct 13, 2016 8:29 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 410958

Re: "Questions that don't deserve their own thread" thread

sherpal wrote:Thanks, I guess that means that the more I practice, the better I'll get :p
I'll have a look at zlib, and related stuff :)
Zlib compression is possible with love.math.compress, just letting you know. https://love2d.org/wiki/love.math.compress
by ZodaInk
Tue Oct 11, 2016 5:17 am
Forum: Libraries and Tools
Topic: ZITIL - Utility Library
Replies: 7
Views: 5341

Re: ZITIL - Utility Library

I'm not sure if it's a concern, because it seems that LuaJIT is consistent across platforms. But in case you want to handle it to be sure: 1/0 and 0/0 give you inf and -nan in Lua, and -(1/0) and -(0/0) gives you -inf and nan. The tostring of that is what you can compare with. You can take a look a...
by ZodaInk
Tue Oct 11, 2016 2:55 am
Forum: Libraries and Tools
Topic: ZITIL - Utility Library
Replies: 7
Views: 5341

Re: ZITIL - Utility Library

Nice to see a de-serialization routine that doesn't just loadstring() the file. I'm not sure if inf and nan will work the same in all machines. In Lua they can be represented with something like #PINF or similar; not sure about LuaJIT. I really don't like decoding with loadstring(), it seems like a...
by ZodaInk
Mon Oct 10, 2016 4:29 pm
Forum: Libraries and Tools
Topic: ZITIL - Utility Library
Replies: 7
Views: 5341

Re: ZITIL - Utility Library

Thanks for the feedback!

I removed the do...end blocks and renamed 'data' to 'serialize'.
by ZodaInk
Mon Oct 10, 2016 1:09 pm
Forum: Libraries and Tools
Topic: ZITIL - Utility Library
Replies: 7
Views: 5341

ZITIL - Utility Library

I present to you: ZITIL - (ZodaInk's Utility Library)
It's a set of mostly non-game-engine specific tools. It is in an early stage, but I wanted feedback.

Source: https://github.com/ZodaInk/zitil
Documentation: https://github.com/ZodaInk/zitil/wiki
by ZodaInk
Fri Oct 07, 2016 10:59 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 410958

Re: "Questions that don't deserve their own thread" thread

Ah, right... I forgot pcall works that way.
by ZodaInk
Fri Oct 07, 2016 10:44 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 410958

Re: "Questions that don't deserve their own thread" thread

Code: Select all

if pcall(love.keyboard.getScancodeFromKey("incorrect KeyConstant")) then
  -- do stuff
end
This code will show the error message "Invalid key constant: incorrect KeyConstant".
Is this intended behavior? I expected pcall to prevent the error message.
by ZodaInk
Wed Apr 20, 2016 10:59 am
Forum: Support and Development
Topic: How to represent 3d objects in 2d
Replies: 16
Views: 14589

Re: How to represent 3d objects in 2d

https://www.youtube.com/watch?v=Kdyviza ... bUghwO1RQo

Here are a few videos of basic 3d modelling.
3d engines are not easy, if you're new to programming I would suggest something easier.

There is also LÖVE3D: viewtopic.php?f=5&t=78943
by ZodaInk
Tue Jan 26, 2016 8:15 pm
Forum: Support and Development
Topic: [Solved] Math.random creates a weird pattern
Replies: 5
Views: 3021

Re: Math.random creates a weird pattern

That did fix it...
Now I am even more confused, why would this fix it?
by ZodaInk
Tue Jan 26, 2016 8:00 pm
Forum: Support and Development
Topic: [Solved] Math.random creates a weird pattern
Replies: 5
Views: 3021

Re: Math.random creates a weird pattern

I usually would, don't know why I did it like this, but that is beside the point. The point is that it doesn't create a noise-ish array of boxes, it's not even filling up anywhere near 90% of it. if math.random() < 0.9 then --[[code]] end That should be true roughly 90% of the time, yet in my case i...