Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
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] 2 3 ... 16
1  Game Development / Newbie & Debugging Questions / Re: "fog of war" algorithm on: 2008-02-23 16:54:35
I don't know details about your application, but think about few points:

1) Do the visibility evaluation once per some time -  probably once per second is just ok. You can distribute the work per certain area over time - so instead of doing one global check, you can spread multiple subchecks during this time

2) You will probably like to also give some different kind of indication about fog of war - some kind of shading. In this case, it is not about enemy units, but terrain. Maybe think about solving this part first and you will get unit visibility for free (if it is on revealed terrain, it is visible)

3) It seems to be some kind of multiplayer game? In such case, think very seriously about doing at least basic checks on server side (area-wide at least). You can leave the edge cases for client, but by doing at least preliminary checks on server side, you will be able to save some traffic (by not sending invisible movement) and make it bit more hack-proof (compromised client can display only what you send to it)

2  Game Development / Performance Tuning / Re: minimizing garbage collection on: 2008-01-27 21:35:39
8GB Heap and 50ms GC pauses? Thats awesome! I never thought that the GC would scale so good.

Of course we use CMS, with only 48MB new generation, rest being done periodically in background by CMS.
3  Game Development / Performance Tuning / Re: minimizing garbage collection on: 2008-01-27 19:56:28
There is object pooling and object pooling. Not every case is just about saving gc, sometimes it is about saving memory. 'Pooling' immutable objects has a nice side effect that you won't end up with millions of instances of the same (same like in 'equals returning true') object in jvm. After all, java.lang.Integer.valueOf(int) implements a small pool itself, so it cannot be THAT bad, can it ? Wink

As far as claiming that gc will solve all your problems - it is not exactly true. If you generate a LOT of immediate garbage, you will invoke gc pauses more often. In every gc, some part of life objects will be copied here and there (at least before they mature enough to hit old generation) - which is costly operation. So, don't sacrifice your app logic for gc, but also don't allocate things just because they are 'free'.

I'm doing a lot of performance sensitive code these days and when you hit 8+GB heaps and cannot afford more than 50ms pauses and cannot use NewParallelGC (because it crashes 100% with our app within 4 hours), one because bit more careful about garbage allocation.
4  Game Development / Performance Tuning / Re: final modifier on: 2008-01-27 19:44:05
SimonH - never, ever do benchmarking on single execution of the method. Run same code multiple times and start looking at results only after 10 seconds or more.

As far as final is concerned, there is one major difference for the statics. Javac will inline final statics, while non-final statics will have to be loaded from memory each time.

In below code, in static final case, javac is smart enough to optimize if/throw part completely. I have no idea why, but under server compiler, non-final static version is considerably faster, even with it's load and extra check... On the other hand, on client compiler, static final is almost twice faster before warmup and same speed after some time. It seems that in both cases, final compilation is making static final case a lot worse - could be interesting to see why.

So, there is for sure difference, in pathological cases it might be noticeable difference, but I would not bet on which version is faster - it probably all depends on code alignment in particular method or something similarly obscure.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
public class Test {

   final static int FLOOP = 1000000000;
   static int SLOOP = FLOOP;
   
   
   public static void main(String[] args) {
      for ( int i =0; i < 10; i++ ) {
         long start = System.currentTimeMillis();
         double d = testStatic();
         if ( d > 0 ) {
            System.out.println("Static " + (System.currentTimeMillis()-start));
         }
         start = System.currentTimeMillis();
         double f = testFinalStatic();
         if ( f > 0 ) {
            System.out.println("Static final " + (System.currentTimeMillis()-start));
         }
      }
   }
   
   
   public static double testStatic() {
      double val = 0;
      for ( int i =0; i < SLOOP; i++ ) {
         val += i;
         if ( SLOOP > SLOOP+SLOOP) {
            throw new IllegalStateException();
         }
      }
      return val;
   }
   
   public static double testFinalStatic() {
      double val = 0;
      for ( int i =0; i < FLOOP; i++ ) {
         val += i;
         if ( FLOOP > FLOOP + FLOOP) {
            throw new IllegalStateException();
         }
      }
      return val;
   }
   
}




