Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee

Post Reply 
Amnesia Multiplayer (THEORY)
Author Message
Spelos Away

Posts: 231
Joined: Sep 2014
Post: #1
Amnesia Multiplayer (THEORY)

Hey guys,
so, we all know that I'm very quick to jump on an unrealistic and very hard to achieve idea or a goal. And yes, a lot of the times I fail to deliver.


The theory of this one is fairly achievable. And while I'm probably not going to even attempt this LARGE LARGE project, I'm going to leave it here for public eyes, because there might just be someone skilled or better yet, a team of skilled people, who might very well try this interesting idea out.

While I'm sure people thought about this many times, I'm certain there is no way to modify HPL2 into networking support. Not without almost unending help from Frictional Games. That's why I thought about alternatives.

There are many Game Engines that are free to use have solid APIs and have a reliable and free networking support or some kind of plug-in package.
For this purpose, I picked Unity 3D. A free game Engine (has its paid versions, but none of those features are important for this project) that has a very simple Networking plugin that is able to connect two computers via either open port or some kind of local network simulation software such as Tunngle. Where one player is a host and the other are clients.

While that's all fine and dandy, there are some deep structural problems arising. How do you actually get around having Amnesia in Unity?

First, let's think about maps and models.

As many of you know, maps in Amnesia are stored in an XML-like format that is very readable for programs. C# (a language that can be used in Unity) has GREAT support for XML structured documents and can read it very well.

So the first important base stone of the Amnesia Unity Multiplayer interpreter is something like: "mapReader.cs". That would be responsible for reading:
- Which entities & static_objects are included in a map and might create some sort of Array that will be eventually passed to another theoretical file I'll mention later.

- The exact placement (coordinates along with rotation and scale) of every object. Here, some test would have to be ran in order to achieve the right scale and coordinate. Unity has its own "Unity Units" where from what I've seen 4 Amnesia units are 2 Unity units, which could be used to generate an offset that would be taken into consideration in yet another file we would create.

- Light data. Now, Unity has the same PointLight, SpotLight, BoxLight form that would, however, need to be adjusted yet again to resemble at least barely Amnesia. HPL2 does render lights differently, which would slightly effect the visuals. (but I think it's a good trade off)

- Any areas, billboards, particles and additional things in maps.

Now that the mapReader.cs would read the map as XML it's time for some sort of "modelCrawler.cs" that would crawl through Amnesia's path and grab all the models required. Unity does indeed support .dae file as well as .fbx with quite an ease. Pretty much all static objects are Unity-ready.

Problem might arise with entities, since they have one more file. the ".ent" file. That is yet another target for an XML reader. While we could perhaps grab just some info from the .ent file such as mass or the body type, we cannot really generate a low poly mesh collider from the information. (it is possible, but I haven't tried it). Information like mass or body type, will be used by Unity's physics system, which has very similar variables.

along with modelCrawler.cs and something like entityConstructor.cs, we get into one of the LARGEST and biggest problems of this theory


This would mean (and there is no way around it) re-writing all Amnesia's functions for Unity. That would be the singe most complicated and time consuming thing. I won't even go in-depth with this part, since I would have to write a book about it to fully cover the topic.

Which actually brings me to some sort of conclusion:
It's unrealistically hard to achieve it. It is not impossible, but it's very hard.

Have you thought about this topic yourself? What did YOU come up with?
(This post was last modified: 09-24-2016 05:01 PM by Spelos.)
09-24-2016 05:00 PM
Find all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #2
RE: Amnesia Multiplayer (THEORY)

I have previously thought about creating some kind of mockup engine to render Amnesia's assets outside of HPL. What got me the idea was a third party Level Editor, which would be written more natively to the OS and include extra features and probably fix some of the bugs and inconveniences as well. Basically all it would do is use its own renderer to display the .dae files and such, and otherwise just read and write XML files for .map, .ent etc. Of course, you'd need to fully understand how all the XML files are structured to be able to recreate one that HPL can also read, which is a challenge, but far from impossible.

I sometimes thought about attempting such a project myself, perhaps mostly to learn from it, but I've never actually decided to try. The closest I made was this thing just for fun.

As for networking, it would be a much larger task as it would have to almost incorporate both my idea + more, but I don't see it as impossible. But then again, actually adding networking support to HPL itself isn't impossible either - just highly unlikely and not worth the effort. I think the "worth the effort" is the only real obstable for these ideas.

(This post was last modified: 09-24-2016 05:58 PM by Mudbill.)
09-24-2016 05:58 PM
Find all posts by this user Quote this message in a reply
Post Reply 

User(s) browsing this thread: 1 Guest(s)