Git Product home page Git Product logo

aitd-roomviewer's Introduction

AITD room viewer

This is a room viewer (and 3D model viewer) for Alone in the Dark series. It has been created mostly for speedrunning.

The following games are supported :

  • Alone in the Dark 1 (CD-ROM, floppy, demo)
  • Alone in the Dark 2 (CD-ROM, floppy, demo)
  • Alone in the Dark 3 (CD-ROM, demo)
  • Jack in the Dark
  • Time Gate: Knight's Chase (CD-ROM, demo)

Instructions

  1. You need to have the original version of the game installed somewhere on your computer (eg: from GOG)
  2. Extract AITD room viewer archive in a folder (eg : on your desktop)
  3. Create a new folder named "GAMEDATA" inside of it.
  4. Copy the following files from the game to GAMEDATA folder :
  • ETAGE00.PAK, ETAGE01.PAK, ETAGE02.PAK, ...
  • CAMSALxx.PAK (Time Gate only)

Commands

Mouse Description
Wheel zoom in / out
Left button drag map / select box
Middle button reset camera zoom and position
Right button show options menu
Key Description

change floor
change room
W reset last distance for all actors
Q reset total delay (AITD1 only)
Shift + Alpha1 Timer 1 goes back 5 seconds (AITD1 only)
Shift + Alpha2 Timer 2 goes back 5 seconds (AITD1 only)
Esc quit (only in fullscreen mode)

Shortcuts

Key Description
D display mode
F camera follow mode
R room's visibility
C camera area's visibility
T trigger's visibility
A actor's visibility
E show extra info (AITD1 only)
Page up
page down
camera rotate
Tab switch to model viewer

Put mouse on a box to highlight it.

  • Light gray boxes are colliders which player cannot passthrough
  • Blue boxes are colliders that player can interact with or used for actor instantiation
  • Teal boxes are links between rooms and is used for pathfinding
  • Red and amber boxes are triggers. It is usually used to switch from one room to another. It can also trigger other things like enemies, sounds, scripted sequences, ...

DOSBox

It's possible to view all active entities in the game, displayed and updated realtime from DOSBox.

To do this, simply play AITD at the same time room viewer is running. If everything is OK, you should view a white square with an arrow, this is player position.

Common issue: if AITD has been started with administrator rights, room viewer will not be able to see DOSBox process. To fix this, run room viewer with administrator rights (or run AITD without administrator rights).

Warp actor

When the game is linked to DOSBox, it is possible to change the position of an actor using drag and drop. Hold left mouse button while mouse is on an actor. Move cursor (keeping left mouse button pressed) and right click to warp (you can do this multiple times). Then, release left mouse button. It is also possible to manually edit position of an actor by right clicking on it or by pressing numpad keys :

Key Description
4 6 move actor left / right
8
2
move actor down / up
7 9 rotate actor left / right
0 hold it while pressing the numpad keys above to update at a higher rate

Actor slot swap

When the game is linked to DOSBox, you can swap two actors slot positions this way :

  • Highlight an actor
  • Press X
  • Type a number between 0 - 49 (with keypad or alphanumeric keys)
  • Press Enter

Multi-monitor setup

It's not possible to have the viewer running fullscreen and at same time focus to be on another window (eg: the game itself). One solution is to play the viewer in window mode (by pressing Alt + Enter)

Building it from the source

You can use any recent version of but Unity 5.5.4p3 is recommended.

Model viewer

Installation

Copy the following files to GAMEDATA folder:

  • LISTBODY.PAK, LISTANIM.PAK
  • LISTBOD2.PAK, LISTANI2.PAK (AITD1 only)
  • ITD_RESS.PAK (for palette)
  • CAMERAxx.PAK (for palette, JITD only)
  • TEXTURES.PAK (Time Gate only)

Commands

Mouse Description
Wheel zoom in / out
Left button click on model and drag to rotate it
Middle button move model
Right button show options menu
Key Description
change model

change animation
Shift hold it while pressing or to skip 10 models at once
Space change model folder (Edward or Emily)
B bounding box mode (default / cube / max)
Esc quit (only in fullscreen mode)

Shortcuts

Key Description
D details high / low
R camera auto rotate mode
E show extra information
A enable animation
X export current model to OBJ format
Shift + X export all models to OBJ format
Tab switch to room viewer

OBJ export

To view models properly you have to create custom shaders. Here is the custom materials that can be created under Blender :

shadeless (vertex colors)

flowchart LR
color("<b>Color Attribute</b>")
output("<b>Material Output</b>")

color--> |Color / Surface| output

noise

flowchart LR
color("<b>Color Attribute</b>")
image("<b>Image Texture</b><br>noise.png")
output("<b>Material Output</b>")
mix("<b>Mix</b><br>Color<br>Multiply<br>Factor 0.5")

color --> |Color / A| mix
image --> |Color / B| mix
mix --> |Result / Surface| output

You can use this white noise texture

glass (transparency)

flowchart LR
color("<b>Color Attribute</b>")
output("<b>Material Output</b>")
transparent("<b>Transparent BSDF</b>")

color --> |Color| transparent
transparent --> |BSDF / Surface| output

