www.tombraiderforums.com  

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 23-02-13, 20:21   #1
Lwmte
Historian
 
Lwmte's Avatar
 
Join Date: Aug 2010
Location: Russia
Posts: 454
Wink OpenTomb project



Last update: 30 June 2014 (source)


Mac version by Cochrane (32-bit and 64-bit, for 10.6 onwards): binary and source code (last update: 25 May 2014).

Fork by vobject (Linux-friendly): source code (last update: 24 May 2014).

OpenTomb (formerly TRE) is an engine replacement project intended to play levels from all classic TR games (TR 1-5) and custom levels.

For latest updates, downloads and source code, refer to OpenTomb SourceForge page. Latest news on project are currently available through ModDB entry.




Last edited by Lwmte; 30-06-14 at 23:21.
Lwmte is offline   Reply With Quote
Old 23-02-13, 20:22   #2
Lwmte
Historian
 
Lwmte's Avatar
 
Join Date: Aug 2010
Location: Russia
Posts: 454
Default

OpenTomb Features:
  • Completely different collision approach: engine gets collision not from floor data, but directly from room mesh data. Static mesh and movable collision is also calculated on the fly and is not taken from pre-defined bounding boxes. Simply said, OpenTomb sees no difference between room, static mesh and object collision, and allows standing / climbing / etc. on any surface, including static meshes and movables (even enemies!).
  • Integrated LUA scripting: lately LUA became de-facto standard for game scripting because of its easiness and features. It is used by OpenTomb for flexible item, trigger and general gameplay programming on a per-level basis. Meaning, you can easily re-program ANY item or trigger for any level. Say goodbye to pre-defined item functions!
  • BULLET physics engine is another groundbreaking feature, which offers professional-quality object interactions in real-time. In classic TR levels it can be used for Lara's ponytail, boulders, traps, ropes, particles, vehicles, rigid or soft body dynamics and many more.
  • Advanced audio engine: PC versions of Tomb Raider had no environmental audio effects, like echo, reverb or occlusions. OpenTomb successfully reimplements all these, plus air absorption effect and underwater low-pass filter! Soundtrack player uses three-channel automatic handling, which allows to play background ambience, action music and speech all at the same time without interruptions!
  • Cross-platform compatibility: OpenTomb is being written in C++ using unified interfaces like SDL 2.0, OpenGL and OpenAL, so it can be made compatible with any common platform, like Linux or Mac. Currently, Cochrane is already created Mac port of OpenTomb, and vobject has made code compatible with Linux.

