Marathon Unity

Discuss and unveil current Marathon projects.
User avatar
Posts: 3
Joined: Feb 19th '17, 13:14
Location: Bellevue, WA

Hey Alex!

I guess this is a bit late but I just stumbled across this thread :lol:

This appears to be run fine on windows (tested against Windows 10: Build: 18362.356)

However I did run into a few issues.

-After initially loading a Shapes file it became unresponsive, but after relaunching the shapes file was still selected and everything worked fine

-Sometimes after teleporting I fall through the map geometry

-Elevators don't appear to be functioning (not sure if they should be yet or not)

This is rad though! keep it up :wub:
"Violence is the last refuge of the incompetent" -Isaac Asimov
User avatar
Posts: 1948
Joined: Jan 29th '06, 03:51

Don't hold your breath. It's been a year since it was worked on.
User avatar
Posts: 1
Joined: Jun 13th '20, 14:46

Shame that this is abandoned. Could've been a Daggerfall Unity-style revamp of Marathon.
User avatar
Posts: 1830
Joined: Oct 12th '07, 22:08
Location: California

If I'm not mistaken some parts of this are being used in the development of a new Unity-based map editor.

I'm probably mistaken though. I usually am.
User avatar
The Man
Posts: 1125
Joined: Aug 6th '08, 05:23
Location: Sarasota, FL

In this case, though, you’re not. I’m not sure how much of the code Deram wound up using though, and Forge+ is only intended to be a map editor (though that’s not stopping someone else from potentially taking it and running with it).
“People should not be afraid of their governments. Governments should be afraid of their people.” —V, V for Vendetta (Alan Moore)

“The trouble is that we have a bad habit, encouraged by pedants and sophisticates, of considering happiness as something rather stupid. Only pain is intellectual, only evil interesting. This is the treason of the artist: a refusal to admit the banality of evil and the terrible boredom of pain. If you can’t lick ’em, join ’em. If it hurts, repeat it. But to praise despair is to condemn delight, to embrace violence is to lose hold of everything else. We have almost lost hold; we can no longer describe happy man, nor make any celebration of joy.” —Ursula K. Le Guin, “The Ones Who Walk Away from Omelas”

“If others had not been foolish, we should be so.” —William Blake, The Marriage of Heaven and Hell

“The law cannot protect anyone unless it binds everyone; and it cannot bind anyone unless it protects everyone.” —Frank Wilhoit · Marathon Chronicles · Marathon Eternal 1.2 · Where Monsters Are in Dreams · YouTube Vidmaster’s Challenge
Born on Board
Posts: 28
Joined: Jul 18th '18, 22:45

Munity uses plane clipping to handle overlapping geometry.

I use stencil buffer portals and layers to separate the polygons that occupy the same space in unity.

Separate the polygons or groups of polygons into two or more layers and the stencil shader portals separate the polygons visually.

The portals are quads and have a stencil shader attached to do the clipping.

The enemy, scenery and items have a stencil shader attached to the sprites when inside the 5D space.

Player and enemy layers change when crossing a portal.

Player and enemy layers change to that polygons layer when entering a portal then change to default layer when exiting a portal.

The layers are not able to collide, but can collide with default layer.

Player and enemy in different layers can't attack each other unless one or both is default layer.

The stencil buffer hides the geometry and sprites when not viewed from behind a portal.

For example the map 5-D space needs 30 portals and 2 layers.
Born on Board
Posts: 28
Joined: Jul 18th '18, 22:45

I have an idea on how to continue this project.

Program a automatic portal system using the stencil buffer and use code from Hopper's 5-D Intersections plugin for Weland.

Here is how I would program automatic portals.

Check for 5D space intersections and ignore those polygons that intersect, then build map.
Next put the 5D space polygons into a list and check for nearest neighbor.
Next different lists are made then continue checking nearest neighbor.
Next check nearest neighbor until there are no more, then there are two or more groups.
Next build the 5D space polygon groups from the lists.
Next if a 5D space polygon portal wall connects to a polygon that is not on the group list then build those portal walls.
Next flip the normals on the portal walls so they point outward from the polygon group.
Next put stencil shaders on the 5D space polygons and stencil shaders to the portal walls.
Next assign reference numbers to the different groups stencil shaders, different number for each group.
Next both portal walls and 5D space polygons of the same group share the same reference number.
Next the 5D space polygons stencil shader comparison function is set to equal and the portal walls are set to always.
Next change the render queue for each group, render queue is different for each group. (important)
Next check the 5D space polygon groups if they intersect with each other and assign them to different layers.
Next two groups of intersecting polygons are separated into two layers, if three groups intersect then three layers.
Next assign layer 8 scripts to layer 8 portals and layer 9 scripts to layer 9 portals.

The layers are changed so they do not interact with each other.

When the player is a certain distance in front of the portal then the player changes layers to match that group.

I don't know exactly how to make this and I'm not an expert in C#. ... ct.986004/
Post Reply