and disassembly to show that at least in bytecode, static final case should be a lot faster:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
public static double testStatic()
    {
        double val = 0.0D;
    //    0    0:dconst_0        
   //    1    1:dstore_0        
       for(int i = 0; i < SLOOP; i++)
    //*   2    2:iconst_0        
   //*   3    3:istore_2        
   //*   4    4:goto            36
       {
            val += i;
    //    5    7:dload_0        
   //    6    8:iload_2        
   //    7    9:i2d            
   //    8   10:dadd            
   //    9   11:dstore_0        
           if(SLOOP > SLOOP + SLOOP)
    //*  10   12:getstatic       #13  <Field int SLOOP>
   //*  11   15:getstatic       #13  <Field int SLOOP>
   //*  12   18:getstatic       #13  <Field int SLOOP>
   //*  13   21:iadd            
   //*  14   22:icmple          33
               throw new IllegalStateException();
    //   15   25:new             #72  <Class IllegalStateException>
   //   16   28:dup            
   //   17   29:invokespecial   #74  <Method void IllegalStateException()>
   //   18   32:athrow          
       }

    //   19   33:iinc            2  1
   //   20   36:iload_2        
   //   21   37:getstatic       #13  <Field int SLOOP>
   //   22   40:icmplt          7
       return val;
    //   23   43:dload_0        
   //   24   44:dreturn        
   }

    public static double testFinalStatic()
    {
        double val = 0.0D;
    //    0    0:dconst_0        
   //    1    1:dstore_0        
       for(int i = 0; i < 0x3b9aca00; i++)
    //*   2    2:iconst_0        
   //*   3    3:istore_2        
   //*   4    4:goto            15
           val += i;
    //    5    7:dload_0        
   //    6    8:iload_2        
   //    7    9:i2d            
   //    8   10:dadd            
   //    9   11:dstore_0        

    //   10   12:iinc            2  1
   //   11   15:iload_2        
   //   12   16:ldc1            #8   <Int 0x3b9aca00>
   //   13   18:icmplt          7
       return val;
    //   14   21:dload_0        
   //   15   22:dreturn        
   }

5  Discussions / Jobs and Resumes / Java/C++ developer for investment banking on: 2006-09-27 23:03:14
Long time till I have last posted on javagaming, but I'm still reading it often...

First, some informal introduction, to get your attention:

I'm working for a development team responsible for investment banking area for one of the biggest Germany banks. We are looking for few very smart people to help us with new project, which will be completly cutting edge in that area - and while I'm not allowed to disclose more details in public, requirements will be quite similar to very optimized game server code Wink We are using normal recruitment channels to look for the people, but I thought that maybe trying on javagaming makes more sense - I know quite a lot people here I would really like to see in our team...

Good and bad:
- we are really pushing java to the edge, using custom heavily multithreaded framework - you will get to know more about java 5 memory model then you want to...
- you need to move to Germany (Frankfurt am Main) for a longer period of time (at least 1 year, preferably more)
- commonly used language is English (kind of English, nobody so far is a native speaker), team is quite international,  no knowledge of German is required
- money is good as for the Germany, but not over-the-top like in some other investment banking offers - main attraction here is a project, not the salary
- no experience with financial/investment world is required; it is quite good opportunity to bootstrap yourself into that area
- there might be some work involving support of legacy software; we need to keep the business happy while we are developing the BIG THING

Sorry for being bit scarce on details - if you have any questions, please contact me in private, I'll be able to tell a bit more. Please send your CV to abies at adres dot pl - no cover letter required if you are one of the 'big names' on  java-gaming.org...

Below I'm attaching our 'official' job profile, which is not yet specialized for a new project (just generic ad we post sometimes to get a person for our team). This can give you a general idea of our 'legacy' applications scope.



We are looking for a new person for our Global Trading & Pricing team. We are
responsible for all pricing and contribution of derivatives finance products
and for all the trading applications used by the Equity Derivatives business
line. Applications are developed in C++, Java on Solaris server with use of a
Sybase database.