FAQ:
  • Q: What is OpenTomb?
    A: OpenTomb (previously known as TRE, tr1_engine or TeslaRus engine) is a reimplementation of classic Tomb Raider engines with support of all TR1-5 levels (including custom ones). It is being written from scratch, i. e. it's not a mod, patcher or dll extension of existing engine(s). OpenTomb uses some parts of previously abandoned TR engine clones - particularly OpenRaider and VT project, plus it incorporates some code from Quake Tenebrae project.
  • Q: Why develop another TR engine from scratch, if we already have TRNG, TREP, etc.?
    A: Despite the fact that patchers offer lots of customizations, they still operate within almost 15-year old binary with outdated graphics and sound, lack of modern hardware features support, no optimizarions, no proper physics model, and many more. Also, it is much more difficult to insert new features into pre-compiled binary than write it in high-level programming language. Plus, open-source model of OpenTomb allows anyone to contribute to code, with any degree of involvement.
  • Q: Why it's called OpenTomb, and why it was renamed from TRE?
    A: First of all, there are too many software projects with TRE in their names: TREP, DxTRE3d, TREE4. Second reason is Core themselves always used Tomb word as internal engine names: Tomb2, Tomb3, etc., so OpenTomb name (unlike, for example, OpenRaider) clearly marks itself as the next step in Tomb family. And the third reason is that it's simply a funny play of words: open tomb means to uncover something that was buried or forgotten - an old engine with numerous unsuccessful open-sourcing attempts, which finally gets uncovered!
  • Q: What do I need to run OpenTomb?
    A: It's all simple - you need all classic TR game resources. Problem is, these resources (except level files themselves) are tend to be in some cryptic formats or incompatible acros game versions. Because of this, you need to convert some game resources by yourself or get them from somewhere on the Net. Anyway, here is the list of all needed assets and where to get them:
    1. Data folders from each game. Get them from retail game CDs or Steam/GOG bundles. Just take data folder from each game's folder, and put them into corresponding /data/tr*/ folder.
    2. CD audio tracks. OpenTomb only supports OGG audiotracks for a moment, so you should convert original soundtracks by yourself, or just download whole TR1-5 music package here. PLEASE NOTE: script file bundled in this archive is outdated, so don't overwrite existing soundtrack.lua file with one provided in archive.
    3. Loading screens for TR1-3 and TR5. For TR3, get them from pix directory of your installed official game. Just put this pix directory into /data/tr3/ folder. As for other games, it's a bit tricky to get loading screens, as there were no loading screens for PC versions TR1-2, TR4 used level screenshots as loading screens, and TR5 used encrypted format to store all loading graphics. So, to ease your life, you can simply download loading screen package here. Just put it right into OpenTomb directory, and that should do the trick.
  • Q: Is OpenTomb compatible with TRLE levels?
    A: Yes, latest revisions successfully loads TRLE custom levels - both classic and NGLE ones, except encrypted NGLE levels.
  • Q: Which features are currently available and which are not?
    A: Basic physics interaction – you can walk, run, jump, climb, swim, grab and shimmy ledges, slide on slopes and stumble into walls. In TR2+, you can climb walls. In TR3+ levels, you can also monkeyswing, crouch, crawl and sprint. Lately, triggers and switch/keyhole interaction has been also implemented. No AI or NPC has been implemented yet.
  • Q: Why there are so many bugs in Lara's movements – landing and jumping animations are not assigned properly, some of intermediate animations are missing, etc.?
    A: Just because all code for Lara's states and state changes is being written completely from scratch. It's hard to precisely replicate original TR Lara behaviour, if you don't have original source code. Imagine that you learn Lara to walk and jump, like she's a little child. So it will take some time to polish gameplay and make Lara behave like she usually does in original games.
  • Q: What about Tomb Raider Xtra compatibility? And will it handle external textures for other game versions?
    A: There are plans to support replacement textures, including Tomb Raider Xtra. This should be relatively easy task, since the code is fully open (unlike old tomb* binaries, which require cryptic setups and filehacks to replace something in them).
  • Q: What about meta2tr'ed levels?
    A: Latest revision of OpenTomb successfully loads and renders levels modded with meta2tr. There are some issues with collision, particularly with sliding - however, in the end it should be fixable with increasing slope area tolerance.
  • Q: Will it be compatible with TRNG/NGLE?
    A: Since TRNG is a patcher for Tomb4 engine, and OpenTomb is not a Tomb4 engine, it won't be compatible with it out of the box. However, most routines and special effects used in TRNG could be easily replicated with Lua scripts, and TRNG extended script could be translated to OpenTomb. So, in the end, it could be made compatible some day.
  • Q: Will it be compatible with TREP/FLEP?
    A: TREP and FLEP operates directly with engine binary, so it won't be possible to translate special TREP and FLEP routines to OpenTomb. Hence, no direct compatibility with TREP/FLEP is possible. However, eventually authors of TREPped and FLEPped levels could translate it via Lua scripting. Just make sure you have your TREP and FLEP presets stored at the safe place to revive them when OpenTomb will be ready for it.
  • Q: What about pixel shaders, SSAO, real-time shadows, environment mapping and all other fancy graphical features?
    A: Answer by Cochrane: all those requests are fairly simple, and TeslaRus's work is an excellent foundation to add these things. So yes, these will be implemented eventually. They're just not particularly high priority right now.

Controls

OpenTomb supports mouse, keyboard and joystick (force feedback support included for XInput controllers). Mouse is used for positioning camera, analog joystick/gamepad sticks also may serve the same purpose. As for button actions, all of them may be remapped via configuration file via "bind" command. Button keycodes are placed into "scripts/control_constants.lua" file (you can open it with any text editor).

If you're using joystick, note that joystick buttons are coded as JOY_ + button number, e.g. joystick button 1 should be coded as JOY_1 config file, joystick button 4 will be JOY_4, and so on. As for POV switch, directions are coded JOY_POVUP (up), JOY_POVDOWN (down), JOY_POVLEFT (left) and JOY_POVRIGHT (right).

Also, note about XInput controllers (XBOX360 controller and equivalents): its triggers have their own button names - JOY_TRIGGERLEFT and JOY_TRIGGERRIGHT. If you have gamepad which can switch between DirectInput and XInput modes, each mode will use its own mapping, but I recommend to use XInput mode anyway, cause it also supports force feedback.

