A little help with LUBE
Posted: Sun Oct 24, 2010 8:57 pm
Having trouble getting started using LUBE?
Selected posts from this thread.
Quick introduction (arguably the most useful for starting)
http://love2d.org/forums/viewtopic.php? ... =120#p6154
Out of date examples
http://github.com/bartbes/lube-demo
Very simple start
http://love2d.org/forums/viewtopic.php? ... t=30#p2905
http://love2d.org/forums/viewtopic.php? ... 190#p15526
Pack and Unpack (no nested tables in lube.bin:pack/unpack
http://love2d.org/forums/viewtopic.php? ... 170#p11178
Multiple connections to a server
http://love2d.org/forums/viewtopic.php? ... =100#p6079
Broadcasting to a subnet
http://love2d.org/forums/viewtopic.php? ... =120#p6151
http://love2d.org/forums/viewtopic.php? ... =150#p7029
Selected General Network Programming Guides:
Networking for Game Programmers
Targeting A variation of dead reckoning
Source Multiplayer Networking
FAQ - Multiplayer and Network Programming
Distributing Object State for Networked Games Using Object Views
What is Lag?
Using Groupings for Networked Gaming
A very simple LOVE server/client skeleton. All this does is connect to a server on localhost. And the server acknowledges the connection.
You will have to open up two instances of it, one for server, and then one for client.
Press 1 for server, Press 2 for client.
In a nutshell, this is what is happening:
server:
client:
Selected posts from this thread.
Quick introduction (arguably the most useful for starting)
http://love2d.org/forums/viewtopic.php? ... =120#p6154
Out of date examples
http://github.com/bartbes/lube-demo
Very simple start
http://love2d.org/forums/viewtopic.php? ... t=30#p2905
http://love2d.org/forums/viewtopic.php? ... 190#p15526
Pack and Unpack (no nested tables in lube.bin:pack/unpack
http://love2d.org/forums/viewtopic.php? ... 170#p11178
Multiple connections to a server
http://love2d.org/forums/viewtopic.php? ... =100#p6079
Broadcasting to a subnet
http://love2d.org/forums/viewtopic.php? ... =120#p6151
http://love2d.org/forums/viewtopic.php? ... =150#p7029
Selected General Network Programming Guides:
Networking for Game Programmers
Targeting A variation of dead reckoning
Source Multiplayer Networking
FAQ - Multiplayer and Network Programming
Distributing Object State for Networked Games Using Object Views
What is Lag?
Using Groupings for Networked Gaming
A very simple LOVE server/client skeleton. All this does is connect to a server on localhost. And the server acknowledges the connection.
You will have to open up two instances of it, one for server, and then one for client.
Press 1 for server, Press 2 for client.
In a nutshell, this is what is happening:
server:
Code: Select all
function onConnect(ip, port)
print("Connection from " .. ip)
end
function onReceive(data, ip, port)
end
function onDisconnect(ip, port)
end
server = lube.server(18025)
server:setCallback(onReceive, onConnect, onDisconnect)
server:setHandshake("Hi!")
function love.update(dt)
server:update(dt)
end
Code: Select all
function onReceive(data)
end
client = lube.client()
client:setHandshake("Hi!")
client:setCallback(onReceive)
client:connect("127.0.0.1", 18025)
function love.update(dt)
client:update(dt)
end