OpenMW Morrowind engine - [UPDATE: terrain plugin]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

OpenMW Morrowind engine - [UPDATE: terrain plugin]

Post by brick »

Hi, I've just released an ambitious project of mine called OpenMW: http://openmw.snaptoad.com

OpenMW is an attempt to reimplement Morrowind using only open source software. It is meant to become (in time) a drop-in replacement for the official executables. It's planned to be multi-platform, support all existing content (including all mods, and localized versions), and have new and improved features like a better interface. It doesn't replace or contain any art though, so you must already own a copy of Morrowind to use it.

Update May 10. 2009: Two new videos of our new terrain plugin. Check out http://www.ogre3d.org/forums/viewtopic. ... 14#p339814.

Update 5 March 2009: OpenMW 0.6 released! Adds a GUI and a scripting language. http://www.ogre3d.org/forums/viewtopic. ... 91#p331281
Update 11 November 2008: OpenMW 0.5 released! Adds collision detection and character movement / physics: http://www.ogre3d.org/phpBB2/viewtopic. ... 263#314263
Update 02 October 2008: New videos of the upcoming version 0.5 (using Bullet!): http://www.ogre3d.org/phpBB2/viewtopic. ... 125#308125
Update 13 July 2008: Version 0.3 runs on both Windows and Linux. Check out page 2 for downloads and information.

UPDATE: Screenshots moved to: http://openmw.sourceforge.net/jaws/inde ... bum/1.html

It also plays sound and music! (not so easy to show in the screenshots :)) This is still a very early development release however, and at the moment you can't really do much except load a cell and move around in it.
Last edited by brick on Sun May 10, 2009 10:16 am, edited 5 times in total.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Really nice work!
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

Wow, that's a very creative and interesting project. Looks great so far.
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

Thanks!

I think this project is a great way to create a complete game engine, and to turn it into a complete game - without needing to create any actual game content.

The next thing to fix is collision detection, and a terrain engine for exterior cells. Both should be possible though, even though I have little experience with either subjects.

I'm also developing a home-grown game scripting language along side it, which will be a stand-alone project. In time I hope to integrate this language directly with Ogre (and other engines too, through a modular api). I will probably post more about this when the time is right.
Last edited by brick on Mon Jul 14, 2008 9:31 pm, edited 1 time in total.
Yacoby
Halfling
Posts: 85
Joined: Sun Sep 23, 2007 7:58 pm

Re: OpenMW - an open source implementation of Morrowind

Post by Yacoby »

Looks really nice.

This was how far I got to:
http://i6.photobucket.com/albums/y212/Y ... een_19.jpg
http://i6.photobucket.com/albums/y212/Y ... een_29.jpg
http://i6.photobucket.com/albums/y212/Y ... een_31.jpg
(The seams problem was nearly fixed IIRC. In a hacky way. shots taken in debug mode ofc)

The reason I gave up was mainly that I didn't like the code, so the code I have got is mainly an example of how not to write a game engine, the other was that Morrowind didn't do things in the way I wanted to, I would much rather write my own game rather than be limited to Morrowind.

However, I am downloading the source, and am going to see what I can play with. Never messed arround with D.

If you are intrested in my implemetations soruce, it is on sourceforge (morrowindremake) for a couple of days more before I take it all down.

Anyway, good luck with the project. Get further than I did.
fix system design bugs, like the "dirty" GMST entries in mods
You would have to be really carefull with this. Some entries that look "dirty" are clean etc.
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

Yacoby: Wow, that's EXACTLY what I'm looking for! I'm pretty sure I have looked around the web for similar projects, but I must have missed yours. Downloading as we speak. This might potentially help me a great deal.

About the GMST entries: The only thing my code does is ignore the setting in a mod if it matches the name _and_ the exact value of a "dirty" entry. It works mostly the same as the various "mod cleaners" out there, except it doesn't modify any files. Most of these values are either the default value or completely nonsensical, so ignoring them should be harmless in most cases. Mods that set other values work fine, as do the values in the three official ESM files. But you are right, theoretically it's not fool proof, and I guess even more complicated heuristics can be used to be on the safe side.

Anyway, I'm looking forward to exploring your code. And I'm sure I can make good use of it, no matter what it looks like ;)
User avatar
triton
Greenskin
Posts: 138
Joined: Thu Mar 13, 2008 10:25 pm
Location: Portugal

Post by triton »

This looks nice! :)
Nebelmann
Gnoblar
Posts: 9
Joined: Thu Feb 01, 2007 6:50 pm

Post by Nebelmann »

Hi brick,