Knowledge of german is not required -common language in both development and
trading teams is english.

Absolute requirements:

- very good knowledge of either C++ or Java (both preferred, but not required)
- intermediate knowledge of SQL
- basic knowledge of unix environment
- being able to communicate in English within working environment
- willingness to move to Frankfurt for a long period of time (at least one year)
- IT-related education
- being able to work as a part of the team

Knowledge about the following would be beneficial:
- Unix scripting languages (tcl, perl)
- ClearCase
- Sybase
- Solaris
- Swing
- real-time systems
- Reuters
- multithreading/concurrency
- option pricing

We offer a good salary according to European standards, a nice working
environment, being able to work with cutting edge banking/trading technologies
and a good social package. You will be able to extend your skills by working
on challenging projects and by taking part in trainings both inside and
outside of bank.
6  Game Development / Networking & Multiplayer / Re: GLO advice + ~bug found in SwordWorld demo on: 2006-07-01 16:13:21
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?

Think about having to serialize/deserialize all of the every time you want to access even one property on single of them...

I think that you should have certainly at least one GLO per NPC. Depending on how your game is structured, I would even consider splitting inventory/dropped items/shop data/whatever in separate GLOs.

I would start with having everybody and their dogs as separate GLOs and merge them only if it proves to be a performance problem at some point because of mutliple gets (or/and if you will observe patterns that some GLOs are always accessed/modified together with another ones).
7  Game Development / Networking & Multiplayer / Re: Global time resp. timesteps on: 2006-06-07 18:31:49
I would not count on having VERY precise synchronized time. Some general level of synchronization, sure, but a guarantee that one server will see the later time then the server which have just comitted the transaction... I don't think so. In truly distributed systems such things are solved by logical clocks.

Now, said that, we may think about requesting some kind of Lamport/vector clock in SGS provided on low level. What would you use it for ?
8  Game Development / Networking & Multiplayer / Re: Is there any eclipse plugin for Darkstar game server development? on: 2006-06-06 15:10:58
Have you tried putting all your application code inside a classpath of SGS server (unpacked) and doing only startup class inside actual game jar ? This way you should be probably able to run SGS in debug mode from eclipse and be able to use hotswap to change your application classes on the fly, as they would be in main jvm classloader. I know it is not a setup for real deployment, but still should be a lot faster than even explicit support for redeployment/restart of entire application jar - plus you can do some changes even on the fly with running data.
9  Game Development / Networking & Multiplayer / Re: Tasks are assumed to be short-lived - how short? on: 2006-06-05 11:35:59
SGS has a lot of similarities to J2EE. If MVM will ever reach J2EE, I don't think it will be any problem to adapt it to other container-based technologies.
10  Game Development / Networking & Multiplayer / Re: Scattered storage model? on: 2006-06-02 09:57:05
HADB has no other use than serving as a highly accessible database system ... but SGS is just using it like a very expensive hashtable.

Very expensive hashtable with transactional behaviour. 'transactional' is quite a major point I suppose.
11  Game Development / Networking & Multiplayer / Re: getting the swordworld demo to run on: 2006-06-01 21:07:59
Well, it is enough to put
private static final long serialVersionUID = -1555555559452131670L;
somewhere in your code.

Of course, you need to know exactly what kind of class modifications you are allowed to do without breaking data completly.

To be honest, if I'm using serialization, I'm just always putting serialVersionUID = 1; in class and stop caring about it. If I would ever need to make uncompatible change, I would change it to 2 etc - but you almost never want to make incompatible change if persisting something in serialized state, so you end up with explicit versioning or other ugly tricks. Look for example at DecimalFormat.readObject in JDK 6...
12  Game Development / Networking & Multiplayer / Re: Scattered storage model? on: 2006-05-29 19:53:55
So, more or less, you are suggesting using GLOs for some of game objects, while leaving market to be totally outside of space managed by SGS ? How do you plan to do transactions then, like:

Get market offer
Get player GLO
Check money and deduct from player if needed
Put item into player inventory
Remove market offer

