Search found 17 matches
- Thu Nov 29, 2012 5:28 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Well thanks a lot man. I've finally got it all working and I pretty much understand it (hadn't slept for around 30 hours when I first read your post - I'll blame that ).
- Wed Nov 28, 2012 5:10 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Oh okay so you use all three.
And do you always have to do the "string.format("%s\n\n%s\n\n%s\n\n%s")" bit for everything you send over or is that specific to that example?
And do you always have to do the "string.format("%s\n\n%s\n\n%s\n\n%s")" bit for everything you send over or is that specific to that example?
- Wed Nov 28, 2012 11:31 am
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Thanks a lot! I've got everything working (I think). I've downloaded Serpent and figured out how to serialize (serpent.line(message)), but I can't figure out how to deserialize, do you happen to know the name of the deserialization function?
- Tue Nov 27, 2012 11:25 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Assuming we have 3 players online, let's assume they all send these things: P1 Sends: Moving, Combat, Skills P2 Sends: Combat, Skills, Moving P3 Sends: Skills, Moving, Combat As you can see they all send data in a different order. How does the server know to execute the function that handles Moving...
- Tue Nov 27, 2012 8:48 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Okay. What I'm doing is trying to send different things at different times so the packets will usually not be sent in the same order each time. Let's take a simple game for example where you have skills, combat and moving. Assuming we have 3 players online, let's assume they all send these things: P...
- Tue Nov 27, 2012 8:24 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Oh, well, you don't. Instead, with everything you send what it is, and read that on the other end. So if I wanted to send different things in different orders I couldn't? Would that mean that I would just have to send everything every time I want to send something? When you read from a TCP socket, ...
- Tue Nov 27, 2012 7:21 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
Using a tcpClient, of course. TCP is a protocol meant to deliver reliably and in order. UDP is lossy, packets can be lost, arrive in different order, etc, the advantage is that this allows you to not care about old packets, so it's generally more suitable for realtime games. Well what I mean is if ...
- Tue Nov 27, 2012 7:06 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Re: Packets in LUBE
So just using the tcpServer:receive and tcpServer:send?bartbes wrote:Yeah, using tcp.
Like,
Code: Select all
-- client
function sendSomething
tcpServer:send(player.x)
end
- Tue Nov 27, 2012 5:34 pm
- Forum: Support and Development
- Topic: Packets in LUBE
- Replies: 17
- Views: 7606
Packets in LUBE
I've recently managed to get LUBE to work and I've noticed a pretty big issue. Is there any way to send specific packets when you need to from both client and server and handle them in the order they were sent in? For example: -- client function sendPlayerLoc udp:send(player.x) udp:send(player.y) en...
- Thu Nov 22, 2012 9:03 pm
- Forum: Support and Development
- Topic: Drawing a Grid
- Replies: 11
- Views: 5613
Re: Drawing a Grid
Yeah I was using that before but because I couldn't change the image or colour of the lines I went with using Quads. Whoops. Didn't see that part. You can change the color of all love.graphics functions by using love.graphics.setColor . Just be sure to set the draw color back to white (255,255,255,...