Here is the default OpenTomb key mapping:

W / S / A / D — Forward / back / left / right.
SPACE — Jump / crawl jump
CTRL — Action (grab the ledges)
SHIFT — Walk / swan dive
CAPS LOCK — Sprint (if CAPS is on, Lara will always sprint)
V — Crouch
Z — Reset animation state (to get out of bugged states)
N — Noclip mode

PRINT SCREEN — Take screenshot
F5 — Quicksave
F6 — Quickload


Console command reference

Currently, OpenTomb has no menus, HUD or graphical UI, and only uses console for command input. To invoke console, press ~ key.

Here is the brief list of console commands to use:
  • setgame "[game name]" — launch certain Tomb Raider game version. For example, setgame "TR2" loads Tomb Raider 2, and setgame "TR3GOLD" loads Tomb Raider 3: Lost Artifact.
  • setlevel "[level number]" — when game version is set, you can jumb between levels with this command.
  • help — show full console command help.
  • map "[level path and filename]" — loads specified level file.
  • save "[filename]" — saves game with specified filename in "save" subdirectory.
  • load "[filename]" — loads game with specified filename from "save" subdirectory.
  • free_look [0 or 1] — switch free look mode on or off.
  • cam_distance [value] — camera distance, 1024 by default.
  • playsound ([sound number]) — plays corresponding sound.
  • playstream ([soundtrack number]) — plays corresponding music track.
  • exit — quit game.


Screenshots & videos:





Developers

TeslaRus: main developer.
Cochrane: renderer rewrites and optimizing, Mac OS X support.
Gh0stBlade: renderer add-ons, gameflow implementation, state control fix-ups.
Lwmte: state machine and scripting fix-ups, controls, GUI and audio modules.
Saracen: room and static mesh lighting.
pmatulka and vobject: Linux port.

Additional contributions from: godmodder (general help), meta2tr (testing and bugtracking) and shabtronic (renderer fix-ups).


Contribute to project

There were numerous attempts in TR engine reconstruction – OpenRaider, VT project, OpenTRX, TRPlayer, RetroFit... All of them were merely solo projects, and unfortunately, none of them reached final release or at least playable beta stage. Main point is, the more people work on a project, the more chances it will success.

So, if you love classic Tomb Raiders and can program in C++, it will be wonderful if you can contribute to OpenTomb development! Just contact TeslaRus through private message and tell what you can do!
Currently, ToDo list is pretty large: item interaction, graphic enhancements and menu system!

For those who want to contribute: we now have extensive tutorial on how to make OpenTomb integrate into Code::Blocks IDE.

Last edited by Lwmte; 30-06-14 at 23:29.
Lwmte is offline   Reply With Quote
Old 23-02-13, 20:55   #3
FairFriend
Hobbyist
 
Join Date: Mar 2012
Posts: 22
Default

This is one of the best thing that could happen to the tr modding community! the scope of the project is huge and the commitment of teslarus is truly remarkable. I hope that I will find time in the next months to dig deep into the code. Btw I'm glad you followed the advise and chose bullet
FairFriend is offline   Reply With Quote
Old 24-02-13, 07:19   #4
TeslaRus
Hobbyist
 
TeslaRus's Avatar
 
Join Date: Jan 2013
Posts: 78
Default Bullet

This time I fully delete collide.cpp, trace.cpp. All physics works through bullet. I use dynamic rigid body (capsule with AngularFactor(btVector3(0.0, 0.0, 0.0)) ) as a character. Movement implemented with SetLinearVelocity function. To eliminate overlapping room collision I add btOverlapFilterCallback and check current room of the object (engine.cpp). But I have problems:
1) How to correct implement slopes?
2) Maybe bullet character controller is better than dynamic rigid body stick?

Last edited by TeslaRus; 28-02-13 at 12:43. Reason: I add filter to convex sweep test. One problem solved.
TeslaRus is offline   Reply With Quote
Old 10-03-13, 20:40   #5
Cochrane
Silver Contributor
 
Cochrane's Avatar
 
Join Date: Apr 2006
Location: In Germany Gender: I'm male Classification: Evil
Posts: 13,525
Default

I just realized that I had completely forgotten about the Mac OS X port. Sorry about that. Anyway, I've now updated it to the latest version on Sourceforge:



