Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (206)
games submitted by our members
Games in WIP (781)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Morrowind on Android  (Read 8364 times)
0 Members and 1 Guest are viewing this topic.
Offline philjord
« Posted 2016-08-24 14:34:20 »



<a href="http://www.youtube.com/v/7sDUz1qpU8o?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/7sDUz1qpU8o?version=3&amp;hl=en_US&amp;start=</a>

<edit>
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 .
</edit>

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:
http://kck.st/2beIROQ

Hope you like it,
Thanks.
Offline Ecumene

JGO Kernel


Medals: 154
Projects: 2
Exp: 7 years


I did not hit her! I did not!


« Reply #1 - Posted 2016-08-24 14:51:30 »

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).

Offline philjord
« Reply #2 - Posted 2016-08-24 16:15:00 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline EgonOlsen
« Reply #3 - Posted 2016-08-24 17:16:02 »

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.

Offline Icecore
« Reply #4 - Posted 2016-08-24 19:04:36 »

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 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)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
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

gl_FragColor = vec4(ct * cf, gl_Color.a)

external gl_Color.a Why? for debug? i don't remeber game mechanics with custom walls transperancy Wink

Last known State: Reassembled in Cyberspace
End Transmission....
..
.
Offline EgonOlsen
« Reply #5 - Posted 2016-08-24 21:31:10 »

It uses Java3D and JBullet.
Java3D on Android... Huh Such a thing exists?

Offline philjord
« Reply #6 - Posted 2016-08-24 21:40:38 »

Only in my private git repo Sad

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!
Offline gouessej
« Reply #7 - Posted 2016-08-24 23:52:49 »

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  Grin

Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #8 - Posted 2016-08-25 08:32:49 »


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

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline Ecumene

JGO Kernel


Medals: 154
Projects: 2
Exp: 7 years


I did not hit her! I did not!


« Reply #9 - Posted 2016-08-25 16:20:02 »

philjord's stuff is impressive  Grin

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!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ziozio
« Reply #10 - Posted 2016-08-25 18:35:32 »

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?
Offline philjord
« Reply #11 - Posted 2016-08-25 19:09:24 »

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
https://github.com/philjord/BSAManager

here for bytebuffer load nif file in java (in the nif format)
https://github.com/philjord/jnif

and here from nif format to java3d
https://github.com/philjord/jnifj3d

and here from nif format to jbullet format
https://github.com/philjord/jnifjbullet


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



Offline ziozio
« Reply #12 - Posted 2016-08-25 19:31:25 »

Nice Smiley 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.
Offline philjord
« Reply #13 - Posted 2016-08-26 10:06:16 »

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
Offline ziozio
« Reply #14 - Posted 2016-08-26 18:29:21 »

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).
Offline philjord
« Reply #15 - Posted 2016-08-29 06:37:01 »

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.
Offline SwampChicken
« Reply #16 - Posted 2016-08-30 05:02:30 »

philjord,
Was there any particluar reason why you chose to stay with Java3D?
Offline philjord
« Reply #17 - Posted 2016-08-30 06:36:09 »

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 Smiley. 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.

Offline ags1

JGO Kernel


Medals: 346
Projects: 7


Make code not war!


« Reply #18 - Posted 2016-08-30 10:48:57 »

necrocode Smiley

Offline SwampChicken
« Reply #19 - Posted 2016-08-31 00:41:20 »

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.
Offline gouessej
« Reply #20 - Posted 2016-08-31 11:06:50 »

Hi

SwampChicken, Java3D remained almost frozen (a few community fixes) for years when Sun abandoned it until Harvey tried to resurrect it and I ported it to JOGL 2. I understand philjord's position, he was reluctant to switch to another engine or scenegraph API, he didn't want to ruin his efforts and I know that porting some code to another engine can take a long time. There are a very few APIs similar to Java3D, the last commit for Xith3D was done in December 2014, ...

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.
There is no need to use a conditional instruction Wink In my humble opinion, you should split your contributions into several smaller and more manageable pieces. I suggest you to make a pull request with the changes about the OpenGL ES pipeline. Then, we can solve your problems with the drawable based on NEWT. After that, we can fix the Android specific aspects and finally, we can push the first pre-version of Java3D 1.7.0 with all your changes. There is no shame in asking for help. However, things have changed a lot in the latest ten years, there is no room for another challenger in the 3D Java area, what we have done for Java3D just extends its life (or postpones its death, depending on the viewpoint), Android support will be a very appealing feature but it won't be enough to compete with other famous engines and the problem is a bit the same for some other frameworks and engines supporting JogAmp except JMonkeyEngine and LibGDX. I expect a consolidation with few competitors rather than a diversification. It's up to us to choose how it will happen so that you'll be able to go on working on Morrowind on Android without having to rewrite everything.

