Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 / GLO advice + ~bug found in SwordWorld demo on: 2006-06-30 23:53:48
Hello,

(1) I would like some advice regarding the design of GLOs, in particular the sort of scale that one GLO should occupy (in terms of object size/responsibilities). i.e.:

If I want to represent AI players in, say a local world of 50 players (Human and AI), should I just have one GLO to represent all the AI players, or an individual GLO for each one? Should I avoid using GLOs at all for AI players?

 I am aware that this all depends on the type of application/load/users/world size etc., but just some ideas or tips more than anything would be useful.

(2) I believe I have found a 'bug' in the SwordWorld java code, though it might be deliberate or already have been fixed in newer versions: For ages I could not figure out why my simple server program (which is very similar to SwordWorld.java) was never 'remembering' players (by this I mean it never seemed to find existing GLOs for players logging on repeated time). Looking at SwordWorldBoot.java, the problem (if it is considered one) lies in the fact that when a GLO is _not_ found (the initial lookup gives == null), the ensuing operation to create it does not include the player name just used:

i.e. the line: 
            playerRef = simTask.createGLO(playerTemplate);

should be

             playerRef = simTask.createGLO(playerTemplate, playerName)

Without that, the GLO created in the absence of a searched-for GLO is 'nameless', 'never' to be found again.  Grin

Best wishes
Greg

2  Game Development / Networking & Multiplayer / ByteBuffer allocations and object members in GLOs on: 2006-06-27 23:16:37
Hello,

I have a question which I think has an obvious answer, but I will ask it anyway :-) Regarding the ByteBuffers etc. required to represent a message to be sent from server to client, say if I have a GLO which needs to send players information about other players present in the GLO (room)

* When and how should this be declared? Should I always create the buffer on the fly (e.g. with allocate), or would it be better to use an object member and therefore a reususable buffer? In the simple SwordWorld example, for instance, you do a ByteBuffer.allocate() and put() a String into the buffer, and send it, for each request. If I make it an object member (i.e. in the class definition for a GLO), won't I get problems with serialisability?

What is the right approach (or at least, what are some good guidelines?)

Greg
3  Game Development / Networking & Multiplayer / Re: Help getting remote clients to work on: 2006-06-21 16:25:28
Okay sorry but I seem to have 'fixed' the problem, sorry! I need to vary the address used depending on whether the client is LAN or WAN-side
4  Game Development / Networking & Multiplayer / Re: Help getting remote clients to work on: 2006-06-21 16:00:54
I'm am wondering if the problem is in a combination of the parameters I use for FakeDiscovery (client) and deploy.xml (server):

I have just got another client to connect via the LAN by ensuring the host field in FakeDiscovery (192.168.0.99) is used as the host field in the deploy (192.168.0.99), as opposed to 127.0.0.1. Why is this, and how can I get it to work for remote clients?

As you can tell my networking knowledge is limited at best.
5  Game Development / Networking & Multiplayer / Help getting remote clients to work on: 2006-06-21 15:26:08
Hello, I have a toy example very like the SworldWorld program 'working' - the server runs fine, and clients programs connect when both are run on the same machine. Recently I got my friend to try and connect from their machine, but the program would close seconds after starting and no user/password box would ever pop up. I thought that this would be due to firewalls or something. But:

I have disabled my firewall, and even a client on the same LAN can't connect! I know it is not a port issue since I can reach, say, a web server running on the same port I run the game server on.

Am I doing something really stupid?

Thanks for any help
Greg Scott
6  Game Development / Networking & Multiplayer / firstBoot meaning? on: 2006-06-08 15:56:08
Hello,

I've been playing with the SwordWorld demo and I would like someone to clarify when firstBoot is set to true/false and how you can force it to happen again. My understanding is:

* firstBoot is true if the server has no persistent record of the application having run (i.e. in the database), false otherwise
* By deleting persistant_store in the release/sgs-ea1 directory, you effectively wipe the memory so firstBoot will be true for the next time you start the app

But this doesn't seem to happen every time. For instance, I might delete the directory and re-run the server but firstBoot is not true.

Should I be doing something else/in addition? Could someone clear this up for me?

Greg
7  Game Development / Networking & Multiplayer / Re: Representing geography in SGS on: 2006-04-17 22:05:03
On a related note, could someone offer guidance as to a reasonable approach to maintaining consistency between players in a physical/geographical world (such as a small multiplayer game). In particular, does one

* Have a player broadcast information about their whereabouts and movements directly to all other players, bypassing the server or
* Make sure every such thing goes through the server?

Thanks for any help
Greg
8  Game Development / Networking & Multiplayer / Representing geography in SGS on: 2006-04-16 19:11:54
Hello,

I was wondering if someone from the SGS team could give some advice regarding how a physical game world could be represented within the SGS framework (i.e. in terms of GLOs etc).

I understand the tutorial well, and the idea of having GLOs representing entities (players, NPCs, etc.) but what approach should I take if I want to create, say, a mulptiplayer/RPG-type city with buildings and roads, i.e. one in which there is real space and coordinates etc. Does one try and divide it up into GLOs, or have one big GLO? Obviously I don't want to start out on the wrong foot, and I'm sure my query is a common one. I especially don't want to hard-code the design of the world into the source code, clearly, rather I'd like to have the world created on startup by, for example, parsing an XML file representation (created in a world designer program etc.)

Any suggestions, examples or pointers would be greatly appreciated. Thank you and keep up the good work.

Greg Scott
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (27 views)
2014-09-07 01:10:19

mitcheeb (35 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!