As always, the source code is in my fork of the Sourceforge repository. There's some ugliness in the commit messages, but the code should all be valid: https://sourceforge.net/u/zcochrane/tr1engine/

For those feeling adventurous, but not up to using Xcode, here's a binary:
http://ferroequinologist.de/gllara/t...gine-mac-2.zip

To use this:
  1. Download and extract the latest binary for Windows (from TeslaRus's Sourceforge page).
  2. All level files from any PC or Mac (OS X and OS 8/9) version of TR1-C will work, as should all TRLE files that do not use TREP or similar. If you have the Mac App Store version of Tomb Raider 2, you'll find them in the package contents in "Contents/Tomb Raider 2 Data/Data".
  3. Put the level files in the correct folder. You can edit the config files (instructions for this should be somewhere in the engine folder), just as you would on Windows.
  4. If you haven't yet, download and unpack the Mac version. This will give you the file tr1engine.app
  5. Put this tr1engine.app file in the engine folder (the same folder where engine.exe is).
  6. Start it. If you've edited the config files, you should be able to play right away, otherwise you'll have to use the map command, as Lwmte explained. Everything Lwmte said in the first two posts applies to the Mac version, too. One addition: To quit, you can use Command+Q.

This isn't yet the most elegant workflow. If you have any better suggestions how the app should work, I'd be glad to implement them. Especially if it makes the Mac version better than the Windows one.
__________________
GŁter auf die Bahn!
Cochrane is offline   Reply With Quote
Old 11-03-13, 00:59   #6
trlestew
Tomb Raider
 
trlestew's Avatar
 
Join Date: Oct 2008
Posts: 13,182
Default

I think this is a neat project that will really change how custom levels are designed in the future.
However, wouldn't the original TR games be left unplayable in this engine since the collision system is completely re-written?
__________________
Coffee is knowledge.
trlestew is offline   Reply With Quote
Old 11-03-13, 07:16   #7
Cochrane
Silver Contributor
 
Cochrane's Avatar
 
Join Date: Apr 2006
Location: In Germany Gender: I'm male Classification: Evil
Posts: 13,525
Default

I wouldn't worry too much about the original games. Their design is generally sane, with very few tricks used. There are not a lot of cases where the graphic geometry does not match the collision geometry; of the top of my head, I can only name water, cobwebs and the like, and the engine will have to support that anyway. You will be able to climb on any static mesh, and that will open up new exploits and shortcuts, and there are a lot of details that need to be handled properly, but I don't see those as big problems.

What I'm really interested in is how overlapping rooms and paperthin walls and the like will work. Those can be major challenges, because your typical physics engine is not prepared for them out of the box.
__________________
GŁter auf die Bahn!
Cochrane is offline   Reply With Quote
Old 11-03-13, 13:15   #8
TeslaRus
Hobbyist
 
TeslaRus's Avatar
 
Join Date: Jan 2013
Posts: 78
Default Character controller

Hi all! Bullet is very interesting physics engine. I found way to solve overlapping rooms problem and add RMB (right mouse button) test function to select objects (and switch animations by q - e buttons) or delete test spheres. But I did not make an alternate room filter.
In this time I make character controller (bullet's one does not approach to the Lara behavior). I use as a character dynamic rigid body (capsule shape) with angular factor 0. It allows to push items or be pushed by them. But using dynamic rigid body as a character prevents to ugly shake while mowing and I do not know how to realize slopes.
TeslaRus is offline   Reply With Quote
Old 15-03-13, 18:46   #9
Lwmte
Historian
 
Lwmte's Avatar
 
Join Date: Aug 2010
Location: Russia
Posts: 454
Default

Quote:
Originally Posted by Cochrane View Post
All level files from any PC or Mac (OS X and OS 8/9) version of TR1-C will work, as should all TRLE files that do not use TREP or similar.
It means you have fixed TRLE level loading? But I can't see any difference in TR4 level loader in your fork... Or the problem was somewhere else? I remember TeslaRus told about some zlib errors while unpacking TRLE levels.
Lwmte is offline   Reply With Quote
Old 17-03-13, 03:41   #10
TheBloodRed
Relic Hunter
 
TheBloodRed's Avatar
 
Join Date: Dec 2009
Location: Newport News, VA
Posts: 5,032
Default

I'd love to see some video of some new effects in action. This is amazing especially because of cross-platform support!!
__________________
Hey, you know what this calls for? A party!
TheBloodRed is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:24.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2014, vBulletin Solutions, Inc.