Imagine that after doing a commit on market database, SGS decides that your task is running too long and kills it, not committing transaction on player GLO. I don't think that you are allowed to do any kind of operation modifying any kind of state inside jvm or outside of it from inside a SGS task and still be safe from reexecution perspective.

All this starts to smell very EJB to me, two phase commits, container managing transactions for all the data sources, etc, etc. And we all know where EJB is as far as performance is concerned...
13  Game Development / Networking & Multiplayer / Re: roadmap? on: 2006-05-28 14:40:36
But that is one of the downsides of WoW - players are hindered to play together if they dont know each other before joining a server. Is there a reason why you want your game to be sharded into meaningless worlds where those things you do never ever have any real meaning to the majority of people, instead of providing a meaningful big one-world-solution for all players like EVE did it on their 70-server-cluster?

As far as I know, technology part is smaller part of equation with shard concept. Bigger part is content - putting 2 million players into 6-city world means crowded streets... Some games try to work around that by using multi-instance cities (guildwars for example) and instanced quests/areas. But in such case, you can as well go with full blown sharded design, just allow people to jump between shards.

EVE is unique not because it can handle 25k players at once in one shard, but because it has world large enough to host these players and provide some meaningful activities. But even CCP has created separate set of servers for Chinese market - again, because of design/cultural reasons, not so much because of technology limitations.

BTW, as far as chat is concerned, I don't see a reason why chat should have anything to do with SGS. Having specialized chat server(s) is probably a better way to solve it for big scale world.
14  Game Development / Networking & Multiplayer / Re: Scattered storage model? on: 2006-05-28 14:28:50
I think that serialization is generally not a best idea for long term persistent storage. It becomes a LOT of pain after year or two, when half of code inside your objects is written to handle all the possible combinations of old data.

In one project I have worked for where we have used serialization for most data, we had string query field in addition to blob with serialized data in every row (in addition to timestamp, modified_by and version fields). It is overly complicated design done just to have same structure of table for every object out there, but something similar could be used here - in addition to object id and serialized blob, there can be any number of extra columns duplicating some of the data from object. You could then decide what aspects of given object you want to use for sql queries, with all the rest, less important data being hidden inside blob.

In market example, stuff like location, price, object type, quantity, owner, expiration date could be exposed, with detailed description, object itself, vendor percentages etc being hidden inside serialized data only. If at some point more data is required, it would be one time offline extension of database by a column and going through all serialized objects, rewriting them to database.

Anyway, I think that at some point, for most serious projects you will end up with using just normal sql storage, with explicit store/load code (maybe using some mapping tools) and dropping serialization completly, except maybe some intra-server communication if needed. SGS does not support it at the moment, but I don't think it should be too hard.

Another possibility would be to use some kind of fully object-oriented database and creating some kind of EJBQL... I mean SGSQL... but I'm afraid this would be outside of scope of this project.
15  Java Game APIs & Engines / Java 3D / Re: Sphere approximation with subdivisions of icosahedron on: 2006-05-28 08:29:55
Thanks a lot - I was looking for a code like that.

Since my last post I have realized that putting a texture on top of such sphere will not be an easy undertaking, but maybe it can be solved easily with pixel shader, skipping interpolation on vertex level completly.
16  Java Game APIs & Engines / Java 3D / Sphere approximation with subdivisions of icosahedron on: 2006-05-27 22:38:37
Standard way of rendering sphere is by divinding into triangles at regular angles - which gives very different sizes of triangles near the poles and 'equator'. Probably a lot better way would be to start from icosahedron (which is very sphere-like given it is composed from 20 triangles only) and then subdivide the triangles for better level of detail. Does anybody know about ready to use algorithm for it ? It doesn't have to be java3d specific, just something outputting the triangle coordinates. Even coordinates for basic icosahedron would be nice Smiley

If not, I'm considering writing one. One question which comes to my head - if I would like to approximate the sphere of radius 1, should the vertices of icosahedron be at distance one from center (and stay there when more and more vertices are added with better level of detail) or should they be moved a bit further for basic LOD and get closer and closer to sphere radius with each detail step (which would mean that volume of the solid would be always the same) ?
17  Game Development / Networking & Multiplayer / Re: So, who is building a game using PD? on: 2006-05-08 21:08:39
Heh....i was so close to convincing my boss to build our game using this tech.....but i guess it is 1.5 and our proj requirement is 1.4...Sad

