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?
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.
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".
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?
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.
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