How can i implement the multiplayer in my game through the irda?
I've written this code, but i haven't tried it.
it's only a test for see if i succeed to establish a logon between two psp, even if i don't know well like realizing it.
System.irdaInit()
black = Color.new(0,0,0)
white = Color.new(255,255,255)
ownCrossPressed = "false"
otherCrossPressed = "false"
sprite = Image.createEmpty(64, 64) -- You didn't even use this in your code
while not Controls.read():start() do
pad = Controls.read()
if pad:cross() then
ownCrossPressed = "cross"
System.irdaWrite("X")
else
System.irdaWrite("false")
end
opad = System.irdaRead()
if string.len(opad) > 0 then
otherCrossPressed = opad
else
otherCrossPressed = "false"
end
screen:clear(black)
screen:print(0, 0, otherCrossPressed, white)
screen:print(0, 10, ownCrossPressed, white)
screen.waitVblankStart()
screen.flip()
end
ThE eNeTin wrote:How can i implement the multiplayer in my game through the irda?
I've written this code, but i haven't tried it.
it's only a test for see if i succeed to establish a logon between two psp, even if i don't know well like realizing it.