Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (593)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Re: Problems running the SGS on: 2007-03-13 16:05:38
I followed the running SGS in Eclipse guide, and I think I've made some progress with it.  Right now though I'm stuck because it says it can't find the /dsdb directory.  I have an empty  dsdb directory directly inside the root of my project directory (where the sgs jar and all other stuff is also)  I also included have another one at Data/<Game Name>/dsdb because the demos are set up like that.  Neither is working.  Is there a location I can specify where this directory should be?


Scratch that, upon closer examination it's the second entry in the  file that points to the directory that contains the dsdb folder.  Mine was wrong.
2  Game Development / Networking & Multiplayer / Re: Java Serialization and sendToServer() on: 2007-03-12 19:58:50
Yeah I was using EA when that problem came up, I'm currently switching over to 0.9 and trying to learn the changes, I'll see if the problem corrects itself when I get the server running agin.
3  Game Development / Networking & Multiplayer / Java Serialization and sendToServer() on: 2007-03-05 18:41:58
I'm getting a strange bug while trying to use the Java Object Serialization and moving data back and forth between my client and server, via the sendToServer() method.

The code works when i run a test case in a single class, but then fails when i move the data over through the server.  The first thing I noticed is that sgs appends two bytes of data to the array that backs the bytebuffer. I managed to get around that, but now when I try to read an object from the ObjectInputStream i created from a ByteArrayInputStream i created from a byte array i created from the bytebuffer that the UserDataRecieved callback method hands me *breathe now*, it blocks and doesn't finish the method.

Firstly, can anyone explain why this may be happening, and secondly, what all happens to the bytebuffer after I send it to the server?

here's the code for my abstract event class that handles both the serialization and deserialization for the events.

Please excuse the attempted problem solving code in there.

Thanks for your help in advance


package events;

import java.nio.ByteBuffer;

public abstract class AbstractEvent implements Serializable{

   public ByteBuffer dematerialize() {

      byte[] bytes = null;
      ObjectOutputStream oos =null;
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      try {
         oos = new ObjectOutputStream(baos);
         bytes = baos.toByteArray();
         for (byte b : bytes){
            System.out.print(b+" ");
      } catch (IOException e) {
         // TODO Auto-generated catch block
         try {
            assert oos != null;
         } catch (IOException e) {
            // TODO Auto-generated catch block
      assert bytes != null;
      ByteBuffer bb= ByteBuffer.allocate(bytes.length);
      for (byte b : bb.array()){
         System.out.print(b+" ");
      return bb;
   public static Event rematerialize(ByteBuffer bb){
      System.out.println("Byte buffer at pos "+bb.position());
      System.out.println(bb.capacity()+" total bytes");
      byte[] byteArray = new byte[bb.remaining()];
      System.out.println(bb.remaining()+"bytes remaining");
      for (byte b : byteArray){
         System.out.print(b+" ");
      ObjectInputStream ois = null;
      ByteArrayInputStream bais = new ByteArrayInputStream(byteArray, 0, byteArray.length);
      System.out.println(bais.available()+" bytes available in bais");
      Event e = null;
      try {
         ois = new ObjectInputStream(bais);
         System.out.println(bais.available()+" bytes available in bais");
      } catch (IOException e1) {
         System.out.println("Couldn't make ois");
         // TODO Auto-generated catch block
         return null;
      try {
         System.out.println(ois.available() + " bytes can be read");
         e = (Event)ois.readObject();
      } catch (IOException e1) {
         // TODO Auto-generated catch block
      } catch (ClassNotFoundException e1) {
         // TODO Auto-generated catch block
      System.out.println("Recieved "+e.toString());
      return e;


4  Game Development / Networking & Multiplayer / Re: sendToServer() - help on: 2007-02-22 16:48:59
Update - Fixed

But I'm not sure exactly why the problem was fixed.  Basically, it worked as soon as  I deleted the persistent_store folder and rebooted the server.  Can anyone help shed some light on this.  Could it be because I update the functionality of the Player class so I had to remove all previous versions of them?  Could it have something to do with the userID?

5  Game Development / Networking & Multiplayer / sendToServer() - help on: 2007-02-20 00:04:07
Can someone please layout the steps required to get the ClientConnectionManager.sendToServer() method to activate the SimUserDataListener.userDataReceived(UserID arg0, ByteBuffer arg1) callback function?

You can assume that my client is already connected to the server, and that an instance of the class that implements SimUserDataListener has already been created and registered.  It has also joined a channel.

I would really appreciate the help, no matter what I do I can't get the server to respond to messages sent from my client.

6  Game Development / Networking & Multiplayer / Re: "Missing Installation Loader" Error on: 2007-01-26 18:31:11
Ok I fixed the problem.

Apparently, regardless of the values you enter for the file path to the server deployment XML file and the way your file system is structured, the server won't recognize your boot class unless it is located in an apps folder.  I don't know if this is a bug or not, but you would think that you could structure your files however you wanted.  Anyone have any insight on this?

7  Game Development / Networking & Multiplayer / "Missing Installation Loader" Error on: 2007-01-23 15:04:39
I've been trying to start learning SGS.  My goal right now is to get the server running and do something as simple as printing out a message to the console in my BootGLO class.  The problem is that I run into this error before I get there.  I've tried everything I can think of but I keep getting the following error:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(
java.lang.InstantiationException: Missing Installation Loader

Here's what my files look like (I think these are the relevant ones)


#This file describes the games installed into this back end as a list of one line entries
#The entries make up a 2 column able as follows
#Game ID   URL Location of deployment XML

1   file:zombieSurvival_Deployment.xml


<GAMEAPP gamename="ZombieSurvival">
   <GLEAPP bootclass="server.BootGLO" classpathURL="file:."></GLEAPP>
   <USERMANAGER serverclass="" reconnect_key_ttl="30">
      <PARAMETER tag="host" value=""></PARAMETER>
      <PARAMETER tag="port" value="1150"></PARAMETER>
      <VALIDATOR moduleclass="">
         <PARAMETER tag="password_file_url" value="file:passwd.txt"></PARAMETER></VALIDATOR></USERMANAGER></GAMEAPP>

These two files are in the same directory.

Nothing I did with changing the classpath or bootclass changed the error.  Any help would be appreciated, as I am completely stumped.
Pages: [1]
Riven (16 views)
2015-07-03 11:22:16

deepthought (44 views)
2015-06-30 15:39:44

deepthought (48 views)
2015-06-30 15:39:09

deepthought (60 views)
2015-06-30 15:36:52

Za\'Anzabar (28 views)
2015-06-29 05:44:54

TritonDreyja (44 views)
2015-06-24 17:10:40

CopyableCougar4 (43 views)
2015-06-23 00:34:45

BurntPizza (46 views)
2015-06-21 20:36:46

cookiecompiler (88 views)
2015-06-11 15:42:53

cookiecompiler (51 views)
2015-06-11 15:41:14
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!