I suppose you can easily build client with 1.4 if needed (and I doubt that you truly have to limit to 1.4 only on the server side).

I would be more concerned with investing into first alpha release technology than 1.5 requirement...
18  Game Development / Networking & Multiplayer / Re: Is there any eclipse plugin for Darkstar game server development? on: 2006-05-07 08:44:01
I suppose that having a nice deployment mechanism would be a first step (but this requires some help from Darkstar side).
Next possible tool would be something showing relations between GLOs (kind of class UML diagram, but not based on the classes and pointer reference, but on GLOs and GLOReference).
Performance monitoring tool is also a possibility - with some kind of log/graphs showing number of read/write locked retrievals of GLO per second plus having a full trace of it.

Nothing critical, but it looks like a nice hobby project for somebody, given a bit of support from Darkstar team.
19  Game Development / Performance Tuning / Re: GC Lag Question on: 2006-05-06 10:34:22
Im not sure I follow this, if your moving the object in a time-based rather then frame based motion unless the variation is *very* large I wouldnt imagine it would be noticeable.  After all, flicer rate for the human eye is only about 50hz as I recall.

Yes, but 3 missed frames means same image displayed for 40ms (25Hz). if you have full screen moving (like turning around in FPS game) this will be extremly noticeable.
I think that LagTest posted below is quite nice test.

Quote
Quote
That said, we are running in 10 second pauses on 8 cpu machine with concurrent gc....
Wow.  I find that amazing.  How big is your long-lived heap?  If you make you long lived heap huge it means fewer but bigger pauses collecting it.
 

Around 1GB of used old heap (from 2.5GB of Xmx). We are running CMS in incremental mode, so it is running by itself every 5-10 minutes - without that, if it was running every 1 hour or so when memory was closing to a limit, we were running into minute long pauses.
20  Game Development / Performance Tuning / Re: GC Lag Question on: 2006-05-05 17:43:43
10 second pauses during rescan phase of old generation (one of the few blocking phases of CMS). New generation pauses are generally around 100ms.
We have 16GB RAM, with many processes running, but we always have around 3GB free physical RAM on top of all them.

Few explanations why it can take so long:
We are running on 8x1200MHz Sparc. Every of these CPUs is probably a lot slower than current x86 based CPUs, especially if you take memory access into account.
We have to disable parallelism in rescan phase, as using parallel GC together with CMS is resulting in jvm crash in few hours for us (both on windows and on solaris). We are using 5.0_06, I have reported this problem to Sun, unfortunately they are not able to solve it without small, easily reproductible case.

Unfortunately, there is almost no relation between number of dirty cards during rescan and duration of pause. We sometimes get under-1s CMS pause with 30k dirty pages, and 10s pauses with 9k dirty pages.

I hope that this problem is caused by http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6367204, which is supposed to be fix in 5.0_07. Anyway, currently we are not even close to being realtime on 8 CPU machine with a lot of free memory and 20% total load on average.
21  Game Development / Performance Tuning / Re: GC Lag Question on: 2006-05-05 13:56:06
Noticing 0.5ms, and a 1.0ms delay would be very noticable?

Do you realize that even 10ms result in 100fps. Even if that would cause a frame-miss, you'd still be rendering at 50fps.

My only worries are about 50+ ms GCs, only those will decrease perceived performance in a game.

Well, 1ms is certainly not important, but 50ms is probably way too obvious. Problem is not running at constant 50fps - this is probably good enough. Problem is with running at 100fps and suddenly missing 2-3 frames in row and then again running with full speed for some seconds. You can easily spot such stutter, because of the sudden change in behaviour. I would even risk saying than having 20fps constant is a lot better than having 100fps with 20-50ms breaks once per second. Of course, gc is not only thing which can cause some delays - in many games, loading the textures to GPU for a new objects can also cause stuttering, even for a longer period of time.