In Material properties (right tab), set "Blend Mode" to "Alpha Blend"

metal_vertical / metal_horizontal (gradients)

flowchart LR
tex("<b>Texture Coordinate</b>")
sep("<b>Separate XYZ</b>")
mul("<b>Math</b><br>Multiply<br>Value 5.0")
ping("<b>Math</b><br>Ping-Pong<br>Scale 1.0")
add("<b>Math</b><br>Add<br>Value 0.5")
gamma("<b>Gamma</b>")
color("<b>Color Attribute</b>")
output("<b>Material Output</b><br>Surface")

color --> |Color| gamma
tex --> |Window / Vector| sep
sep --> |X / Value<br>or<br>Y / Value| mul
mul --> |Value| ping
ping --> |Value| add
add --> |Value Gamma| gamma
gamma --> |Color / Surface| output

texture_a / texture_b (Time Gate only)

flowchart LR
image("<b>Image Texture</b>")
output("<b>Material Output</b>")

image --> |Color / Surface| output

aitd-roomviewer's People

Contributors

arnaud33200 avatar tigrouind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aitd-roomviewer's Issues

feature requests

  1. Can I ask you to make more detailed models processing, to get something like https://pastebin.com/ic9EWn7W when loading a model? // I have no unity to make this
  2. Is it possible to make export models to .obj or .blend file?

Missing files

Hello,
first of all: Thanks for creating this asset.

I tried to use it but there is no bms file included so I can't select it with QuickBMS as instructed in the readme file. Did I do something wrong or is the readme file possible outdated?

Kind regards

Robert

Warp not working on AITD 2 ?

Hello sir, i wanted to reverse AITD2 (my favorite game when i was a kid lol), i have issue with IDA 6.8 (decompiling dos game output sux...) then i found your AITD roomviewer, good job on this =D, i knew free in the dark but the source code is extremly hard to understand, lack of documentation and to be honest alone in the dark, even old it is very hard to reverse when you have no idea "what it is"...

Like the "models" it's a bullshit list of vertex lol, who da fuck do that in 2018 xD.
So i'm having a little issue right now, this is linked with dosbox on alone in the dark 2 (cd-rom) version, downloaded from Abandonware (i'm french), there is the nice view of the actor and all but i simply can't warp the actor.

Pressing the keyboard input does nothing.

Is this even implemented for AITD2/3 ?

Also congratz again on the work of the software it's very well done but why unity instead of a visual studio c# software ? (maybe your preference xD).

Also if a day you want to improve this software i would recommend the ability to "rotate" the camera in ANY AXIS a kind of orbital camera like in 3ds max, render the actor with their corresponding model (reduced-size version), display more understandable information, because when checking "flags" and "Life" it's kinda weird, the display of the life is wrong if it's the actor health, i have 30K health but it display 200 or something, remember that this is (if i remember) an uint_16.

Thank you Tigrou, (it was my first pet lol).

Lately, but happy new year too =d.

Loading backgrounds

Hello,
I forked your project and I would like to know how to load backgrounds. Is there a reference documentation somewhere?

Thank you.

Unable to load models

When I attempt to use the program, it only loads a blue screen. Pressing Tab only shows a black screen. The right click menus still appear, but none of the assets load.

I'm using the files from the original English DOS version of Alone in the Dark. I put the listbody files in \GAMEDATA\LISTBODY, the listanim files in \GAMEDATA\LISTANIM, and the etage files in \GAMEDATA\ETAGE. And still nothing appears.

Time Gate Knight Chase compatibility

Thanks a lot for this tools!
I was wondering if it would be easy to setup for another game called Knight's Chase?

I talked with one developer of this game, he said it's the same motor as alone is the dark, the game has the same "ETAGEXX.pak" files.

When I try nothing is display, but I can still change the level (E0R0, E1R0, ...)
The model viewer works for some listbody though

let me know how difficult would it be to adapt this tool to this game, I might be able to help :)

Models Not Working When Edited?

Hi there, Tigrouind.

I'm quite fascinated by your work on previewing the rooms and models from AITD.

I was planning on writing my own model exporter to convert models from Autodesk 3DS to AITD.

I have noticed that when I first open the program, everything works fine - the rooms and models.

When I edit any of the models using a hex editor, save the changes, and return, I can clearly see them.

However, when I stop running the Unity program, and return to the models, they no longer exist.

It appears that Unity cannot find the directory, even though it clearly exists.

I have found that the only work around is to make a new "GAMEDATA" folder with a different name, and change that name in the source code so Unity can see the new folder with the same data in it.

I was wondering if it may be possible to fix this bug, so I can use the same folder, and make changes without this hassle?

Thank you in advance.

is there a way to rip textures with this tool?

Hi again! you might remember me from our last talk about the 3d models. it works for me but I noticed it only rips the models and not the textures so I was wondering if there might be a solution to rip not only the sprites from those games but also the textures? would be really nice to save those!

Colors Look Off + Stops at Model 26

After the update, it has been working for me, however the colors are a bit off, for example: Edward's skin looks orange-y. Also, for some reason the model viewer stops at model 26 and I can't switch to Emily by pressing Space.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.