Hey Everyone...  I have a networking Question...

Ok well its more then just one networking question...
I'm working on a game engine (2d) and for the time being it just has two blocks in a 600 by 480 area, both controled by user input on a single comp. I would like to change this so that i can have the blocks be controled by sepeart computers. I know this is possible I just dont know how, any help would be great.
My experience with Java is some what limited i've only been programing for the past 6 months and i've never messed with any network code before.
Any and all help would be great
Thanks
Mike

Boy, that other poster was really helpful, yes? :-P
What you probably want to do is open a "socket" between one computer and the other. (TCP is probably the easiest/best for your application, as opposed to UDP). This is actually pretty simple, and basically consists of:
(this client/server arrangement is the easiest. Peer-to-peer would work too, but is generally more complex.)
1. Computer A decides to become the server and opens a java.net.ServerSocket on port 1234.
2. Computer B opens a java.net.Socket to computer A's port 1234.
3. Computer A accepts the connection and gets a java.net.Socket from the ServerSocket.
4. Now anything computer A writes to the Socket is recieved by computer B, and vice-versa. This is a TCP connection and is stream-based, so it should be familiar if you've done any Java I/O before; in face, you can use java.io.Reader's and Writers, and so on with your Socket.
See http://java.sun.com/docs/books/tutorial/networking/sockets/ for a good introduction to sockets.

