Search found 107 matches

by Przemator
Thu Jun 13, 2013 3:00 pm
Forum: Support and Development
Topic: Interpolation: how to do it right?
Replies: 3
Views: 1812

Re: Interpolation: how to do it right?

Yes, it is the case. But it doesn't even matter, simulation frequency could be 60 Hz as well. But still, I have no guarantee that the rendering frequency will be 60 Hz, especially in case of disabled VSYNC. The question is: If I simulate with a fixed framerate, how do I interpolate the render frames...
by Przemator
Thu Jun 13, 2013 1:15 pm
Forum: Support and Development
Topic: Interpolation: how to do it right?
Replies: 3
Views: 1812

Interpolation: how to do it right?

Hi, I read that it is good to separate the simulation from the render cycles, which allows for a fixed dt in the simulation. This makes the simulation frames and render frames independent, so in order to achieve smooth animation you need to interpolate between two simulation frames. Now, this is the...
by Przemator
Mon Dec 17, 2012 5:18 pm
Forum: Support and Development
Topic: [RESOLVED][0.8.0]SpriteBatch work slow with big image(64x64)
Replies: 6
Views: 5267

Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and

I'm using about 10000 sprites in my game. I have this grass texture of 256x256 px. With a size of 1 m equal to 10 px, i need to cover the area of 2 km. I think, maybe I have no performance issues because 99% of the sprites are being "drawn" outside the visible window, so the GPU automatica...
by Przemator
Sat Dec 15, 2012 5:00 pm
Forum: Support and Development
Topic: [Solved] Moving Files From compter to computer using UDP?
Replies: 3
Views: 1819

Re: Moving Files From compter to computer using LuaSocket?

TCP is one thing, the other this is that default chunk/packet size is 8 KB, so you have to split your string into pieces, send each piece and then put them back together. not so simple...
by Przemator
Mon Dec 10, 2012 5:53 pm
Forum: Support and Development
Topic: [I'm new] Stuck on pig screen?
Replies: 2
Views: 2179

Re: [I'm new] Stuck on pig screen?

I have tried pressing keyboard buttons, mouse buttons, waiting 12 HOURS, still nothing. PLEASE help! Haha, 12 hours! :D I got bored after 2 ;). No but seriously, I've been in the same spot as you, pretty frustrating. Don't worry, everything is working. The pig is a demo, which is displayed if you d...
by Przemator
Wed Dec 05, 2012 6:16 pm
Forum: Support and Development
Topic: Saving tables to HDD
Replies: 10
Views: 2291

Re: Saving tables to HDD

To be fair, you'd usually store them as double precision floats, rather than single precision ones (since all numbers in Lua are doubles), taking up 8 bytes. OK I see. Well, I found a very nice library called Luabins: https://github.com/agladysh/luabins However, it is not pure Lua, it contains some...
by Przemator
Wed Dec 05, 2012 5:31 pm
Forum: Support and Development
Topic: Saving tables to HDD
Replies: 10
Views: 2291

Re: Saving tables to HDD

I think we didn't understand each other. I mean a binary serializer. Let's say, the string representation of the number PI is "3.14159265" (here it's 10 bytes). In a binary form, it will contain only 4 bytes. A binary serializer would be particularly useful in sending packets over the netw...
by Przemator
Tue Dec 04, 2012 11:50 pm
Forum: Support and Development
Topic: Saving tables to HDD
Replies: 10
Views: 2291

Re: Saving tables to HDD

I also made a script that performs this operation for you. You can find it, along with all necessary documentation here . Lafolie, would you happen to know a pure-lua binary serializer? I need that for sending packets over the network. I need the data to be packed, floats not to cover 20 chars etc.
by Przemator
Tue Dec 04, 2012 5:44 pm
Forum: Support and Development
Topic: Saving tables to HDD
Replies: 10
Views: 2291

Re: Saving tables to HDD

Hey Ubermann, in my game I'm using Serpent serializer: https://github.com/pkulchenko/serpent For settings I'm using a string that I'm filling with variables using string.format: str = [[ function applySettings(s) width = %d height = %d player = %q end ]] file = str.format(width, height, player) love...
by Przemator
Mon Dec 03, 2012 8:36 pm
Forum: Support and Development
Topic: Drawing Smooth Curves
Replies: 11
Views: 8209

Re: Drawing Smooth Curves

pattern, repeat = love.graphics.getLineStipple( ) Depreciated in Love 8.0! Bummer. Yes, it's deprecated. I was thinking about drawing a stencil in a comb-shaped line, then just draw a curve on it. it means only drawing 2 lines, one on which is a stencil. The problem is to calculate the coords for t...