Need docs for game

For blender docs and whatnot:  http://wiki.blender.org  is the place to go imho



The documentators lag a bit behind most of the time tough…

lol ok XD now this time I've got a real question :-o need some help with creating a terrainPage that's not to much wobbly (not like mountain terrain like just plain level ground) and just lots of information about it… I know there is a "TestTerrainPage" I can run and mess around with :stuck_out_tongue_winking_eye:

yup I agree, the wiki is definitely the best place, also if a feature is really new you can check the release notes, like say http://www.blender.org/development/release-logs/blender-243/



With the terrain page, you can either  use heightMap.setHeightScale() with a low value, and/or load a heightmap image that is fairly flat, or even subclass AbstractHeightMap. I’m not sure about more details, apart from looking at the source. I keep meaning to find out more about terrain myself, I know there are quite a few different terrain systems, but not which is best (for me at least) :wink:

cool some new settings to mess around with, but need to sleep and study now so it will have to wait for tomorrow.  :expressionless:

ImageBased would give You more control, but if i understand You right You only want a plain, flat level ? then why not use a single quad ?

if i understand You right You only want a plain, flat level ? then why not use a single quad ?
Yeah you understand me right, there is two reasons that I can think of now. 1 I don't know what a single quad is :// (I'm guessing its almost like a large box with small y) and 2 if do it with a terrainpage and I change my mind (if I don't want a level/horizontal terrain) then I can easily change my program. I think a can remember a quad I think it like a page and has no y.

It's actually a Plane with no depth, comes in  com.jme.scene.shape.Quad and consists of two triangles, no matter how large.

You would have to add a detail texture like terrain does to make it look good but i have no clue if it will work better than a TerrainPage

with very large grid as this would give You culling which can give a nice performance boost.

I read a little on it and checked out the samples of the waterquad and thx for the help so far winkman (I just love the community here :D) … but what Ii mostly did is test with jme-physics I now noticed that a basicly everything as to be attached to a getPhysicsSpace() node. Here is some stuff I got to do:



/*
 * Copyright (c) 2005-2006 jME Physics 2
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *

How would I make a player with physics, this is difficult to explain, so I'll give a example you know like on most first person shooters you can't see your self but but others can see you and you see your guns differently then you see them. Lets go to the sample 'SFPhyTest2_2' how would I make the box be the player but not the player can't see the box. I know its kind of irreverent how others see the box because there is not aspects of networking. I like the way that fe@r displays there client effects example when you look down you can see your own feet.



So basically I just don't want to see the box that the player is controlling.

I haven’t touched my jME-Physics-Networking stuff in a while, but I believe I updated it to work jME-Physics2 right after it was released…



http://forum.captiveimagination.com/index.php/topic,97.0.html



If you have any problems with it let me know there and I’ll get it updated/fixed.

What test can I do that actually goes over the network? I've been looking at com.captiveimagination.jgn.test.chat.ChatClient and ChatServer but I see that it just uses

InetAddress.getLocalHost()

Can I just replace that with my server's IP/Name? this is what I did it worked but only on the computer that I ran the server (I want to make it so that I can run the server on one pc and connect to that server from other…) here is my code:


public class ChatClient extends DynamicMessageAdapter implements ActionListener {
   private JGNClient client;
   private String nickname;
   private String hostip;
   private JTextPane textPane;
    private JTextField textField;

   public ChatClient() throws Exception {
      JGN.register(NamedChatMessage.class);

      hostip = JOptionPane.showInputDialog("What is the ip of the server you want to connect to???");
      //System.out.println(InetAddress.getLocalHost());

      //InetSocketAddress reliableAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0);
      //InetSocketAddress fastAddress = new InetSocketAddress(InetAddress.getLocalHost(), 0);
      InetSocketAddress reliableAddress = new InetSocketAddress(hostip, 0);
      InetSocketAddress fastAddress = new InetSocketAddress(hostip, 0);
      client = new JGNClient(reliableAddress, fastAddress);
      client.addMessageListener(this);
      client.addMessageListener(new DebugListener("ChatClient>"));
      JGN.createThread(client).start();

      //InetSocketAddress reliableServerAddress = new InetSocketAddress(InetAddress.getLocalHost(), 1026);
      //InetSocketAddress fastServerAddress = new InetSocketAddress(InetAddress.getLocalHost(), 2000);
      InetSocketAddress reliableServerAddress = new InetSocketAddress(hostip, 1026);
      InetSocketAddress fastServerAddress = new InetSocketAddress(hostip, 2000);

      client.connectAndWait(reliableServerAddress, fastServerAddress, 5000);
      nickname = JOptionPane.showInputDialog("Connection established to servernnPlease enter the name you wish to use?");
      initGUI();
   }

   private void initGUI() {
      JFrame frame = new JFrame();
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   // TODO fix
      frame.setTitle("Chat Client - " + nickname);
      frame.setSize(300, 300);
      Container c = frame.getContentPane();
        c.setLayout(new BorderLayout());
        textPane = new JTextPane();
        textPane.setText("");
        textPane.setEditable(false);
        c.add(BorderLayout.CENTER, textPane);
        textField = new JTextField();
        textField.addActionListener(this);
        c.add(BorderLayout.SOUTH, textField);
        frame.setVisible(true);
   }

   public void actionPerformed(ActionEvent evt) {
      String txt = textField.getText().trim();
      if (txt.length() > 0) {
         NamedChatMessage message = new NamedChatMessage();
         message.setPlayerName(nickname);
         message.setText(txt);

         if (txt.startsWith("srv")) client.sendToServer(message);
         else if (txt.startsWith("0")) client.sendToPlayer(message, (short) 0);
         else client.broadcast(message);

         textField.setText("");
         writeMessage(client.getPlayerId(), nickname, message.getText());
      }
   }

   public void messageReceived(NamedChatMessage message) {
      writeMessage(message.getPlayerId(), message.getPlayerName(), message.getText());
   }

//   public void messageReceived(Message nm) {
//      if (nm instanceof NamedChatMessage) {
//         NamedChatMessage message = (NamedChatMessage)nm;
//         writeMessage(message.getPlayerId(), message.getPlayerName(), message.getText());
//      }
//   }

   private void writeMessage(short playerId, String playerName, String text) {
      String message = "[" + playerName + ":" + playerId + "]: " + text;
      if (textPane.getText().length() == 0) {
            textPane.setText(message);
        } else {
            textPane.setText(textPane.getText() + "rn" + message);
        }
   }

   public static void main(String[] args) throws Exception {
      new ChatClient();
   }
}


and the server:

public class ChatServer extends DynamicMessageAdapter {
   public ChatServer() throws Exception {
      JGN.register(NamedChatMessage.class);
      String ip = "192.168.8.130";
      InetSocketAddress reliableAddress = new InetSocketAddress(ip, 1026);
      InetSocketAddress fastAddress = new InetSocketAddress(ip, 2000);
      JGNServer server = new JGNServer(reliableAddress, fastAddress);
      server.addMessageListener(this);
      JGN.createThread(server).start();
   }

//   public void messageReceived(Message nm) {
//      if (nm instanceof NamedChatMessage) {
//         NamedChatMessage message = (NamedChatMessage)nm;
//         System.out.println("Message received: " + message.getPlayerName() + ", " + message.getText() + ", " + message.getDestinationPlayerId());
//      }
//   }

   public void messageReceived(NamedChatMessage message) {
      System.out.println("Message received: " + message.getPlayerName() + ", " + message.getText() + ", " + message.getDestinationPlayerId());
   }

   public static void main(String[] args) throws Exception {
      new ChatServer();
   }
}

I know I can browse your “svn server” here but I want to download it via the console can you please give me the cmd :slight_smile: example of jme’s “cvs server” cvs -d :pserver:anynomouse@cvs.dev.java.net:/cvs checkout -P jme.



thx  :mrgreen:



ps: I think I saw it some where at captiveimagination but I can’t remember now where I saw it or if I saw it on java.net anyways I don’t have time to check atm if  you can beat me to finding it (or getting time to read this post and then finding it, because you know wat it is and i’ll find it fast :P) then you can just paste it here and I’ll go paste it in the wiki if I have it… eclipse_guide_to_jgn yeah thinking about it now it doesn’t have much to do with eclipse … erm sleep time … mother is gona take da keyboard if i don’t go… cya



edit:

com.captiveimagination.magicbeans.*; I need that…

MagicBeans.jar should be in the lib directory when you checkout JGN:


svn checkout http://captiveimagination.com/svn/public/jgn/trunk



Or you can install Subclipse, a Subversion client for Ecliipse, and not have to remember such trivial commands. ;)

If you meant you wanted the source for MagicBeans it's available here: http://captiveimagination.com/svn/public/magicbeans/trunk

It's a really awesome but trivial API. :)

Yesterday night I just downloaded jgn_src.jar & jmenet_src.jar & jmephysicsnet_src.jar threw them in a new project I created with eclipse and just got to run one test ,can't even remember the name, well the test did not complete because in linux you need to be superuser to use port < 1024 (found out last night) then I changed the port to 10000 and it worked :wink: and yes I only wanted 'svn checkout http://captiveimagination.com/svn/public/jgn/trunk' thanks :slight_smile:

Glad it's working for you. :)  Let me know if you have any problems.  I should probably go back and change all my tests to use a higher port number, I wasn't thinking when I put those port numbers at 1000.  I forgot that Linux restricts ports up that high.

I've also tried changing (changing from the sample I posted not the original):

InetSocketAddress reliableServerAddress = new InetSocketAddress(hostip, 1026);
InetSocketAddress fastServerAddress = new InetSocketAddress(hostip, 2000);

TO

InetSocketAddress reliableServerAddress = new InetSocketAddress(InetAddress.getLocalHost(), 1026);
InetSocketAddress fastServerAddress = new InetSocketAddress(InetAddress.getLocalHost(), 2000);


Apart from firewall issues that should work just fine.  I need to have a little ping server setup so you can test connectivity to the internet with it as well as post the source code that did it.

O ok I though that the app was made just to give a example and that it doesn't actually bind to the computer's non localhost ip/name I'll have a look at that tomorrow  :-o 

All those examples should work for internet communication apart from the fact they all reference localhost. :wink:

Writing a scanning feature would be relatively easy to do if you wanted to scan a range (like the local network).  It would probably be most efficient with UDP and it could just iterate over the range calling connect and whatever responds back would be accepted and the others ignored.



The samples purpose is to test locally (obviously without a remote machine you can't run internet tests), the only distinction between locally and over the internet is the IP address.  However, it can become more complicated these days with routers, firewalls, etc that can cause headaches, but that's not an issue with JGN, just in your decision on what ports and protocols you want to use.



In JGN 1 I had a ServerRegistry that was sort of a centralized server that maintained information for other servers (they would periodically update their information to it) and clients could connect for a list of the known servers.  I haven't gotten around to implementing this again in JGN 2 but it should be relatively trivial.