Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - 9kaywun

Pages: [1] 2
1
Support / Re: 110-160mb mem usage??
« on: October 24, 2012, 11:09:25 am »
Alrighty. Thanks ;)

2
Support / Re: 110-160mb mem usage??
« on: October 24, 2012, 10:18:33 am »

Pic^

Compression not necessary as I am using MD2 format models, stripping makes the entities not visible, and max polys visible is only 9000 at the moment.

When I force a garbage collection using VisualVM, memory drops to 80-90mb.. Then climbs at bounces around at 120-140mb.

Also, out of curiosity I tried this.. and if I stick Runtime.getRuntime().gc() into my fps check (called every 1000ms) it stays between 79-90mb.. I never call a gc request in a cycle, but in this case it seems to help dramatically.

Thoughts?

3
Support / 110-160mb mem usage??
« on: October 24, 2012, 02:19:05 am »
I've been working on a multiplayer game using jPCT for quite some time now.. and it's been a very long work in progress. Lately I've done a full client/protocol optimization because I have an ETA set in December to publish it on my website. This is the most time consuming and long term application I have probably developed, and no code should be considered unstable or not efficient.

To the point here.. I am not sure why, but I cannot get memory usage to a satisfying level. Are there any common jPCT high memory solution techniques? So far my game consists of a plane, 5 animated npcs, a local player, and a 2nd user connected for most testing, and even when it's only the local player I have this issue.

Another note: Frames per second is between 55-60 usually, but memory is still way up there..

Edit: I ran VisualVM and apparently 117mb of memory is being used by int[] (has to be jPCT, maybe I am not doing something as intended, ie: vector usage?)

Edit 2: Even the login state (no world/object3d instances, just 2 and 4 lines of text) has the same issue with memory usage.

4
Support / multiple jpct worlds
« on: October 21, 2012, 02:42:19 am »
Is there a performance difference between sharing a single world using an abstract design, or just simply creating a new world in each application state?

Edit: The application I am developing, if I removed the abstraction, would have 3 world instances: 1 for login state, 1 for game state, and 1 for the skybox (in the game state).

5
Support / y rotation
« on: October 15, 2012, 11:08:54 pm »
Tryin to setup a 12 directional movement system in a game I've been developing..

When I walk around in the game, let's say I am going east.. my character rotates in a circle the entire time instead of JUST face east.. I've read the javadocs for Object3D and I'm still very lost as to how I can do this properly.. I need a way to either reset rotation before each directional face update, or something because it increments the new rotation request into the old one, and over rotates..

Here's a snippet:

      switch (direction) {
      case 2: // north west
         rotateY(-45f);
         rotateMesh();
         translate(new SimpleVector(-3.2, 0, +5.55));
         break;

6
Support / Re: Soft Shadows with ShadowHelper or another framebuffer
« on: October 11, 2012, 11:32:13 pm »
Not trying to grave dig old threads.......  :-\

@EgonOlsen, is there a difference between the current jPCT ShadowHelper and the one you shared open source on this thread? If not I'd like to use it because I recently started implementing shadow effects into my MMO client, and I am trying to get the smoothest possible effect just as OP was doing

7
Support / Re: Object Merging
« on: October 10, 2012, 07:41:44 pm »
Just omit that call. For complex objects, it runs really long for almost no gain on current hardware. If you are compiled object, it's pointless anyway.
What do you mean with "only supports 100 Object3D instances"? There's no limit...what happens if you use more than that?

About the GL thing, thanks. As for the 100 Object3D thing, I'm going to have to re-design my region system today and get back to, because the tile coordination array is > 65K values, so I can't test over 100 tiles until I optimize some of the core functions.

EDIT Yeah, it was my old tile system that was causing the problem..... No issues anymore.

8
Feedback / Re: Snippets / Example Board?
« on: October 10, 2012, 07:24:13 pm »
That's what the wiki is for. It has a code snippets section on the main page. If you want to contribute, i can create an account for you.

Not sure HOW active I will be, but I would be more than glad to share some snippets/resources people might find useful when starting out w jPCT :)

9
Support / Object Merging
« on: October 10, 2012, 10:20:46 am »
Is there a specific reason jPCT only supports 100 Object3D instances being merged into a single object? Was experimenting with a "region system" and realized I couldn't merge more than 100 "tiles" together.

Also, just noticed if I try to use this:

      // region.createTriangleStrips(); // Good for OpenGL performance
It seems my region instance gets stuck before being created, as soon as the above code is called, and my client just stops at that.

10
Feedback / Snippets / Example Board?
« on: October 10, 2012, 09:36:40 am »
I noticed the support board has many duplicate/very similar threads.. So why not add a snippet board?
It would most likely encourage more developers to jump onto the jPCT wagon due to a wider array of reference/example function usage and help them catch on quicker.
I've used the lib since April now, and have struggled with some things due to lack of experience/understanding for the first few months myself.
I have created a few general systems in my client that I'm willing to share, that I think people would find helpful, but there's no board I think it's worth posting in because if it goes in support it will be bumped away...

11
Support / Re: tile system?
« on: October 08, 2012, 11:33:35 pm »
The merging doesn't care about rotations and translation until you make them permanent. Try to add tiles[y].rotateMesh() and tiles[y].translateMesh() in your loop to make them permanent.

That did flatten the tiles in the world space. Now I just have to position them properly on my end of the code.. Thanks, such hasty support is very much appreciated ;)

12
Support / Re: tile system?
« on: October 08, 2012, 11:25:11 pm »
The easiest thing might be to take your already existing tiles and merge into one large object by using Object3D.mergeAll(..). You can't modify them individually after that, of course...

Rebuild my region constructor.. Having a problem with the region looking like it did before. Not sure what I did wrong though?
Here is a picture to show the issue. Left side is a test app, sharing the renderer with the Game app (right) and using the old/new region systems.
(Image was too wide to use img tags, so here is the url)
http://i.troll.ws/3a10358e.png

and here's the code.. Maybe I am translating tiles wrong??
Code: [Select]
- removed

13
Support / Re: tile system?
« on: October 08, 2012, 09:52:57 pm »
Realized that creating so many Object3D instances (1 per tile) is not very efficient... Is there another way I can go about rendering this? Such as rendering a plane, and mapping a specific texture to each "tile" in the x/y loop?

14
Support / Re: tile system?
« on: August 15, 2012, 08:47:16 pm »
You can just read through the map file and for each entry create a tile in the appropriate location.  For example you can decide to have the first tile at 0,0(with arbitrary z value) then when you read the next tile you can place it at like 50,0 then 100,0 and make them have a width of 50. At some point then you also want to make the rows start going down so then you reset the x to 0 and increment the y and then continue incrementing the x again.

Much appreciated, Disastorm!

15
Support / Re: tile system?
« on: August 15, 2012, 07:38:27 am »
e3d, are you asking how to make a 96X96 tile board with each tile represented by a plane with a custom texture based on a map file?

Yes. Exactly.

Pages: [1] 2