That said, we are running in 10 second pauses on 8 cpu machine with concurrent gc.... and we are allocating modest 2-3MB of memory per second, most of it never leaving the eden space (less than 1MB promoted to old generation every 10 seconds) with total heap size of 1-1.5GB. Fortunately it is not an interactive game...
22  Game Development / Performance Tuning / Re: Very slow ascii text parser on: 2006-05-02 18:19:40
Using regexp for any kind of parsing is asking for a major issues, performance-wise.

For ply files, even string tokenizer is enough to parse simple cases. Below there is some code I have written a long time ago (It works with only specific format, I think that there are at least 2 or 3 variations, doing a full loader is a bit more complicated).

For something with acceptable performance and fast to develop, use javacc. For really high performance, you will need to write everything by yourself from the scratch. (I have used javacc to load nwn ascii files, then rewritten it by hand and got a 3 times improvement in speed...).

Here you can check out my handcrafted parser for nwn files
http://cvs.sourceforge.net/viewcvs.py/nwn-j3d/nwn/src/net/sf/nwn/loader/ManualParser.java?rev=1.16&view=markup

and below is some crappy code for ply parsing I have found in my archives


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
        BufferedReader br = new BufferedReader(new FileReader(filename));
       
        StreamTokenizer st = new StreamTokenizer(br);
        st.resetSyntax();
        st.eolIsSignificant(false);
        st.wordChars(0,255);
        st.whitespaceChars(' ', ' ');
        st.whitespaceChars('\n','\n');
        st.whitespaceChars('\r','\r');
        st.whitespaceChars('\t','\t');
        String str;
        float[] vertices = null;
        int[] faces = null;
       
        while ( true ) {
            int token = st.nextToken();
            if ( token == StreamTokenizer.TT_EOF )
                break;
            if ( token != StreamTokenizer.TT_WORD)
                continue;
           
            if ( st.sval.equalsIgnoreCase("element")) {
                st.nextToken();
                if ( st.sval.equalsIgnoreCase("vertex") ) {
                    st.nextToken();
                    vertices = new float[3*Integer.parseInt(st.sval)];
                } else if (st.sval.equalsIgnoreCase("face")) {
                    st.nextToken();
                    faces = new int[3*Integer.parseInt(st.sval)];
                }
            } else if (st.sval.equalsIgnoreCase("end_header") ){
                break;
            }  
        }
       
       
        for ( int i =0; i < vertices.length; i+=3) {
            st.nextToken();
            vertices[i] = Float.parseFloat(st.sval);
            st.nextToken();
            vertices[i+1] = Float.parseFloat(st.sval);
            st.nextToken();
            vertices[i+2] = Float.parseFloat(st.sval);
            st.nextToken();
            st.nextToken();
           
        }
       
        for ( int i =0; i < faces.length; i+=3 ) {
            st.nextToken();
            st.nextToken();
            faces[i] = Integer.parseInt(st.sval);
            st.nextToken();
            faces[i+1] = Integer.parseInt(st.sval);
            st.nextToken();
            faces[i+2] = Integer.parseInt(st.sval);
        }
23  Discussions / General Discussions / Re: Math.abs() discussion on: 2006-04-30 10:59:46
Could be a lie though because the profiling might prevent the VM optimizations for Math.abs()...

I'm 95% sure that this is the case. I have seen getters/setters to be reported by profilers as a bottlenecks, while in real run, they were perfectly inlined. I'll doublecheck that, but I think that Math.abs should be intrinsic (sp?) and do not invoke any method call at all during normal run.

Edit:
I have doublechecked in mustang code and abs is generated inline - as one single fabs opcode under i486. I'm afraid that any profiling reporting it as a method call is not really right...
24  Game Development / Performance Tuning / Tiered compilation on: 2006-04-24 18:04:03
"Use C1 as fast compiler in a tiered system with C2"
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6272349

Do I see the light at the end of the tunnel ?

Do you know if it will be enabled for all the platforms before final release of 1.6 ?
25  Game Development / Networking & Multiplayer / Re: Peristence layer on: 2006-04-18 20:34:08
Okay, I suspect for most of this then round-trip extenalization is probably adaquate.  (Pusha  button to dump tables, push another button to suck tables back in.)