Similar Messages

  • HT2404 Hey everyone I have a MacBook and I use it for papers in college

    Hey everyone I have a MacBook and I use it for papers in college what is the best software to get like Microsoft word can i purchase that software for my MacBook? Also how do I save work I did on my MacBook so it will come up in the correct format for my professor?

    You can buy Microsoft Office for Mac, or get the free NeoOffice
    http://download.neooffice.org/neojava/en/index.php
    NeoOffice is equivalent to Microsoft Office. It can open Excel files, Word files & PowerPoint files. You can also create these types of files that can be opened by PC users.
     Cheers, Tom

  • Hey everyone i have an iphone 3gs it was running on 4.0.1 and i updated to 6.0.2 but now it says your phone could not be activated?

    hi everyone i have an iphone 3gs it was running on 4.0.1 and i updated to 6.0.1. then its said i needed to restore my phone to factory settings and i did but now it says; "your phone could not be activated because the activation server is temporarily unavailable try connecting your iphone to itunes to activate it or try again in a couple of minutes"...if this problem persists contact apple support at apple.com/support.
    I've tried all that i can and still no results. Could anyone shed some light on the subject if so it would be greatly appriciated!

    Ok thank you so much! Although I ended up taking the sim card out of my new Iphone and reinserting it into my old one it finally let me restore it! So thanks once again this really helped!

  • Hi Everyone I have a tech question

    I got my iphone on thursday and it breezed thru activation with no problems. I've made and received several calls with no problems on both ends. My question is this we have roadrunner wifi and i was wondering during activation my brother got a message from roadrunner saying there was an intrusion from our end since this happened during the iphone activation. but now everything is fine .Can I use the wifi connection from our roadrunner network ? My iphone finds the connection and asks for the wep password every so often and wants to use it . All the other times it uses edge just fine when i went to the Apple store they told me roadrunner is'nt compatible so is that true ? I would think any wifi would work? All replies welcome Overall i like the iphone and my family likes it too.

    Hi,
    I have an iPhone at home syncing on a 24" iMac with a wireless connection to an 'N' airport extreme. Hooked to 'N' is an old 'G' airport extreme that creates a separate network the iPhone can use. All of this is on a single roadrunner cable modem. The phone activated fine on the 'N' network and works just fine on the 'G" network. Once i gave the iPhone the WPA password for the 'G' network it connects as soon as i walk in the door. If everything works for you, i would ignore the roadrunner message.

  • Hey so I have a layer question

    Okay so I want to add a background from one of the generators in the library and I want to add text on top of it. okay heres my question: How do I make it so that everything on that flat layer will stay there? For example when I go into 3D Mode with the active camera I want to be able to move that multilayered file as one? ME ENTIENDES??? I hope so one knows i dont think this is that complex.

    hi,
    if there is distance between your text and background, maybe their 'z' space parameter is different?
    to flatten a layer you can select group that all the layers are in, and head over to the inspector, click on the tab called group and check the flatten checkbox.
    hth
    adam

  • HT4528 hey so i have a few questions about my phone. who can help? first my phone makes no sound unless music is playing or im talking, other than that i cannot get it to ring when people call. second do i need to take it in if it freezes alot.

    should i take my phone in?
    will they replace it without a warrentey if its the phones fault and not mine?
    why does the speakers work but it always vibrates even when vibrate is off and only sound is on?
    why is it directing my to find help when im trying to make a purchase and refusing to processes the purchase?
    And do all iPhones freeze all the time cuz, mine does.

    Is the silent switch on the side of the iphone on?
    Have you tried the basics?  restart, reset, restore

  • Hey just have a quick question that is ios7 coming on ipod touch 4g I heard that you guys didnt design ios 7 for ipod touch 4g so are u gonna design it or its never gonna come for ipod touch 4g

    hey guys just have a simple question that i heard that ios 7 is not gonna come for ipod touch 4 they didnt design it for ipod touch 4 so are you guys designing it or its never gonna come for ipod touch 4g.
    Thanks,

    As posted on Apples website since early June, the ipod touch 5th gen is the ONLY ipod that can handle ios 7.
    No other ipod has the required hardware.

  • Share files in ibook - networking question

    Hello, I have a networking question.
    I have a brand spakin' new 13' MacBook Pro and an older 14' iBook G4 (with a broken airport wireless card).
    My internet is set up so that I have the modem connected to a "wired" ethernet hub, then to an airport express. This way I have wireless for my new MacBook Pro, and I can connect my old iBook to the internet with a ethernet cable.
    Herein lies my question: I want to access all my files on my ibook from my MacBook Pro. I've tried the file sharing and etc on system preferences, but for some reason it still doesn't work. I believe its because they are on different networks? (one wireless, one wired?)
    Any ideas to make my ibook a simple file server.

    Try repairing disk permissions.
    *"The external HD has two partitions, one is a backup of the ibook, and the other has mixed media. When I access my ibook over the network, Only the backup partition appears, and not the mixed media partition. "* Try repairing permissions but not sure if that's going to work. Can't hurt to try.
    Launch Disk Utility. Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac.
    Also, your profile indicates you are running 10.4.3. If that is the case, you might want to run Software Updates (from the Apple Menu , then click Software Updates.
    Message was edited by: Carolyn Samit

  • TS3694 hey everyone.. i have a problem with my 3Gs iphone.. i updated to the ios5 and now when i open it says that i have to connect it with the itunes. when i connect it says that has an error 28 something like that.. can anyone help me to fix it?? Regar

    hey everyone.. i have a problem with my 3Gs iphone.. i updated to the ios5 and now when i open it says that i have to connect it with the itunes. when i connect it says that has an error 28 something like that.. can anyone help me to fix it?? Regards

    Error 23, 28, 29: These errors may indicate a hardware issue with your device. Follow the steps in this article. Also attempt to restore while connected with the white USB Dock Connector cable that shipped with your device, on a known good computer and network to isolate this issue to the device. The MAC address being missing or the IMEI being the default value, (00 499901 064000 0), can also confirm a hardware issue. Out-of-date or incorrectly configured security software can also cause these errors.

  • Hey everyone :) I need help resting my password secuirty questions

    Hey everyone okay so its getting a little bit frusturating because this is the second time now that i've had to rest my password secuirty questions, but i guess i have no one to blame but my self ugh. Anways sorry, i know kind of how to rest it but it says that i need a rescue email to rest it to and i guess id don't have a rescue email yikes. So i need help putting in a rescue email. Help anyone? Please i really wanna buy song grrrr help
         Savannah S. xx

    You won't be able to add a rescue email address until you can answer your questions, you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Hey everyone..i have attached my iphone 4 to lappy after a long time..itunes syncd all contacts now contacts are no longer in my phone.how to get them back in my ph.pls reply

    hey everyone..i have attached my iphone 4 to lappy after a long time..itunes syncd all contacts now contacts are no longer in my phone.how to get them back in my ph.pls reply

    Hi bluegrandpanash,
    Thanks for visiting Apple Support Communities.
    If you backed up your iPhone to iCloud before updating the software, first try the steps under "Restore from an iCloud backup" in this article to recover your data:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/HT1766
    Best Regards,
    Jeremy

  • TS1812 Hi Everyone, I have tried all the solutions mentioned by apple and still have a white screen with a blinking file folder with a question mark in the center, anyone have any ideas or experienced this?

    Hi Everyone, I have tried all the solutions mentioned by apple and still have a white screen with a blinking file folder with a question mark in the center, anyone have any ideas or experienced this?

    Nooo or you would use OS X Recovery Mode: Disk Utilty and then Startup Disk.
    Mac OS X & Mountain Lion Community
    https://discussions.apple.com/community/mac_os
    https://discussions.apple.com/community/mac_os/os_x_mountain_lion?view=discussio ns
    Recovery Mode
    http://support.apple.com/kb/HT4718
    ExpressLane
    https://expresslane.apple.com/
    Mac OS X Help
    http://www.apple.com/support/macbasics/
    Isolating Issues in Mac OS
    http://support.apple.com/kb/TS1388
    https://www.apple.com/support/osx/
    https://www.apple.com/support/quickassist/
    http://www.apple.com/support/mac101/help/
    http://www.apple.com/support/mac101/tour/
    Get Help with your Product
    http://docs.info.apple.com/article.html?artnum=304725

  • Hello everyone I have a question I use my Apple ID for iMessage but I want to know if I can use my friends Apple ID just for the App Store, can I do that ????

    Hello everyone I have a question I use my Apple ID for iMessage but I want to know if I can use my friends Apple ID just for the App Store, can I do that ????

    First on a computer try editing your ID to change the payment method to None.
    How do I change my Apple ID Name or personal information?
    You can change your Apple ID Name at My Apple ID. Click on Manage your Apple ID and sign in with your Apple ID name and password. Click Edit and enter the new information, then click Save Changes. Changes take effect immediately. You can also use My Apple ID to change your personal information, such as your mailing address or email address. See Changing the name you use for your Apple ID if you'd like more information.
    If problems see:
    Why can’t I select None when I edit my payment information?
    Last:
    Create a NEW account using these instructions. You have to use an email address not used with Apple before.
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • Hello everyone ,i have macbook and macbook pro 15,so my question is can i use magsafe 60v charger to charge my macbook pro which having 85v magsafe but not in working condition.

    hello everyone ,i have macbook and macbook pro 15,so my question is can i use magsafe 60v charger to charge my macbook pro which having 85v magsafe but not in working condition.

    mangesh171 wrote:
    my question is can i use magsafe 60v charger to charge my macbook pro which having 85v magsafe but not in working condition.
    No.
    Power Adapter/ cord wattage
    “Power adapters for Intel-based Apple notebooks are available in 45W, 60W, and 85W varieties. Although you should always use the proper wattage adapter for your Apple notebook, you can use an adapter of a higher wattage without issue.”
    http://support.apple.com/kb/HT2346
    Best.

  • Hello everyone I have a problem with the app store as secret questions asks me to download the application, the problem is that I do not remember the answers as I do?? thank you very much to all

    Hello everyone I have a problem with the app store as secret questions asks me to download the application, the problem is that I do not remember the answers as I do?? thank you very much to all

    Hello andreabn90
    If you can't remember your security questions go to  Express Lane.
    select iTunes from the list, then iTunes store.        On the next screen select account Management.          There, select iTunes store account security and write that you would like to reset your security questions and / or answers.
    You should get an eMail reply over the next 24 hours.

Maybe you are looking for