Make java game into networked game

I have created a 1 player game in java which has 11 classes, to play the game you launch a class which extends JFRAME. Any suggestions on how I can make this game into a two player game over a network, have been looking at trying to change the game into an applet but this loks impossible.

Ave_beginz wrote:
i have complete what u say in your post. but it is giving error of reading certificate when i m run our game on different pc over the networked using socket
plzz tell me how to handle this.
as my game is chess.
& also tell me how to make it multiplayer.Don't resurrect old threads from the dead, create a new one. And when you do, be sure to provide details about your problems, as what you are saying now is "Yeah I have this code and it doesn't work." Please put effort into making it possible to help you.

Similar Messages

  • I have games that I bought in the App store prior to registering in the Game Center.  How do I get those games on my iPad into the game cenetr?

    I have games on my iPad that I bought in the App Store prior to registering in the Game Cenetr.  How can I get those games into the Game Cenetr?

    Have you tried downloading the shows via the purchased tab in the iTunes app? That is where you will be able to find previously purchased TV shows. Try in there, but take note.
    Note: Previously purchased TV shows are only available through iTunes in the Cloud in Australia, Canada, United Kingdom, and United States.
    You can read more here ....
    Downloading past purchases ....

  • I have Java set up as a plug in but cann't get into yahoo games. Where is the firefox button when I have the browser open? Only button I see gives me close, resize,

    I have java installed and properly working as a plug in. Why can I not get into Yahoo games and play Card Games? Where is the firefox button when I have the browser open? Only button that looks like anything for firefox allows me to restore, move, size, minimize, maximize, and close. That button is top left hand corner location.

    I recently purchased a second hand new macbook air, although it was second hand to me the previous owner had never actually turned it on.
    Something doesn't make sense here, though I'm not saying the previous owner is lying....
    Time to send your serial # to iTS and let them see what's happening here.
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Anyone know of a report on the suitability of java for network games?

    Sorry for the long title but couldn't think how to shorten it without losing my point...
    I'm currently needing to write an appriasal for uni and i need some research material that'll help with this subject.
    Though I can find stuff about java and networks and delays there's nothing about games. Any help would be greatly appreciated :)

    I don't know of any specific reports on this, but if you analyse the differences between other areas of networking and game-specific network code and then research whether or not java handles these elements well you should be able to put your own one together fairly easily. Then just post it online and you will suddenly be an authority in the field :)

  • Slow network game

    Hi. I am trying to make a multiplayer network game. I got the game to work over a network connection, but there is a delay when I send and receive data and the delay seems to get bigger the longer the program runs. As you can see, I send 20 bytes and this is send about 30 times a second but should this be a problem on a localarea network?
    Here is the code I use for sending and receiving:
    // Class that send data
    import java.io.*;
    import java.net.*;
    public class SendNet {
        int port;
        String group;
        MulticastSocket s;
        public SendNet() {
            System.out.println("Connected SendNet");
            port = 5000;
            group = "230.0.0.1";
            try {
                s = new MulticastSocket();
                System.out.println("Connected!");
            } catch (IOException e) {System.out.println("Error");}
        public void sendData(String up, String down, String left, String right) {
             try
                String st = up+"-"+down+"-"+left+"-"+right+"-";
                System.out.println("Sending: "+st);
                byte[] b = new byte[st.length()];
                b = st.getBytes();
                DatagramPacket pack = new DatagramPacket(b, b.length, InetAddress.getByName(group), port);
                s.send(pack);
            }  catch (IOException e) {}
        public void closeConnection() {
            try {
                s.leaveGroup(InetAddress.getByName(group));
                s.close();
            } catch (IOException e) {}
    // Class that receive data
    import java.net.*;
    import java.io.*;
    public class ReceiveNet {
        int port;
        String group;
        MulticastSocket s;
        String[] move;
        public ReceiveNet() {
            port = 5000;
            group = "230.0.0.1";
            try {
                s = new MulticastSocket(port);
                s.joinGroup(InetAddress.getByName(group));
                System.out.println("Connected!");
            } catch (IOException e) {System.out.println("Error");}
        public String[] getData() {
            byte buffer[] = new byte[20];
            DatagramPacket pack = new DatagramPacket(buffer, buffer.length);
            try
                s.receive(pack);
                String st=new String(pack.getData());
                move = st.split("-");
                System.out.println("Receiving: "+st);
            catch (IOException e) {}
            return move;
        public void closeConnection() {
            try {
                s.leaveGroup(InetAddress.getByName(group));
                s.close();
            } catch (IOException e) {}
    }I've never played around with networking before, so maybe I am doing something wrong, or is it just this form of connection (multicastsocket) that is slow.

    I've never used multicast... but seeing as how nobody replied I'll add a few comments.
    First, I see you specify a port and group in the sender, but it's never used when initializing your connection. Is that a mistake?
    Second, there are a few places where you are creating excess objects which will eventually cause the garbage collector to do some work... which could conceivably slow things down. For example:
    // #1.  You are creating a new String for every invocation of sendData.
    # instead, you could use a StringBuffer, or build your data directly in a byte[]
    String st = up+"-"+down+"-"+left+"-"+right+"-";
    // #2.  You are allocating a byte array and throwing it away.  st.getBytes()
    // returns its own byte array.
    byte[] b = new byte[st.length()];
    b = st.getBytes();
    // change to:
    byte[] b = st.getBytes();
    // #3.  Related to #1, you are creating a new String object with every receive.
    s.receive(pack);
    String st=new String(pack.getData());Not sure whether those are the sources of your slowdown. If you still have trouble, how about providing the code which contains the send/receive loops?

  • Someone has been able to get into my Game Center account and has hacked me, I've changed my password and everything but he still finds away to get into my account, he changes my bio and stuff and I don't know what to do, I need desperate help :(

    I've been hacked and I changed my password but he still finds away to get into my Game Center and change my bio. I need serious help

    Have you given your information to anyone?   Family, friend?
    Did you have another device with Game Center on it?   Did you give a new owner of a device any passwords?
    Do you share apple account with a family member?
    Do you have a rescue email set up in your Apple account, with security questions? 
    I suggest you set up a new email account, write everything down and keep it in a safe place.
    New email account and password. Not so easy that it can be hacked.
    In your iTunes account on the computer. Login and change security questions, password and rescue email.
    Again, make sure your password is not easy to guess.   Same with security questions.
    Write it all down and keep it somewhere safe.
    I recommend a password keeper called Enpass.   You can store 10 cards with user names, passwords, notes and account numbers in the free version.
    Then you only have to remember one complicated password to open Enpass and retrieve your information.
    If all else fails, contact apple support.

  • Why do I have to re-sign into Pogo games?

    Every day I have to re-sign into Pogo Games with my user name & password. I installed Firefox solely so I could play games on the site because IE is not compatible with needed Java version. I have saved the cookie and am able to go in & out during the day as long as I haven't shut down the computer. I know it's a minor issue but is there anything I can do to avoid it?

    HI...
    If you are running v10.7 Lion, open System Preferences > General
    Deselect:  Restore windows when quitting and re-opening apps
    When you post, it really helps to tell us which Mac OS X you have installled  

  • Why can't I get into pogo games???

    I have tried to get into pogo games or other game sites and java doesn't seem to want to load. All there is is a white screen with my arrow and a hourglass. Please help - thanks!

    Are you having problems installing Java? If so, you can try an alternate way to get it.
    Go to this page http://java.sun.com/j2se/1.4.2/download.html
    and click on Download J2SE JRE
    (don't click on the ones above that say "J2EE SDK" or "J2SE SDK"
    and follow instructions. This will download a file, save it in your computer (remember where), and then click on it in Windows Explorer to start the installation. after a successful install, the downloaded file can be deleted.

  • I can't update my iPad apps after I make a purchase in a game

    Hi. I'm from Malaysia. I make a purchase in a game a week ago and now I can't update my apps. My friend told me that it's because of the debit card I used does not have sufficient fund in it so I went to deposit more money into my account. Now the deduction of the amount I should pay for purchasing in game is still on floating status. How long would this takes?
    < Personal Information Edited By Host >

    Hi Brian, Thanks for your advice but I've tried a few times but still I can't update my apps.

  • Network Game - Sending Over a network question

    I am going to make my first network game.
    I have read tutorials on networking and have designed an echoserver.
    I am however not sure how to pass player moves over the network. I know that it will work the same way as strings
    but how do I pass other players new positions so I can then broadcast changes to all other clients.
    Thanks in advance for any help
    Marc

    you could use serialization, but that can be too big an overhead when you have a lot of players. I would use a simple messaging system, where you send strings over the network in a specific format that you can create on the sending side and unpack on the receiving side. Something like:
    ID;PARAMS
    where ID is a messageId identifying the specific type of message you are sending, and PARAMS is a list of parameters that depend on the message type. For example a movement message could be:
    1;R;40
    This would then mean that the player moved 40 "units" to the Right. A very simple example, of course adapt to your game's situation.
    The advantage of a system like this is that you can string together multiple messages and send them at once. At the receiving end you can just keep parsing messages from the string until there is no more data.
    If you are really tight on bandwidth, then you'll have to start packing bits in binary data in stead. I would go for the messaging system first though, it is the easiest to get working.

  • Network game

    Hello all,
    I'm planning on building a network game for use over the internet. Now I'm working on the network communication but I'm running into difficulties.
    I need a way so that when player 1 on computer 1 tells the game my character is going to move here, this is send over the internet to the server. when the server receives that, it needs to send the move over to player 2 on computer 2.
    I know I can do this by simply broadcasting the move action to all connected players, but this has some difficulties as I have to take into account that player 1 might have a faster internet connection and thus will move faster on his comp then the same character would move on the comp of player 2.
    If you understand what I mean.
    Mark

    well yes, this would probably work with a small number of players. But it would also generate excessive network trafic. It would be much more efficient to have the players send their move (I want to go there with this speed) to the server. Then let the server calculate their path and send their positions to each client every x seconds. All the clients need to do then is have some piece of code to interpolate the trajectory in between the points send by the server.
    This would cut network trafic significantly because only the server is needed to send the intermediate positions to the clients.

  • Loading something into a game.

    Hey everybody. Ive been trying to load something into my game so that when i reach, lets say 1000 points another powerup comes into the game.
    I tried doing the opposite of Unloading something into the game which's actionscript is
    onClipEvent{
         if(_root.char.hitTest(this)){
         _root.char.speed=10;
         unloadMovie(this)
    Saying that when the char hits this, its speed increases then the powerup goes away. so it worked fine but i wanted to do something that made the powerup come into the game. The actionscript i tried is.
    onClipEvent{
         if(_root.score<=1000){
         loadMovie(this)
    i didnt give it anything specific to do once it was loaded. but i tried that and it said that it didnt work. i guess load movies and unload movies are totally different. But if anybody could please help me, it would be much appreciated. Thanks =).

    ok.  so, if you have:
    onClipEvent(enterFrame){
         if(_root.score<=1000){
         loadMovie(this)
    it doesn't make sense to use loadMovie(this).
    you could use something like:
    onClipEvent(enterFrame){
         if(_root.score<=1000&&!_parent.loadStarted){
    _parent.loadStarted=true;
         this.loadMovie("somefileyouwantoload.xxx")
    but that's really poor coding.  it would far better to use a loop that would and, you could, terminate:
    yourMC.onEnterFrame=function(){
    if(_root.score<=1000){
    this.loadMovie("somefileyouwanttoload.xxx");

  • I am trying to get into my Game Center app but every time I tap on the app it opens too a blank white screen. I have tried several times to reset my phone but I get the same result.

    I am trying to get into my Game Center app but every time I tap on the app it opens too a blank white screen. I have tried several times to reset my phone but I get the same result.

    Hello there Sweebs44,
    It sounds like you are tapping the Game Center app to open it, but the screen is blank. I recommend signing out of your account:
    Go to Settings > Game Center, where you can:
    Sign out (tap your Apple ID)
    From: iPhone User Guide
              http://help.apple.com/iphone/7/#/iph6c493cac
    Then close all the running apps:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    When you have done that restart the phone sign back into your account and try again:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card)

    I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card).
    Things to note:
    I have been unable to update firmware on this computer for about a year now. Im not sure why.
    I am running a bootleg copy of Windows XP on this computer, I would not like to spend $149 to get Windows 7 if possible.
    any thoughts on the matter would be greatly appreciated, thank you.

    Why don't you take your 'old' MBP into your local Apple Store and have them check out everything that's wrong with it - and I mean everything? Then, when you get an estimate about how much it would cost to get the machine completely repaired, ask about the Apple flat-rate repair pricing?
    It's worth a shot - and with what you may save, you can put in the bank for a new MBP.
    Clinton

  • Why can't I log into my game center account with my existing login to add my apple account?

    Why can't I log into my game center account with my existing login to add my apple account?

    Errr I'm having the same issue too, but it's my son's iPod and he's lost all his game levels, like DragonVale too He is not impressed!

Maybe you are looking for