Jump to content

Perakp

Members
  • Posts

    617
  • Joined

  • Last visited

Posts posted by Perakp

  1. While doing port forwarding there were two fields, "port from" and "port to". I thought they meant a range of ports to be redirected, for example ports from 2000 to 3000. But no, it meant directing incoming traffic from port x to another port y, in my case I put them both to 2004, and that was it.

     

    Now that I got this simple server/client connection working, I can move onto more interesting things, namely multiplayer games. (other than hotseat =D) Chat client still has some minor problems, for example connections aren't handled properly when user closes the window without disconnecting first, and support for multiple channels could be fun too. Not that I'd be into creating a whole new irc client, but stuff like that could make for a good programming exercise.

  2. Hello,

     

    I've written a simple chat application with Java, following easily found tutorials from the internet. I've created a multithreaded serverside to handle multiple connections and a simple but neat chat window.

    First I tested the application using getLocalHost() method:

    int port=2004;
    InetAddress address=InetAddress.getLocalHost();
               requestSocket = new Socket(address, port);
    

    The chat server worked nicely even with multiple chat windows open, each message sent was received by the others etc.

    Next, I got the thing working using my internal Ip address, or the ip address given by my router.

     

    Now my problem is, how can I get the thing working from any computer, how do I actually connect two computers through these sockets? So far I've only connected the server to the client on the same computer, but that's of no use unless you enjoy chatting with yourself.

     

    Here's what I've tried and looked into so far:

    - router settings. I've told the router to forward outside traffic to my chosen port (2004). The router settings ask for the name of the application. Do I need to put something there or is it just to look nice? What does the router care what application uses the incoming data?

    - firewall settings. Now the funny thing is, I'm doing this on a Mac, and there is no way to configure the firewall to open certain ports, it "automagically" opens ports for certain trusted applications (Eclipse included) Turning the firewall off didn't change anything.

    - Does it matter that my internet is provided by my university? Is it possible that they have something in place that makes this impossible?

     

     

    Here are the related parts of my code:

    Server side:

    /**
      * Wait for connection attempts and hand out the sockets to threads that manage the connection.
      */
       public void run()
       {
           try{
           serverSocket = new ServerSocket(2004, 10);
           while(running){
               System.out.println("Waiting for connection");
               Socket clientSocket=serverSocket.accept();
               ClientServiceThread [bleep]hread = new ClientServiceThread(clientSocket, id++, this);
               clients[id]=[bleep]hread;
               [bleep]hread.start();
           }
           }catch(Exception e){
               //
           }  
    
       }
    

    Client side:

    /**
        * Connects to the server
        */
       public void connect(){
           try{
               //1. get the socket
               int port=2004
              InetAddress address=InetAddress.getByName(myExternalIpAddress);
               requestSocket = new Socket(address, port);
               //2. get streams
               out = new ObjectOutputStream(requestSocket.getOutputStream());
               out.flush();
               in = new ObjectInputStream(requestSocket.getInputStream());
       }
           catch(Exception e){
              System.out.println("Connection failed");
           }
           }
    

     

     

    If you are experience with this kind of thing, please share your knowledge! =)

  3. A quick tip for bf3 newbs such as myself: when you have an enemy in your sights, click 'select' to tag/spot the enemy. Adds an orange arrow above their head. (that's the button for ps3, don't know about other systems)

     

    Quick list of flaws:

    -No way to see the controls, eg. which button does what. Wouldn't have ever figured out that spotting thing if someone hadn't told me

    -No killcam, but I guess it brings more "strategy" in the game when you don't get to know where you were shot from. I'd just like people to see how awesome kills I get, no killcam = no way to humiliate people

     

    Beyond that, looks like an insta-buy awesome game.

  4. One problem I have is inventory management, I seem to have all the tools and only a few pieces of food. It's crippling.

    Just now I had a good dungeon, don't know if it was fast or not on the pro standards, but I enjoyed the pace we were having. It's not all bad.

  5. Hi! I dungeoneer with randoms!

    I hate how people play dungeoneering, I think the skill would be much more enjoyable if people would cut some slack on the xp rates and actually CLEARED the dungeon instead of just running through it. Waiting for a keyer to tell "gd here" and find it's 5 rooms full of monsters in between is hell. You take so much unnecessary damage and you're forced you to eat all your food even before you get to the right place. I'm just saying that the current way of maxing xp rates isn't the most fun way to play the game. If pros want to play the game that way, sure, go ahead, but every noob shouldn't try to play with the same method, since it clearly demands some sort of teamwork, teamwork you can't have when you play with randoms.

    So people that play with randoms: Take it easy and stop rushing! It won't work.

     

    Top example: Going to the boss room with no food, resulting in the death of every team member x5. Just because rushing is fast and collecting food supposedly is not.

  6. Videogames changed the way I perceive myself. I have health-, hunger-, stamina-, happiness (and mana) bars, and often I think "just 12k xp till I've read enough for this test".

    I also sometimes look behind me to see if I could find rendering lag in the world, but I'm beginning to think it is all pre-rendered.

  7. Tbh, I would've liked it to go longer, one of the other disappointments for me was the battle scenes didn't live up to my expectations. They could have added in a lot more there.

    I think that the non-action scenes (resurrection stone, story of Snape & King's Cross) got the attention they deserved better this way. For me, the final confrontation between Harry and Voldemort was less epic than I would've liked. Falling off the tower just didn't do it for me.

     

    I feel very satisfied with this movie and the whole series really, can't wait to have them all on dvd/b-ray. I spent this whole day just watching interviews, trailers and clips from the older movies from Youtube. It's really hard to let go of Potter, I can't imagine what it must be like for the young actors, or Mrs Rowling. They did an awesome job.

  8. http://www.unchartedthegame.com/

    Release: November 1st 2011

    http://www.youtube.com/watch?v=fvpu003drCk&feature=player_embedded

     

    Multiplayer beta has been open for some time now. I tried the team deathmatch and team objective gametypes and liked them. There are two maps in the beta: Airstrip and Chateau. Can't really compare this because I haven't played Uncharted 2 through yet, but from what I've seen, I doubt this will be much worse than the previous parts.

     

    (I could've sworn there was a topic for this before, but couldn't see it anywhere so here you go)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.