Morrowind on Android

7sDUz1qpU8o

In case anyone is interested and if you already have the game files for Morrowind, you can install this on your android device from the play store here https://play.google.com/store/apps/details?id=com.ingenieur.ese.eseandroid&hl=en

Fair warning though it’s just a work in progress Smiley .

A single developer working on a port of Morrowind to Android, written in pure Java.
It’s about half way done and is working very well on a mobile now.
It uses Java3D and JBullet.

There’s a lot more info about it at it’s funding page here:

Hope you like it,
Thanks.

OP, you’re a damn genius.

For anyone worried about legal stuff, I was too.

[quote]Call of Morrowind is a game engine written completely from scratch by a single developer, it is a cross platform game engine designed to work with the game assets of Morrowind by Bethesda Game Studios (2002).
[/quote]

Thanks for the support.

Legally the OpenMW guys have been given the go ahead from Matt Grandstaff at Bethesda, just so long as their engine is cross platform.
Mine’s pure java and you don’t get any more cross platform than Java.

I would add that Android’s Dalvik JVM is unbelievable slow, it run comparably to Oracle’s Hotspot with the JIT turned off.

Nice work so far. The VM on Android has come a long way. I think it’s actually quite good nowadays, even more because Dalvik is a thing of the past since Android 5. The current runtime is ART and it uses AOT compilation on Android 5 and 6 and a mix between JIT and AOT on Android 7.

Gigantic Work.
I want help a little with optimization…

But why only I, We all can ^^,
Find what lagging the most, separate it from engine - and create thread here
we all try hard to find solution how improve it :wink:

(“separate it from engine” - I think full engine source code not ready be revealed for public)

P.s optimization - Except external libraries like Jbullet and Java3D :stuck_out_tongue:
PP.S Sorry I Over excited about all this
(because my Pc can’t run fallout 4 and you run it on Adroid XD)
this optimization on practice can be no so easy as it looks for me now.
At least we can try)

up:
Do you use this?
ElderScrollsExplorer/shaders/land.frag
It scares me)


void main()
{
    vec3 ct,cf;
    vec4 texel;
  //  float intensity;
  //  intensity = max(dot(lightDir,normalize(normal)),0.0);
 
   // cf = intensity * (gl_FrontMaterial.diffuse).rgb +
   //               gl_FrontMaterial.ambient.rgb;  
   cf = (gl_FrontMaterial.diffuse.rgb +
                  gl_FrontMaterial.ambient.rgb)/2.0;  
                     
    texel = texture2D(tex,gl_TexCoord[0].st); 
    ct = texel.rgb;
    //alpha is material only
    gl_FragColor = vec4(ct * cf, gl_Color.a);
}

as i understand diffuse and ambient can be pre mixed together with texture and save to file
no need do it in shader directly

  • if it used really for all lands this shader can easily split FPS for half or even more

even if ambient dynamically changed in game

  • it can be baked on every change in real time to texture and use that texture without mixin in shader directly

[icode]gl_FragColor = vec4(ct * cf, gl_Color.a)[/icode]
external gl_Color.a Why? for debug? i don’t remeber game mechanics with custom walls transperancy :wink:

Java3D on Android… ??? Such a thing exists?

Only in my private git repo :frowning:

But as the official maintainer of Java3D my intention is to try to get a version of it released at some point in the future.

Though it is a nightmare of biblical proportions as Android has no awt and Java3D is based on awt, so there’s a lot of “mess”

And congratulations on getting Naroth released, it looks fantastic!

Yes, it exists thanks to philjord and thanks to JOGL 2 (Java3D >= 1.6.0 exclusively relies on JOGL). Java3D 1.7.0 will include his OpenGL ES pipeline. As philjord said, Java3D is tightly bound to AWT, making it work with NEWT requires some deep redesign but it allows to share a lot of source code on mobile and desktop environments, the OpenGL ES pipeline will probably be usable not only under Android. This is the fulfilment of our vision in the JogAmp community, a single set of tools to target all major operating systems in mobile and desktop environments, and that’s the main reason why JOGL has its own windowing toolkit.

philjord’s stuff is impressive ;D

I am definitely interested in this. I will play it when time comes :smiley:
Ty

It’s so weird to never hear about these huge projects, then they pop up and roll out all this ridiculous tech…
It’ll probably be picked up by some journal and blow up soon!

Congrats, I have a morrowind port in java too! Its not complete by any means but it loads the graphics / animations / game assets / start screens and videos etc. For me its just a personal project and I’m looking to target modern opengl only.

Just out of interest, what do you use to load the bsa nif files?

That’s cool, I love to know what your using as a renderer/scenegraph?

I use my code from
here for bsa file to bytebuffers

here for bytebuffer load nif file in java (in the nif format)

and here from nif format to java3d

and here from nif format to jbullet format

have a look around https://github.com/philjord/ and use whatever you like if it’s useful.

Nice :slight_smile: I wrote a class generator to parse the nif.xml from the NifTools project

I’ll look through some more of your code when I have time

I use my own renderer / scenegraph, I used the project to learn opengl and built an engine around it. I haven’t worked on it for quite a while as I gave myself lots of side projects which just kept growing.

Yeah, I thought a lot about building a generator, thats how the amazing niftools guys do it. But the performance loss is enourmous and some of the complex version issue like fallout 4 are really hard to get working.

So I’ve just hard coded all the nif format gear, a lot of time, but simple work.

Doing your own scenegraph is admirable, but the animations/frame updates would be a lot of work to get going

my code generator is run as a one off for compile time not run time so there is no performance overhead. I generate the code and then import the classes in to my engine. There is quite a lot of weird stuff there but I think I have catered for everything.

The animation / frame updates was interesting, I have it working (I can animate the skeletons with all the body parts added). I didn’t like the nif format so when I built my own scenegraph I created my own animation components that were easy to switch on an off.

The bit that fooled me alot at the beginning was the fact everything was Y-Up but my engine can run in any configuration (right handed / left handed and any axis pointing up).

ziozio,
Do you know I never even though of doing it that way, you mentioning now is the first time I’ve considered it. I feel a bit stupid now…

Yeah the Y/Z axis swap and 1 unit = 1/2 inch scale is a constant issue for me, because I dutifully leave the nif reader in nif format, but have to remember to adjust all translations and rotations when converting, and I forget all the time.

Of course over time the loader has had more and more “read directly into Java3D format” work put into it, so the major geometry readers are now pretty ugly, as I try to read them into openGL compatible formats from the get go.

philjord,
Was there any particluar reason why you chose to stay with Java3D?

SwampChicken,
Basically because when I started nothing else existed.

No Ardor3D no Xith3D, no LWJGL no JOGL2 (jogamp).

So I had to start with the best technology available and back in it’s day Java3D was by far the very best, even back then it had full support for VR applications.

But then Sun stopped supporting it as the client side rich web app wars raged and MS was winning.

Once I had invested a certain number of years and built a lot of good tools for myself I didn’t want to dump all that work :). And it was always a hobby so I didn’t need to chase the newest choices.

Hopefully if I can get my work back into the core of Java3D I might be able to give it a new breath of life for other developers.

necrocode :slight_smile:

philjord,
Yes, I understand. I remember that time well. VRML was also a trendy thing back then. I worked alongside one of the original Java3D devs for quite a few years (…such a long time ago…). This is why I was suprised you were still active in that framework/space.