Hi, im working in a pong game, that can be played via ad hoc against another player. The source is fine, but there is a problem: im sending two different data at the same time to another psp, that are the position of the ball and the position of the paddles. In result, the movement of the ball (in the psp that receives the data from the other) is some kind of slow and with "breaks".
If i deleted the one of the sending data, for example, the position of the paddles, the movement of the ball would be perfect, with no breaks. So i suppose that the problem is in sending two different data at the same time. How can i solve the problem? I´ve heard about threads, is it going to help me ?
[homebrew] Pong game Ad Hoc
Moderators: Shine, Insert_witty_name
I guess you must send just a string, witch contains the coordinates of the balls and paddles, then you'll parse it obtaining the coordinates.
For my PSP project, visit my web site: www.gefa.altervista.org
PaintMIXER v2.6.0 released: http://www.neoflash.com/forum/index.php ... 253.0.html
PaintMIXER v2.6.0 released: http://www.neoflash.com/forum/index.php ... 253.0.html
thats not so easy, because the Adhoc only accept strings and if i would pass the coordinates of each position i had to do:
If "x=0 and y = 13 " then
x = 0
y= 13
If " x == 0 and y == 14" then
x= 0
y = 14
.
.
.
and so on... I already made the homebrew, but the movement of the ball is not random xD Now, im making a prx that turns off psp when button is pressed, but i just cannot deal with it. if anyone can help me, please read the other topic i created :P
If "x=0 and y = 13 " then
x = 0
y= 13
If " x == 0 and y == 14" then
x= 0
y = 14
.
.
.
and so on... I already made the homebrew, but the movement of the ball is not random xD Now, im making a prx that turns off psp when button is pressed, but i just cannot deal with it. if anyone can help me, please read the other topic i created :P
Anyway you didn't understand... You have to send a string like:
12,34,45,32
Where the first two numbers are the coordinates of the first ball; instead, the two latest are the coordinates of the second ball.
Then, you must split that string by passing as argument of division the char ",", obteining in this way the 4 numbers. Sorry for my bad english, have you understood?
12,34,45,32
Where the first two numbers are the coordinates of the first ball; instead, the two latest are the coordinates of the second ball.
Then, you must split that string by passing as argument of division the char ",", obteining in this way the 4 numbers. Sorry for my bad english, have you understood?
For my PSP project, visit my web site: www.gefa.altervista.org
PaintMIXER v2.6.0 released: http://www.neoflash.com/forum/index.php ... 253.0.html
PaintMIXER v2.6.0 released: http://www.neoflash.com/forum/index.php ... 253.0.html