I tried to build openmw (because I can't run it on my x64 ubuntu, unable to load libOgreMain.so.14) but it seems that some files are missing in your source archive, concerning audiere: at least sound/cpp_audiere.cpp and sound/audiere.d were not found :?

(I'm trying to build with gdc, btw)

Can you confirm these files are missing? And upload a new archive please?

Thanks

Nebelmann
User avatar
Lothar
Kobold
Posts: 32
Joined: Sun Aug 27, 2006 5:58 pm
Location: Poland->Gdansk

Post by Lothar »

When will you release version for Win32? :roll:
I just can't wait for final release :-P It looks awesome, and will give us much more possibilities to mod Morrowind 8)
I bow before you :-P
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

@Nebelmann: oops, you are correct, those files were indeed missing. I've uploaded a fixed version now. Thanks for reporting it! I suspect you will get a few other problems with gdc though, because of some currently unfixed bugs in the compiler. But I haven't tested it, so let me know how it goes.

@Lothar: I can always appreciate some bowing. :) Actually I'm planning a windows build for the next version already. I'm going to be busy with a lot of other stuff in the coming weeks though, so I cant tell you when that will be. It's probably some time until a final release ;)
Nebelmann
Gnoblar
Posts: 9
Joined: Thu Feb 01, 2007 6:50 pm

Post by Nebelmann »

I found another problem, by default the program loads the cell "Sud", which do not exist in the French version I have :D
It seems that cells containing accents can't be loaded (for example "Telasero, niveau inférieur"), cells without accent works (ex "Caverne de Massama")...

Maybe you should add an option to scan the esm file for every cell name instead of giving a cell list (thus you could also have cell names for Bloodmoon, Tribunal and other mods).
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Post by Kojack »

It's been a while since I've touched Morrowind reverse engineering. The landscape format was tricky at first (each vertex in a landblock was a signed 8 bit offset from the vertex to the left, except for the first vertex of each row which was an offset from the first vertex of the previous row).

Looking good.
Ayrik
Gnoblar
Posts: 12
Joined: Tue Jan 23, 2007 11:59 pm

Post by Ayrik »

Simply amazing that you were able to connect OGRE to D.

I don't know anything about makefiles, but did you just compile the cpp code into a .lib or .so and just include that in the compiler, or does D also compile cpp code?

I would love to write a major project in D, I just recently was able to get OpenGL to work (without using SDL or GLUT) utilizing Derelict...Makes me want to go back to it because I really like D. I use Windows, and have been using Poseidon with BUD.
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

@Kojack: Are the results of your reverse engineering documented anywhere, or did they go into morrowindremake? I'd really like to know what you found. One of the things I dreaded the most was decoding the landscape data, especially since I have little experience with it and therefore didn't know what to look for. The online docs I found for the ES format typically skip the landscape records. Now that I have the morrowindremake sources I guess I can figure it out though.

Other pieces I'm missing are the path grid data and various savegame-only records. But I guess importing existing morrowind-saves isn't a crucial feature yet, even though I definitely want to do it at some point.

@Nebelmann: well, I didn't think about that :) It's probably a character encoding issue, all morrowind data is encoded in ascii or latin-1, but modern linuxes typically use unicode. Maybe I can find a cell name that's the same in all languages, do you have any suggestions?

I actually have a program that spits out cell names (and some other info), but there were a few bugs in it that I had to fix so I didn't include it in this version. Of course, in a more finished version you won't have to specify cell names on the command line, so this is just a temporary hack anyway.
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

@Ayrik: Yep, I compile the C++ code into object files (.o) with gcc, and link them in with the D object files. D has built-in support for linking to C functions. These kind of mixed project are quite easy to set up with makefiles, once you learn the arcane syntax :)

There are better and easier ways to build D projects though, but there are some issues that need to be fixed before I can use them with openmw.

I really like D too, and I'm using it so much now that it's getting harder and harder for me to code C++ - it's almost scary.
User avatar
baxissimo
Greenskin
Posts: 135
Joined: Wed Feb 23, 2005 1:28 pm
Location: Tokyo, JAPAN

Post by baxissimo »

brick wrote: I really like D too, and I'm using it so much now that it's getting harder and harder for me to code C++ - it's almost scary.
Agreed! Nice work on this one.

I don't really get how you're connecting with the C++ code though. You made it sound like you were calling the C++ code directly. Are you calling mangled C++ names directly or something? Or did you write some wrappers for the C++ code in C? The latter is what I would have expected (with D1 at least), but it's not quite what you described.

Also, sorry for asking, but what's morrowind and why would someone want to clone it?
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

