Forums › English Language Forums › Technical › Technical Issues

Search

Endian issues loading a map?

7 replies [Last post]
Wed, 11/03/2010 - 12:32
BehindCurtai
Legacy Username

Last night I took my character down to Moorcroft Manor, with two other people.

The dungeon was almost all clockwork passages. I consistently noticed that by the time I had a screen up, the entire first area (around the elevator; varied from level to level) had already been cleared out.

I've got long loading times. Up til now, I hadn't given it any thought. I know I've got a "barely capable" graphics card, but this is more than just that.

Recently, I had a developer for UfoAI VNC into my system to try to diagnose a graphic problem. His response to seeing how long it took to load a level in that game cannot be aired without a bleep. Apparently, on intel systems it loads a level almost instantly, and on two different G4 systems (1.42), with two different graphic cards, it is very slow. (And my graphic cards are not underpowered for that game on it's low setting.)

So, I wanted to find out how long the game levels are supposed to take to load, and see if intel/motorolla endian is a problem.

Starting in Moorcroft, and using the "stubby" dungeon (only goes half way to emberlight), just going back and forth from the arcade to the party lobby and back, I took some timings. I made sure I was using "create party", "solo"; Time machine was disabled. No browsers or other large programs running. MDS had its cache flushed. System always had free memory (never went into swapping).

The first run into the lobby and back was discarded. I noticed that there was a pause at either 98% or 99%, so I tracked that.

Here are some timings, from pressing the button, until the "loading" screen appears, the time to reach 98/99 percent loaded, and the time to display the graphics on screen. I'm going on the assumption that the time from 0 to 98/99 is dominated by endian conversions; in any event, this seems really high.

Runs into the lobby:

1 10 41 4
2 9 38 5
3 6 39 5
4 5 36 4
5 6 40 6

Returns back to the arcade

1 4 32 6
2 6 25 5
3 5 37 6
4 5 28 6
5 6 31 6

This is with a 1.5Mb internet connection; I don't think the 30-40 seconds of loading is just data transmission. About 5-6 seconds to display the first frame I can understand being my card. I'm confused by the 5-6 seconds to fade out before saying "loading", and surprised that the first two "down"'s had so much more than the others.

(even with < code > blocks, this forum still collapses multiple spaces. Sheesh. )

Wed, 11/03/2010 - 13:47
#1
Bifurcate's picture
Bifurcate
Lead Programmer
So, I wanted to find out how

So, I wanted to find out how long the game levels are supposed to take to load, and see if intel/motorolla endian is a problem.

I'm going to go with "no." Java uses "network byte order" (big endian) when serializing numbers: in other words, the same ordering that Motorola uses internally. If anything, Intel architectures would be slower, since they have to convert to little endian. Realistically, though, the performance impact of that conversion is negligible. The reason loading is faster on Intel than on Motorola is the same reason everything is faster: the Intel machines are newer and faster, have newer operating system code and graphics drivers, etc., etc.

This is with a 1.5Mb internet connection; I don't think the 30-40 seconds of loading is just data transmission.

Indeed, almost none of it is. The loading process consists almost entirely of loading textures, models, animations, sound effects, etc., assembling the scene, and creating the dynamic actors.

Wed, 11/03/2010 - 15:26
#2
Burninat0r
Legacy Username
Java just runs slower on PPC

Java just runs slower on PPC macs in my experience. And endian-ness is irrelevant in java as andrzej points out.

I have found that with my Hackintosh with a Core i3 530 (overclocked at 3.4 GHz), SK uses about 25% of my CPU just to run the graphics when i'm doing nothing. (Apparently it's not hardware powered graphics.) So I find it likely that with your much slower CPU it has a hard time keeping up.

Thu, 11/04/2010 - 15:06
#3
Dogrock's picture
Dogrock
Are you completely sure this

Are you completely sure this is not a memory issue? Earlier I recall you said you have a 1GB RAM system. It could be that Java is actively trying to reduce it's footprint by cycling out less used textures more frequently. With the SK folder sitting at around 300MB that is a relatively massive amount of data for your system to cache. It may be possible that even tough you aren't using swap space you are still constatly having to reload game data from the hard disk.

For comparison I have a system with (an excessive) 6GB of RAM. When SK loads Java instantly claims 100MB of memory, jumps to 200MB after log in and rests at about a final value of 345MB during game play after an area transition or two. The loading points I experience are generally in the area of 10 seconds. There is no demand on the hard disk in my system during area transition with the exception of a log file that gets written to every time you transition.

Burninat0r also has a good point with CPU usage. Even on a Core 2 Quad Q9550 (overclocked to 3.6GHz) there is a constant ~25% CPU usage. The game also definitely makes use of hardware graphics in Windows though.

Thu, 11/04/2010 - 13:40
#4
Bifurcate's picture
Bifurcate
Lead Programmer
Even on a Core 2 Quad Q9550

Even on a Core 2 Quad Q9550 (overclocked to 3.6GHz) there is a constant ~25% CPU usage. The game also definitely makes use of hardware graphics in Windows though.

Certainly it uses hardware-accelerated graphics (through OpenGL), but it uses the CPU heavily as well (for processing network updates, e.g., and figuring out what to draw). Since you do have a fast system, you may be able to reduce CPU usage by selecting "Enable Vertical Sync" in the advanced graphics options. Without that enabled, the game will update as fast as possible, even beyond the refresh rate of your monitor.

Thu, 11/04/2010 - 15:02
#5
Dogrock's picture
Dogrock
VSync only reduces load by

VSync only reduces load by ~4% for me. The CPU usage rate is no issue for me. In SK I don't experience any screen tearing since I already have driver based triple buffering, so toggling VSnyc has no notable effect unless I have a FPS counter running.

Thu, 11/04/2010 - 19:19
#6
Burninat0r
Legacy Username
enabling vsnyc certainly

enabling vsnyc certainly lowers my usage on say the loading screen, but not when i'm in a level.

Thu, 11/04/2010 - 23:08
#7
BehindCurtai
Legacy Username
> When SK loads Java

> When SK loads Java instantly claims 100MB of memory, jumps to 200MB after log in and rests at about a final value of 345MB during game play after an area transition or two.

Fair enough. I show instant of 40MB, 108 at the login screen, 118 at select character, 227 in Haven,

After running around all three sections of Haven, I see: ... Oh wow. 250 MB. Watching the memory usage while it was loading, the memory usage dropped right as it finished loading the next section (town square) and displayed it.

And it drops when I go to the next section (bazaar)?

It goes up when I enter the arcade, but drops to 240 on displaying the arcade.

Hmm... Meanwhile, I've got over 350 MB of memory unallocated/free. Go figure.

Powered by Drupal, an open source content management system