Offline philjord
« Reply #21 - Posted 2016-12-19 10:36:40 »

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 .
Offline EgonOlsen
« Reply #22 - Posted 2016-12-19 19:04:42 »

I tried it on two different devices (Nexus 5X and Redmi Note 2) and the loading process crashes on both with some StringIndexOutOfBounds. You should have gotten the bug reports in the play store. I used Morrowind GOTY edition, in case that matters.

Offline EgonOlsen
« Reply #23 - Posted 2016-12-23 17:29:48 »

Just updated to the new Version, but it keeps crashing...

Offline philjord
« Reply #24 - Posted 2016-12-24 10:30:56 »

Egon,
I broke it briefly trying to fix the errors, but instead I made it worse.

I think I see your Nexus 5X crashes from earlier today, that one will (cross fingers) have been caused by my bug, so when it updates to version 1.4 it should be fixed, I put it on the store about 12 hours ago, so possibly it's on your device now and things might be better?

In fact I see your HM Note 2 bug as well, and THAT bug was caused by a string parsing failure for the starting location and orientation, which is also fixed (or should be Huh)

Because the app is heavily multi threaded the crash reports are very sparse on detail and stack traces, and they don't include any sort of System.err output.

If you can tell me exactly what steps you were taking when it crashed that might help. Specifically how long after selecting the start location and what was displayed on screen at the time.

Thanke for investing time to give me feedback, is does work on peoples devices  Grin
 
Offline EgonOlsen
« Reply #25 - Posted 2016-12-24 21:28:34 »

I have 1.4 installed already. After selecting a starting location (it doesn't seem to matter which one), it manages to get to stage 5 and then crashes with the StringIndex... Exception.

Offline EgonOlsen
« Reply #26 - Posted 2016-12-25 10:31:24 »

1.5 still crashes, just earlier (around stage 2).

Offline philjord
« Reply #27 - Posted 2016-12-26 00:42:10 »

Well I'm a bit stumped by this one

I've got the GOTY bsa files and they are identical to the original ones, I can run with them fine on my device.

I'm wondering if you've got any DLC or mods with bsa files I haven't seen.

If you get time could you send me a screen shot of the file explorer for your morrowind folder on your device with teh detials view turned on so I can see the bsa file names and sizes?

The reason I wonder is that the message describes a substring on a file name that's 16 characters long, but there is only 2 of those in the core bsa files and they are both fine names, so perhaps you have an extension bsa of some sort that has no foldername on one of the filenames, just a guess.

I've put back in the string indexof code that I tried to fixed earlier (but managed to cock it up) so possibly the 1.6 version will fix it, but without knowing the bug I not confident.


Just for your interest, the reason this is so hard to debug is that the proguard mapping file seems to be wrong somehow

I get delivered the bug as:
java.lang.StringIndexOutOfBoundsException: length=16; regionStart=0; regionLength=-1
in at __null__.hasNifOrKf(ArchiveFileTes3.java).substring
at archive.BSArchiveSet$1.run(BSArchiveSet.java)

That line __null__.hasNifOrKF is totally wrong that method is just a field getter of one return statement, I think it's supposed to be the method load() it's the only thing that makes sense.

This comes to me automatically from the google dev console so I can't inspect anything else about it.

Phil.

Offline EgonOlsen
« Reply #28 - Posted 2016-12-26 09:51:55 »

No, it's a clean GOTY install. In fact, I bought it just for this purpose, because I couldn't install my old version anymore on Windows 10. I'll post a screen shot later.
Maybe it has something to do with the location of the files? I copied the Morrowind directory into the download folder.

Offline EgonOlsen
« Reply #29 - Posted 2016-12-26 10:53:59 »

I've just updated to the latest version. It kinda works now, i.e. it doesn't crash anymore. But all I'm seeing after loading is either the skybox or the skybox, the player's torso and some crazy polygons below it. I'll try to upload some shots later.

Pages: [1] 2
  ignore  |  Print  
 
 

 
Galdo (237 views)
2017-01-12 13:44:09

Archive (405 views)
2017-01-02 05:31:41

0AndrewShepherd0 (864 views)
2016-12-16 03:58:39

0AndrewShepherd0 (801 views)
2016-12-15 21:50:57

Lunch (938 views)
2016-12-06 16:01:40

ral0r2 (1168 views)
2016-11-23 16:08:26

ClaasJG (1270 views)
2016-11-10 17:36:32

CoffeeChemist (1305 views)
2016-11-05 00:46:53

jay4842 (1390 views)
2016-11-01 19:04:52

theagentd (1207 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!