Thanks.

A set of C wrappers is indeed what I'm doing. When D2.0 (which supports calling C++ functions directly) is more mature I might simplify the interface even more. But I suppose the end result will look pretty much the same, since it works well the way it's set up now.

I think Wikipedia can describe Morrowind much better than I can. Basically it was (is) a great game, but the implementation didn't always live up to the game's true potential (for example it has several annoying bugs that were never fixed.) Also, I guess when you give someone a big open-ended world like Morrowind, a lot of people will want to expand and improve it.

Plus it's a fun project to work on ;)
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Post by Kojack »

@Kojack: Are the results of your reverse engineering documented anywhere, or did they go into morrowindremake?
I think I lost it all when I had a hard drive crash. But I still remember the basics (I think), about 65x65 vertices per landblock with triangulation going in an alternating pattern like:

Code: Select all

_______________
|\|/|\|/|\|/|\|
|-+-+-+-+-+-+-|
|/|\|/|\|/|\|/|
|-+-+-+-+-+-+-|
|\|/|\|/|\|/|\|
|-+-+-+-+-+-+-|
Each landblock had a float as the base height, the first vertex was an offset from it, then the pattern I mentioned in the last post started.

All I did with it was extract part of asheron's call landscape (another one I reverse engineered the landscape of) and generated terrain for morrowind.

WOW was even harder, it had a 9x9 grid of vertices interleaved with an 8x8 grid. That messed me up for a while.

I've been meaning to take a look at Oblivion's landscape.

Oh, and yay for D! :)
Yacoby
Halfling
Posts: 85
Joined: Sun Sep 23, 2007 7:58 pm

Post by Yacoby »

I am not sure if you have seen this:
http://www.uesp.net/text.shtml?morrow/tech/mw_esm.txt
http://wrye.ufrealms.net/ESTemplate.ini
http://home.cinci.rr.com/jimadam/Morrow ... ormat.html
http://www.uesp.net/wiki/Tes3Mod:File_Format

LTEX records are loaded like this:

Code: Select all

				for(int y1=0;y1<4;y1++) {
					for(int x1=0;x1<4;x1++) {
						for(int y2=0;y2<4;y2++) {
							for(int x2=0;x2<4;x2++) {
								ifs.read ((char *)&mLandTextures[x1*4+x2][y1*4+y2], sizeof(short));
							}
						}
					}
				}

Landscape code can be found in Morrowind Graphics Extender (by timeslip), and a load of mods by Lightwave. He has a site somewhere

Soruce for an entire impelmentation of the TES3 format can be found in MWEdit (Sorucefogre).
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

@Kojack: thanks, what you've told me will undoubtedly help me a great deal. Like I said, I wouldn't know what to expect when decoding a landscape format. You on the other hand seem like quite the guru :)

@Yacoby: Thanks! I only had nr. 3 on that list. I also had a page called ESM File Format by Dave Humphrey, but that page is gone now (luckily I kept a local copy.)
skoruppa
Gnoblar
Posts: 18
Joined: Wed May 23, 2007 11:03 pm

Post by skoruppa »

This is awesome :D I'm going to post about your project on my site
http://wikigames.ubuntu.pl
naryl
Gnoblar
Posts: 1
Joined: Wed Jun 11, 2008 9:18 pm

Post by naryl »

Looks like I won't be needing wine anymore :D
Posted about your project on http://linux.org.ru
User avatar
Lothar
Kobold
Posts: 32
Joined: Sun Aug 27, 2006 5:58 pm
Location: Poland->Gdansk

Post by Lothar »

Any news? What is the status? 8-)
db123
Halfling
Posts: 78
Joined: Wed May 21, 2008 5:55 am

Post by db123 »

I am not like this style,but your work is very nice.
brick
Kobold
Posts: 34
Joined: Thu Nov 10, 2005 6:34 pm

Post by brick »

Thanks again guys!

It looks like the trend on this forum is to stick to one thread per project, so I will follow that.
Here are a couple of updates so far:

1. There is now a sourceforge page for OpenMW at: http://sourceforge.net/projects/openmw . The sources have been moved to the public subversion repos, so you can get it directly with the command:
svn co https://openmw.svn.sourceforge.net/svnroot/openmw/trunk openmw

2. There's a news page with an rss feed on the home page: http://openmw.snaptoad.com/news.html , so if you use rss it will be much easier to follow the latest news and releases.

The windows build will be ready soon, and that will give a lot more people the chance to play with openmw. I'm also working on a science project this summer though, so I can't promise that development will be super-quick in the next few weeks. But I will do what time allows.
Post Reply