Wurm Online

Sure.

Before rendering the view, I enter orthogonal mode and render all lightsources as textures quads onto the lower left corner of the framebuffer(*).
This procudes a top-down lightmap. I copy that into a texture, and repeat three more times, rendering larger and larger areas onto the same screenspace, thus generating coarser but bigger lightmaps.
The player’s position is always (kinda) in the center of the lightmaps.

Whenever I render an object, I figure out what lightmap level that fully covers that object, and switch to that texture in texture unit 2.
I set the automatic texture coord generations to just apply u=x and v=z, and switch to texture matrix mode to offset and scale the lightmap.
Then I render the object, with texture 2 as modulate with a modifier of *2 (for overbrighting).
Keep in mind that if you translate, rotate, or scale the modelview matrix, you have to do the same for the texture matrix.(**)

Using several lightmaps lets me have fully lightmapped terrain up to 512 meters away, but still have a 0.25 meter resolution for the lightmaps near the player.
(ie lightmap LOD)

Does this make any sense? :wink:

(* pBuffers seem to crash at ranom for various people, and using the framebuffer has big problems when the pixel ownership test fails… Does anyone know how to disable the ownership test? is that even possible?)

(** I was hoping there would be someway of not having to do this, but I haven’t found a solution yet)

Cheers for that, not sure how I’m going to go about implementing it easily using the scenegraph, but I guess I’ll have a go anyway.

Incidiently, how does this work for lightmaps cast against vertical walls? Maybe I misunderstood but the orthanganol project would give you a texture that could be applied against near horizontal surfaces.

Thanks again, useful explanation

Kev

The lightmaps are flat and applied infinitly in Y.

This is based on the assumption that the world is a lot wider in x and z than it is in y, and that all players and lightsources are on ground level, so it probably doesn’t work well for traditional bsp-type levels and first person shooters where the Y dimension plays a bigger role.

Been busy rewriting the client from scratch. Lots of hard work, but it’s worth it. =D

http://www.mojang.com/wurmshots/everything3.jpg

More screenies and stuff here.

wow, looks awesome!

What kind of hardware are you running for the Game to run at 19 fps?

BTW, the picture looks mouth-wateringly good! :smiley:

The screenshot was taken with athlon 1400+, GF4 Ti4800, 1gb ram, w2k, java 1.4.2.

The trees are by far the biggest resource hog the way they’re currently implemented. (that scene is 60-70 fps without the trees)
In that scene, there are ~22000 potentially visible trees (so 44k trees including the reflection), and each one is culled individually. The ones that pass the culling either are nearby trees (rendered with full geomentry), or go through a whole range of glPushMatix() and glRotatef() magic before finally calling a display list for a single billboard triangle.

Adding a quadtree and building vertex arrays for the billboarded trees should speed things up nicely. :wink:

The newest version caused my Radeon9600-Win2K to freeze. :frowning: Of course, it’s not really Wurm which did this but some driver issue I suppose… still: sigh. 3d graphics tend to overstrain today’s PCs, really.

I got very strange lightning effects… the lower the looking angle the darker everything gets, and everything is covered by the water lightning texture and/or some text… ?!

Athlon 1.1 Ghz , Geforce3 64MB, Detonator Driver 56.72.,
512 MB RAM

Is there any key to make a screenshot so i can post it…
looks really strange

Greets

The new version of the client isn’t up on the site yet.

The old client doesn’t like ATI (or rather, ati doesn’t like opengl), and has some problems with dynamic textures (try playing in windowed mode instead).

Windowed Mode solved the strange problems.

Now everything looks fine !

Greets !

Yes, it seems that there are problems with the ATI cards on the mac as well:

When I start the old client I get the following error:

Error starting Wurm online

java.lang.IllegalArgumentException: Illegally formatted OpenGL version identifier: “1.4 ATI-1.3.18”

My system: Mac OS X 10.3.4, ATI Radeon 9700 128MB, Java 1.4.2_03

The old version doesn’t like macs at all.

But the new client should hopefully make it a lot more compatible. And prettier.

Offering a sneek-peak jnlp anywhere? ;D

It’s really not playable at all yet, but I’m working on that. =)

I’ll post here when it’s done.
(and then you can tell me if it runs or not! =D)

Will you be working on the lag element? Every time I’ve logged in to try and play…it’s been very slow but renders reasonably well.

Framerate is one of the things that will be improved in the new client, but Wurm Online really is a very complex game with thousands of visible dynamic objects (including a fully dynamic terrain), so don’t expect quake 3 type framerate.

ok. :smiley:

but what I was trying to get question was the latency times on your server(s). Every ten seconds, the whole game would pause, seeming to freeze, only to start animating 2-5 seconds later. The computer I experienced these issues with was quite a powerful modern day computer with a 512kbps DSL line. Is this a known issue? I suppose it is, and all the glorious changes being made for client ver 2.0 will fix most of the problems. :smiley:

I’ve never seen the rendering pause because of network lag. =/

We use an almost fully asynchronous protocol. The only synchronous bits is when states need to be… well… synchronized, like when logging in, and directly after a teleportation.

I’m guessing it might be the gc acting up.

http://www.mojang.com/wurmshots/nuh.jpg