keyPressed() works only once when you press a key continously, I also used keyRepeated(). Nevertheless, the result is the same.. What interesting is that in emulator it works but when it comes to the...
Type: Posts; User: memosen80; Keyword(s):
keyPressed() works only once when you press a key continously, I also used keyRepeated(). Nevertheless, the result is the same.. What interesting is that in emulator it works but when it comes to the...
Any suggestions ?
Hello Guys,
I changed my rendering order, I call my render method in the write tread.
Now I can syncronize the ball coordinates better.
However, I have some problems with the keys.
I handle...
Hi shmoove,
Thank you for the links, i think i am getting progress day by day..
and Ed_Welch,
When are you doing the client rendering ? After reading the data or in the main loop ?
Dear Ed_Welch,
I have 2 questions ?
1- Do you have [ 2 threads; 1 for reading and 1 for updating ] or
[ 3 threads; 2 threads for reading and 1 thread for updating] ?
...
I have tried your suggestion but I think the problem is the thread algorithm and the time when to render
The GameScreen class writes and ReadThread class reads the inputs. ReadThread class is an...
Dear ed_welch,
i will try what you suggest but what is here the 'idealtime' that you used ?
I stoped for a while to code,
now i am here again at the same problem :)
Well if you have any suggestions please let me know because i have really
troubles with this synchronization..
I...
Is l2cap not the default channel ?
I did the way according to your suggestions..
now master sends everything and client reads and then displays objects..
Well in this situation I have a small problem : Rendering ?
The master is ok...
Well I actually have a master-slave behaviour, I mean there is one server one client and I don't understand what do you meant with channel ?
Hello axs,
You mention acknowledgement right ?
Ther server sends to the client the x, y coordinates, the client receives and sends acknowledgement ( i.e. OK ). The server receives the OK and...
Let's think that there is a succesfull connection between 2 devices.
They can send each other messages and they can also read..
1- When a ball exists in a game that x and y coordinates always...
You are always opening a connection in a loop though you are making it sleep well I think it would be better to open the connection once and closing once at the beginning and the end.
Thank you Ariel,
I think I got it..
I have changed my code according to your suggestions..
besides, I still claim that the example in nokia forum "DiscoverConnect" does not work.. :)
Hi Jim,
Games Over Bluetooth: Recommendations To Game Developers v1.0
contains DiscoverConnect bluetooth example and it is an incorrect example. That is why I posted this issue here.
...
As you see in the code, server and client classes have a loop while(running)
They always read and write, if there is no an infinite loop it will give an IOException.
Is this loop not a waste...
4- Client.java // The client
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.bluetooth.BluetoothStateException;
import...
Ok then I am giving the simpe Bluetooth application codes that I have created.
There are 6 classes;
1- Main.java // the midlet
import javax.microedition.lcdui.Display;
import...
there is an example in this forum:
http://forum.nokia.com/info/sw.nokia.com/id/2b17fb6f-b9a4-4cd8-80fd-94b8251a048e/Games_Over_Bluetooth_v1_0_en.zip.html
you can also find this searching...
Hello Everybody,
There is an example in forum nokia.com; DiscoverConnect. But it does not
work.
When I run two emulators for the DiscoverConnect application, the application runs only once...
You are right, InputStream wants always to read something, so I tried yesterday very interesting thing..
I created a very simple project, just a server and a client.. the senario is that there is...
Is there nobody to answer to this question..
I need really your help...
I am talking about the DiscoverConnect application not btsppecho application.
In DiscoverConnect there is a loop while(true) for reading with InputStream..
but the slave reads only once...
I have the same problem and indicated in other threads in this forums.. but nobody seems to replay to this..