It would be great to have it done through some public interface. Something like getting a all-the-objects-in-the-world iterator (per data type probably) and leaving the messy details for the implementor. Other way could be more tricky...
And of course, reference implementation would be handy Wink
26  Game Development / Networking & Multiplayer / Re: Peristence layer on: 2006-04-17 21:59:54
My main fear is maintainability. At some point in future, you may want to do some serious changes in the way data is structured - possibly even changing the relationships/class hierarchy etc. With relational backend, you are already separated a bit (because of explicit mapping to OO structures), but, what is most important, you can as well write some migration procedures for data. With serialization, it can be a major pain.

I have used serialization for long term storage in the commercial project and while it has speed up the development probably twofold (and allowed us to finish the project in required time with given resources) we started to be hit by it in major way already few months after going into production. We ended up with classes which had like 3 alternative slots for the same data, expecting nulls in every possible place even if it was set to reasonable value in every possible constructor, etc, etc. All this within 1 year after going to production, I'm worried what tricks they have to do currently to maintain it... As a side note, we had a major problems with customer data security department - after project was put to production, they have requested they should be able to read every single value in their SQL tools...

For data mining, I'm not really thinking about anything in particular - I have never run MMORPG, but I know that with old time mud, I used to grep through player files for amount of gold/level  Smiley I suppose that any reasonable MMORPG has to run a lot of statistics to get the feedback for balancing process - class/race distribution, amount of quests done per day, wealth levels for players, most often equipped items, etc. While some of the events can be probably logged separately to dedicated file/database, persistent data like equipment and players have to be queried from live data.
27  Game Development / Networking & Multiplayer / Peristence layer on: 2006-04-17 18:13:33
I'm still quite new to Darkstar concept, so forgive me if I'm asking some obvious questions.

Is persistence layer pluggable ? Is there any other option than using serialization for long term storage of objects ?

From what I can understand atm, it seems that all objects are just serialized to opaque database table, using default java serialization. This strikes me as very dangerous for long term maintainability of data. Also, ability to query large amounts of objects seems to be very limited (outside of deserializing them one by one and checking their contents by java code).

Is there a way to replace serialization with custom routines marshalling data from/to normal relational tables ?
28  Game Development / Newbie & Debugging Questions / Re: Looking for JDK 1.5.0_05 on: 2005-12-01 18:09:34
Newest version is 1.5.0_06. You can download it, only problem is that Release notes were not updated (they are still for _05). As a workaround, you can check out http://java.sun.com/j2se/1.5.0/ja/ReleaseNotes.html for updated release notes (no, I don't know japanese, but links are clickable).
29  Game Development / Performance Tuning / Re: Vectorization-Optimization RFE accepted on: 2005-11-07 21:07:34
I suppose that such work could be done somewhere on driver level - emulating some not GPU-accelerated vertex shaders on cpu. Vertex/pixel programs are wonderful target for any kind of vector optimalizations. Additionally, you don't have to care about exact floating point semantics - there are very loose on GPUs anyway.

Anyway, current movement is rather oposite - how to move some non graphic related computations from CPU to GPU. You can get 1 or 2 orders of magnitude improvement with that, as opposed to 2-3 times max for using vector CPU instructions.
30  Java Game APIs & Engines / JOGL Development / Re: Lowering garbage creation - Update with JSR-231 on: 2005-11-03 21:29:28
Feel free to file a bug about this. In practice however I don't think this allocation of garbage will have any measurable impact on performance.

Unfortunately this is allocateDirect, which means a bit more complication for gc (phantom reference, delayed collection, etc), plus two extra trips to native code. I think that correctly misdesigned microbenchark will be able to measure some difference in speed Smiley
Pages: [1] 2 3 ... 16
 

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

The first screenshot will be displayed as a thumbnail.

BurntPizza (14 views)
2014-09-19 03:14:18

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

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

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

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

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

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

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

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

Longarmx (36 views)
2014-09-07 01:10:19
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!