Page 73 of 91
Re: "Questions that don't deserve their own thread" thread
Posted: Wed Oct 12, 2016 6:18 pm
by mojimi
pgimeno wrote:Hi mojimi, welcome to the forum.
The problem is rounding. You can't expect that grid to look exactly like it would look if it was originally made of tiles and then stretched. That will only happen in certain conditions (exact integer multiples, no bilinear filtering).
You can, however, use a quad to paint the image with repetition instead of drawing it multiple times. Take a look at [wiki](Image):setWrap[/wiki].
Ah of course! I guess that's why games have a set of resolutions you can choose from.
Should I use a quad for repetition even though I'm making a (hopefully randomly generated) tile based grid map?
Re: "Questions that don't deserve their own thread" thread
Posted: Wed Oct 12, 2016 7:55 pm
by pgimeno
If each tile is going to be different, that's obviously not going to work. Drawing the tiles "pixel-perfect" to a canvas and then stretching the canvas while drawing it will work.
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 7:43 am
by sherpal
Hello,
I have a very simple question about making multiplayer online games. Should I encrypt game messages when transmitting them to other party members? I'm not talking about passwords or so, but just plain game info like "player1 uses ability a".
Thank you for the answer
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 9:38 am
by raidho36
No, but you should compress them.
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 10:52 am
by sherpal
Thanks for your answer!
raidho36 wrote:No, but you should compress them.
Could you explain this a tiny bit more? Specifically, what size of data shouldn't I exceed while sending messages?
In the Networking with UDP tutorial, one can read
Tutorial:Networking with UDP wrote:Additionally UDP datagrams have limited sizes; the luasocket Documentation specifically notes that it doesn't support anything over 8k, and frankly you should assume much less.
but the "assume much less" is a bit vague.
And, is there a "morally minimal" amount of data I should send at once?
Thanks again!
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 12:59 pm
by smunnelsnakzruule
Hello everyone, nice forum you have here.
My question is this, how do I go about creating a simple "letterbox" resizable window with scalable graphics in love2D?
one like this:
Code: Select all
[img]http://www.acamara.es/blog/wp-content/uploads/2012/02/screenresolution-smartphone2fixed.png[/img]
[img]https://love2d.org/imgmirrur/WpIvk.png[/img]
[img]https://love2d.org/imgmirrur/IKKVc.png[/img]
[img]https://love2d.org/imgmirrur/VFlfX.png[/img]
[img]https://love2d.org/imgmirrur/swfA6.png[/img]
thanks
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 4:22 pm
by raidho36
sherpal wrote:
Could you explain this a tiny bit more? Specifically, what size of data shouldn't I exceed while sending messages?
In the Networking with UDP tutorial, one can read
Tutorial:Networking with UDP wrote:Additionally UDP datagrams have limited sizes; the luasocket Documentation specifically notes that it doesn't support anything over 8k, and frankly you should assume much less.
but the "assume much less" is a bit vague.
And, is there a "morally minimal" amount of data I should send at once?
The internet network is a complex, limited system and its hurdles are felt by everyone involved. It's not about sticking to specific figures, it's about minimizing bandwidth into oblivion. Just always compress your data, it takes minimum amount of time - especially if you use a compression library such as zlib. And then reduce the overall traffic by sending less data and sending it less often.
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 5:39 pm
by sherpal
raidho36 wrote:The internet network is a complex, limited system and its hurdles are felt by everyone involved. It's not about sticking to specific figures, it's about minimizing bandwidth into oblivion. Just always compress your data, it takes minimum amount of time - especially if you use a compression library such as zlib. And then reduce the overall traffic by sending less data and sending it less often.
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
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 8:29 pm
by ZodaInk
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
Re: "Questions that don't deserve their own thread" thread
Posted: Thu Oct 13, 2016 10:10 pm
by pgimeno
smunnelsnakzruule wrote:Hello everyone, nice forum you have here.
My question is this, how do I go about creating a simple "letterbox" resizable window with scalable graphics in love2D?
one like this:
thanks
I've removed the
Code: Select all
tags from your post for the pictures to show.
You can draw to a canvas and then stretch or shrink the canvas at will.