Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (686)
Games in Android Showcase (198)
games submitted by our members
Games in WIP (758)
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] 2 3 ... 5
1  Game Development / Performance Tuning / Re: Very slow ascii text parser on: 2006-05-03 18:17:41
For anyone interested, this topic was discussed at great length over at this thread:
2  Game Development / Networking & Multiplayer / Re: Blocking ObjectInputStream without any exception :-( on: 2005-10-13 17:44:30
Also take care where you are try {} catch{} your exception.  If you are doing it in the thread that CREATES the spun-off thread (the one that actually runs run() ) then you'll never catch the exception. Exceptions are bubbled up in the same context of the thread that is running it.  So, you could be getting an exception, just never seeing it.

3  Game Development / Performance Tuning / Re: Does try-catch significanlt influences game sp on: 2005-04-25 13:00:22
try costs effectively nothing, catch costs 100 x a normal method call

Do you think you could write something to demonstrate this figure without being classifed as a 'microbenchmark'?

4  Game Development / Performance Tuning / Re: Game "stutters" -- is this the garba on: 2005-03-30 15:35:38
And, of course, profile your app.  The latest version of Net Beans apprantly has a profiler plug in.

5  Game Development / Networking & Multiplayer / Re: Asynchronous Client-Server Communication (Prox on: 2005-03-30 15:31:50
I'm not so sure this is a bug in the spec or related to 1.1 vs 1.0 implementation of HTTP...I seem to recall reading that when you make a URLConnection to send data to the server, the process of 'writing' to the output stream doesn't mean that you have made a connection to the server, rather that you are preparing the buffer of data that will be sent to the server when the connection is established (which happens when you call getInputStream() (which internally makes the connection to the server, posts the raw data, and then reads the response byte stream).

This is just how http transactions work. I think you may be mis-using the URLConnection class to work around a infrastructure issue (ie: firewalls).  You may want to find another way.  Or re-think how you want your communication architecture.  Webservers aren't built to have a persistant connection open (let alone 2 for inputs and outputs) throughout the life of a session, so you could just be running into a wall with this thought process. What you could do is have a URLConnection that sends data to the server which then queues up requests for that client (and processes it when it's ready) and another connection to read the results of the requests, but in both cases a connection is opened, data sent, and data recieved, and then the connection is closed.  This is the way of HTTP.  But this is where persistant connections could save you the trouble of re-opening physical connections to the server transparently.

6  Game Development / Networking & Multiplayer / Re: RMI Callbacks on: 2005-02-25 17:36:37
God! It's been so loooong...but I did some searching, and found these links:

Interesting idea that is described in the thread:  Implement a SocketFactory that will force rmi callback communication over a single (client initiated) connection instead of the default way which is to use a new connection from the server.  This way the NAT can be applied properly using the connection initiated by a client.  I think if you don't go this route, there's just no way (aside from making some complicated router/firewall modifications)  that you can get what you want.

Of course, there is some problems with timeout issues and such, but i i think these can be handled.

7  Discussions / General Discussions / Re: Half-Life 2 comming next week on: 2004-11-29 18:53:46
I liked it.  Technically speaking the game looks and feels amazing.  Portions of the game feel like you're in an interactive Final Fantasy movie (no kidding).  Also, the other comments about Doom vs. Source are right on: Doom is very confined and dark, and IMO, Doom would look worse than HL2 if Doom wasn't so dark all the time.  In bright environments, HL2 looks great.

Unfortunately, I felt the story was a bit weak, you are left wondering what the Gman is up to or who he even represents. Most of the game was just fumbling through area after area without really understanding what your 'purpose' is in the game (except to get to the next area).  Even after you finish the game, you're left with a sort of 'What did I do?' sorta mentality.  They defintely just close the curtains on the show very quickly when you get to the end.  Didn't walk away with much of a 'Oooh what a story' sort of feeling.

And lastly, the game makers admit that HL1 was way too long, so although HL2 is short, it's not that short (I explored around a bit and messed around and got a solid 30 hours of gameplay in).  Compared to HL1, however, it's very short, but don't make that comparison.  It's about the same length as Doom3.

8  Game Development / Performance Tuning / Re: Alternatives for instanceof on: 2004-07-27 01:07:39

When I need to pass messages from one entity to another using MessageRouter, I need to know if im passing down to a node or an entity. If its a node, then pass the message down to all its children. If its an Entity then pass it the message.

Does the message router really need to know this? Or should there be a method  called 'receiveMessage()' on an Entity and a EntityNode such that for an Entity, the message will be handled by itself, while the EntityNode will forward the message to all of it's contained Entitys.  Seems to me that the OO aspect of implementation hiding would come very handy here.

9  Game Development / Networking & Multiplayer / Re: Downloading extra classes as required... on: 2004-07-15 11:37:25
 I believe you can specify a comma delimited list of jars in the archive tag of the applet tag.


<applet codebase="clock/classes" code="JavaClock.class" width="150" height="150" archive="jar1.jar,jar2.jar">

As long as the local applet class loader loaded the jar from the same soruce as the applet class, it should have no problems with the sandbox.  If the jars are residing on different servers, then you'll have a security problem as the sandbox only allows connections to the server from which the applet came from.

give it a shot.

10  Games Center / Archived Projects / Re: CottAGE goes LWJGL/JWS on: 2004-07-07 15:16:39
No sound tho, is that right?

11  Game Development / Networking & Multiplayer / Re: Would Jboss and EJB be usefull ? on: 2004-06-08 18:38:23
brainlounge: Good links, and underscores a good point that is possibly being missed in this thread (but also may not have been the perspective of the poster) which is: EJB can play a role in online game development outside what the gamer actually sees.    Perhpas J2EE is not the correct technology to  maintain the state of players and NPCs as they move across the universe, but what about some of the other aspects of a MMOG?  Billing is a great example: If you have EJBs to handle the 'business rules' of account creation, then it would be a very trivial matter to include a third party billing Bean that you could fold into the transaction that involves account creation.....if the BillingBean throws an exception, you can rollback the account creation performed in your AccountManagerBean. (for example).

In addition, one aspect of MMOG that EJBs would be a very good fit for would be inventory management:  How many dup bugs would be eliminated if the inventory and transaction mechanisms used was based on something with a proven track record vs. something homegrown?

Square hole with a square peg indeed.

12  Game Development / Networking & Multiplayer / Re: EmberIO on: 2004-04-29 11:05:54

No, it was posted here as a discussion about EmberIO, and is irrelivant to the previous thread which was memory issues in NIO.

I don't mind a discussion about EmberIO, but why does it start with a quote from some other thread (which you say is irrevilant to this thread?)  Just was strange to me.  Besides, there's not much to discuss here, the poster didn't even use the lib before passing judgement.

I find it more than a little disturbing the way certain 'experts' in the community will completely trash other people's work without even performing ANY evaluation of the work before making, in my opinion, pretty harsh criticism.  It's as bad as making statements about the performance of Java without providing the facts to back those statements up (unless a huge sum of money is involved...)  At the risk of getting off topic, is this really the attitude that fosters interest and knowledge building within the java gaming community?  The motto is becomming 'If you haven't used it, trash it, and if they can't prove it, evangalize it'.  Pretty sad.

13  Game Development / Networking & Multiplayer / Re: EmberIO on: 2004-04-29 10:55:09

I've not tried the lib, and the linked article is not official, so coudl be peddling BS


14  Game Development / Networking & Multiplayer / Re: EmberIO on: 2004-04-29 03:35:44
Not sure why a response to another thread was created into it's own topic here, and only to flame it to death.

Also, is it now customary to label a particular project as 'BS' before even trying it out?

And due to the flamebait nature of this post, should this post be moved to 'The Land of the Trolls'?

Just wondering if that is how it 'works' now.


15  Game Development / Networking & Multiplayer / Re: NIO Memory leak on: 2004-04-28 16:02:59
I found this article at:

Perhaps you could take a look at the EmberIO lib (it looks like a NIO wrapper) and see if it solves any of your poblems?

16  Game Development / Networking & Multiplayer / Re: URLConnection and SSL on: 2004-03-04 23:33:34
Aren't we talking about somethign separate from the JVM itself?  Namely: the certificates?  I'm not sure if you would update the jvm version if supporting resources were updated, would you?

17  Game Development / Networking & Multiplayer / Re: How do I diagram ping between servers on the N on: 2004-03-02 12:55:25
 I'm missing the part of your project description that addresses the 'G' part of MMOG (that would be, the actual Game).  When thinking about the game, what are the rules? What are the goals?  What are the obsticles?  What are the rewards?  What are the penalties?  Most importantly (since it's MM), how can these goals be accomplished, obsticles overcome, through use of teamwork? etc.

I believe thinking in terms of single player is a good start to determine what you want to 'do' within the game space, but eventually you need to add the mutli-player dimension to the mix and see how it comes together.  The project you describe has interesting technical aspects to it, but from a game perspective, it's a little hollow.

18  Game Development / Networking & Multiplayer / Re: Selector not blocking on select on: 2004-02-29 21:48:51
Ok, then if modifying the internal state of the selector is the issue, shouldn't you register the channel that was put on the queue after you call wakup()?  However, what i'm thinking now is that if you have 2 connectinos come in at the same time, you could potentially call wakeup() twice (2 new clients) before the selector thread wakes up and processes the connections in the queue...and when it does wake up, it will add two connections to the selector, and then go back to select() but since the second wakeup was issued during the second connect, that means that the selector will wakeup again, but this time there are no connections in the queue to add to the selector to modify the internal state.  (Is this an accurate description of what could happen?)  In this case, i'm not really sure what you should do except maybe as a work around you have a flag that you set that marks if wakeup was already called, and in the selector thread, you clear the flag....hmmm Well if it's fixed in 1.5 even better heh

19  Game Development / Newbie & Debugging Questions / Re: Saving player data on: 2004-02-27 13:31:13
To my knowledge, you can't.  When you use getResourceAsStream, it's going to find the data somewhere in the classpath (including JARs), and to my knowledge, there is no way to get the 'physical' location of the resource that you accessed, and I don't even know how you would represent that if the resource came from a JAR.

IIRC, there is a preferences API you can use to store the save folder and file name and maybe you could use that?

20  Game Development / Networking & Multiplayer / Re: Selector not blocking on select on: 2004-02-27 12:07:49
Ok, looking back on my connection code I wrote before with NIO, I also use non-blocking sockets.  so.....nevermind. Smiley

I would like to add, however, that the way I have my server set up, I have one thread waiting for connections and when connections are accepted the new channel is put on a queue that the 'Client input' thread will read from when it is woken up, and I was not seeing the behavior you described.  The server started the 'Accept Listener' thread, and the client processor thread, and the client processor thread would select on a channel with zero channels registered with it, and when a new client connects, the accepter thread puts the channel on the client processor thread's queue, and then calls wakeup() on the selector...this causes the client listener thead to wakeup (zero channels will be in the select list, however), check the queue for new connections, register new connections with the selector, and then process the ready channels (still zero!).  Then, the loop goes back again and the select will block until there is client activity (or another client connects causing the wakeup() to be called).  I've never ran across the behavior you described, maybe I should post some code to compare notes?


21  Game Development / Networking & Multiplayer / Re: Selector not blocking on select on: 2004-02-26 23:48:06

!!! what do you see as the point of the method call configueBlocking() then, if it's not to enable non-blocking mode?

I'm saying that I don't see the point in enabling non-blocking mode on a socket when using channel selectors.  Why would you?

22  Game Development / Networking & Multiplayer / Re: Selector not blocking on select on: 2004-02-26 16:19:21
Ok, well, even if that is the case, I'm not sure if you want to set these sockets up as non-blocking because that's what the selector is for: to block only when all channels in the selector would block.  So change the line of code to this:

 //ConnectionTenant is a buffer holding object

and see if that gives you the desired result.  If it fixes the problem but what blahablhbalhahalahaha says is correct, then that's probably an issue that needs to be reported.

23  Game Development / Networking & Multiplayer / Re: How do I diagram ping between servers on the N on: 2004-02-26 13:58:42

... in practice, IPv4 has no multicast. In practice, IPv6 should have it (although I've not checked the current status of in-the-wild IPv6 nets for quite some time, so YMMV)

I wrote an applicaiton that sent information using multicast, and this was in 1994, so IPv4 indeed does have multicast even in practice.  I think that if you have control over the servers and the network that joins them (and most of the big hitters in the MMO arena do have this) multicast is definitely an option, considering you will be able to configure the routers that interconnect the servers to forward multicast packets.  In my experience with multicast, it is EXTREMELY scalable in the sense that if you need to notify 100 servers of 1k of state change, you send 1k of data, and not 100k (1 per sever).  And it remains 1k even as you move up to 1000 servers.  

It has always been my interest to implement a 'distributed simulator' that scaled well to multiple clients, but I'll keep these ideas  to myself because I don't think I could handle blahbhalbhalbhaa's cynicism on it. heh.


Multicast reduces the bandwidt hrequriemenst on the wire, but the wire usually isnt your bottelneck.  It doiesnt reduce your load on your machines handling the traffic theyr evieve, in fact it increases it over point to point communication.

I don't agree with this assessment, but I didn't work at TEN.


24  Game Development / Networking & Multiplayer / Re: Selector not blocking on select on: 2004-02-26 13:25:49
Question: if you put non-blocking channels in a selector, will they automatically appear 'ready' when you do a select?  I thought the point of selectors was you register blocking channels and when one of them 'unblocks' it will notify the selector?  Or something like that...

I'm referring to this block of code:
 //Executed for all new connections  
//ConnectionTenant is a buffer holding object
ConnectionTenant ct = new ConnectionTenant(this);  
SelectionKey sk = sc.register(selector, SelectionKey.OP_READ, ct);  

25  Game Development / Networking & Multiplayer / Re: How do I diagram ping between servers on the N on: 2004-02-23 16:55:20
Yes, I came to the same conclusions as blahblahhahbabhah about the article:  JC seems to be talking more about a ad hoc mesh network where, based on network latencies, the servers will arrange themselves.  But, if he's trying to recreate what they have done in second life,   it's not going to happen:  You'll end up in situations where there's supposed to be a server to the east but that server has already been claimed as some other server's north!  It's complicated.  Plus, if this post is related to the 'Replication of Server Sate' post, you'll notice that in the Second Life schema, no state is being replicated across servers (except perhaps for 'fringe' events that need to be seen across server boundaries, but that only ever impacts up to 4 servers.

26  Game Development / Networking & Multiplayer / Re: How do I diagram ping between servers on the N on: 2004-02-23 13:49:09
Ok, last follow up.  I did some searching on ICMP (needed to do full-fledged pings), and as of a 4/2003 post, there was no ability in java to do this, outside of using JNI.  So, your options are as follows:

1: Take a look at  to see if a Win32-only native lib will work for you.

2: Write your own JNI lib that will get at the proper native calls.

3: Parse the output of Ping.

4: Write a program that measures the response time between sending a packet to an echo server and receiving a response.  This is very inaccurate however.

5: Wait for ICMP support in the JDK (doesn't seem to be comming any time soon).

Hope this helps.

27  Game Development / Networking & Multiplayer / Re: How do I diagram ping between servers on the N on: 2004-02-23 13:36:12
I should have looked further: yEd uses a file storage mehanism called yFiles (found on the same site).  while yEd is free, i'm not sure about yFiles.  But maybe you could try creating your graphs in yFiles format and use yEd to lay it out.  In any case, have fun!

28  Game Development / Networking & Multiplayer / Re: How do I diagram ping between servers on the N on: 2004-02-23 13:27:57
Hmm, blablabhablahba i think you are being a little hard on him.  He did say that he wanted to find the ping between servers, not the distance.  In the context of his applicaiton, servers with low pings are close, servers with large pings are far.  Hence, they can have a location relative to the source server.

As far as wat JC is looking for:  I thought they introduced the ability in jdk 1.4 (maybe even 1.3) that allow you to do more low level networking calls (I think one such thing was ICMP??  Not sure about that it's foggy but I thought it was used in programs such as PING to measure latency).  You'll have to look into that.  However, I think the best you will be able to do is find the locations of the other hosts relative to the host that is actually measuring the latency.  In other words:  if you do a traceroute, you are getting the latency from your machine to each machine in the route (not the latency between each machine in the chain).  I could be wrong, but i'm almost positive about this.  So, that means that each host would have to run your program to measure it's latency betwen each other host in the graph and report that information back to a central host that can then diagram the locations based on the data from each host.  Sound complicated? Yeah, sorta.  However, here's a program that is very very nice with graphing:

yEd Graph Editor (JNLP enabled! and free)

This is a very very nice tool, it will attempt to layout as cleanly as possible even the most complicated graphs.  I think the graph mode you will want to use is Smart Organic Layout.  Once you figure out the data you want to diagram, you can possibly write a file in the format that yEd can read, and you can use the yEd tool to layout the graph.

As far as the data you are going to try to diagram, Blahblahabbahahaa is right, the diagram will look very messy if you have edges going from each node to every other node in the graph.  (20 nodes will have 380 edges!)  So, perhaps you only want to capture the 'closest neighbor (or in your case, the 4 closest neighbors) and attach edges between those nodes, and then let yEd lay it out for you.

But your first problem is going to be programatically findnding the ping times between those servers.  Quick and dirty could be to exec a ping to each server and capture the output, but I was almost certain they added an API that allows you to write your own ping. Maybe google search on +ping and +java will turn something up.


29  Games Center / Archived Projects / Holy Crossposting, batman! on: 2003-11-07 15:53:19
30  Discussions / General Discussions / Re: Chrome uses Java in game engine on: 2003-10-23 13:57:52
Hey, got the demo.  Really nice!  Ran like a turd on my 16mb vid card, but at home, much much better.  Looking forward to buying it.  I wonder what capacity they used java, just scripting or the actual rendering?

Edit: eheh, ok, i can read...NOT....says above C++ is the engine but mod builders will be writing java.  Very nice.
Pages: [1] 2 3 ... 5
roseslayer (394 views)
2016-08-06 11:43:29

roseslayer (362 views)
2016-08-06 09:43:11

xTheGamerCodes (436 views)
2016-08-04 15:40:59

xTheGamerCodes (429 views)
2016-08-04 15:40:24

orrenravid (780 views)
2016-07-16 03:57:23

theagentd (855 views)
2016-07-11 14:28:54

Hydroque (953 views)
2016-07-06 05:56:57

Hydroque (981 views)
2016-07-03 08:52:54

GrandCastle (793 views)
2016-07-01 09:13:47

GrandCastle (634 views)
2016-07-01 09:09:45
Rendering resources
by Roquen
2016-08-08 05:55:21

Rendering resources
by Roquen
2016-08-08 05:52:42

Rendering resources
by Roquen
2016-08-08 05:50:38

Rendering resources
by Roquen
2016-08-08 05:49:53

Rendering resources
by Roquen
2016-08-08 05:32:39

Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42 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!