17 Commits

Author SHA1 Message Date
VIA256 7464150fe8 Merge branch 'main' of https://gitea.moe/VIA256/marsxplr-decomp 2025-12-18 15:16:53 -08:00
VIA256 3aa6302f6d game: don't show games that use locally hosted "file://" whirlds in the server list 2025-12-18 15:16:38 -08:00
VIA256 046247a1df Update links.txt 2025-12-18 15:44:42 -05:00
VIA256 e7e11686f3 inform about self hosted build requirements in README.md 2025-12-18 15:20:41 -05:00
VIA256 ef1e01307c Update links.txt 2025-12-18 15:14:35 -05:00
VIA256 c7d35c6761 rename links.md to links.txt 2025-12-18 15:06:39 -05:00
VIA256 ed4751fa71 Update links.md 2025-12-18 15:06:03 -05:00
VIA256 a79e82891d Update links.md 2025-12-18 15:05:25 -05:00
VIA256 f070c32b88 add links.md for documentation relevant to the projects development 2025-12-18 15:05:00 -05:00
VIA256 1d6e3e871d editor: add keyboard controls 2025-12-17 23:03:28 -08:00
VIA256 d295f43506 editor: save url of last opened whirld 2025-12-17 14:25:14 -08:00
VIA256 0cbb5fc447 editor: show fancy particle entrypoint 2025-12-16 21:57:05 -08:00
VIA256 c4a78200d7 editor: close file menu upon clicking submit to open whirld 2025-12-16 21:52:41 -08:00
VIA256 d99e58b06c editor: add keybinds.txt 2025-12-16 21:23:28 -08:00
VIA256 4dc21dc9a5 editor: disable all key commands when text is being entered 2025-12-16 20:38:05 -08:00
VIA256 2c3aba3283 editor: change moveCam toggle key to 'V' to make room for utility bar left-alt keybinds 2025-12-16 19:34:31 -08:00
VIA256 fef065eddf editor: scale gui sizes with Screen resolution 2025-12-16 19:33:55 -08:00
7 changed files with 110 additions and 22 deletions
+9
View File
@@ -1497,9 +1497,18 @@ public class Game : MonoBehaviour
GUILayout.Space(20f);
if (
WorldDesc.url.Length >= 7 &&
WorldDesc.url.Substring(0, 7) == "file://")
{
serverHidden = true;
}
else
{
serverHidden = GUILayout.Toggle(
serverHidden,
"Hide This Game From List");
}
if(!serverHidden)
{
bool usePass = GUILayout.Toggle(
+3 -1
View File
@@ -4,8 +4,10 @@ My amatuer attempt at decompiling Mars Explorer so that it can be improved to ru
<hr>
<h1>building</h1>
Pretty much all of the game in terms of functionality has compilable source now, but the runtime code is still a work in progress.<br>
Building the project requires the mono mcs compiler and libraries, a c compiler, and python.<br>
Building the project requires the mono mcs compiler and libraries, a c compiler*, and python.<br>
1. configure the project: <pre>python waf configure [--mono_home=...]</pre>
2. build the project: <pre>python waf build</pre>
If the build is successful, you should be able to find a bunch of dlls in the directory marsxplr_build\Mars Explorer_Data.<br>
To test the build, can copy the contents of the built Mars Explorer_Data dir into the Mars Explorer_Data dir of your own personal Mars Explorer install in place of the original files.<br>
<br>
*: c compiler is only required if you intend to build with the option --self_hosted=yes<br>
+23
View File
@@ -0,0 +1,23 @@
== THE BIG BOOK OF EDITOR KEYBINDS ==
W in moveCam mode: move forward
A moveCam: strafe left
S moveCam: move backward
D moveCam: strafe right
Shift moveCam: move down
Space moveCam: move up
Ctrl moveCam: move faster
V enable/disable moveCam
Ctrl-N new whirld
Ctrl-O open whirld
Ctrl-Q quit editor
+2 -2
View File
@@ -22,11 +22,11 @@ public class CameraVehicle : MonoBehaviour
Quaternion originalRotation;
public bool moveCam = false;
public static bool moveCam = false;
void Update()
{
if(Input.GetKeyDown(KeyCode.LeftAlt))
if(Input.GetKeyDown(KeyCode.V) && !Game.textInput)
moveCam = !moveCam;
if(!moveCam)
+63 -13
View File
@@ -5,13 +5,21 @@ using UnityEngine;
public class Game : MonoBehaviour
{
public GUISkin Skin;
const float TopElemWidth = 50f;
const float TopElemHeight = 20f;
float TopElemWidth = Screen.width / 19f;
float TopElemHeight = Screen.height / 38;
bool fileMenu = false;
bool fileOpenMenu = false;
string fileOpenUrl = "http://gitea.moe/lamp/whirlds/raw/branch/master/Geiodo/bagels_skate_park.utw";
float fileOpenTimeout = 0f;
public static bool textInput = false;
public void loadPrefs()
{
string openWhirldDefault = PlayerPrefs.GetString("openWhirldDefault", "");
if(openWhirldDefault != "") fileOpenUrl = openWhirldDefault;
}
public void Start()
{
Camera cam = Camera.main;
@@ -21,6 +29,8 @@ public class Game : MonoBehaviour
{
pE.emit = false;
}
loadPrefs();
}
public void Update()
@@ -31,18 +41,15 @@ public class Game : MonoBehaviour
public void OnGUI()
{
CameraVehicle camveh = Camera.main.GetComponent<CameraVehicle>();
if(!camveh) return;
if(camveh.moveCam) return;
if(CameraVehicle.moveCam) return;
if(GUI.Button(
new Rect(0, 0, TopElemWidth, TopElemHeight),
"File"))
{
if(fileMenu)
if(fileMenu && !fileOpenMenu)
{
fileMenu = false;
fileOpenMenu = false;
}
else
{
@@ -53,6 +60,40 @@ public class Game : MonoBehaviour
{
ShowFileMenu();
}
if(fileOpenMenu)
{
textInput = true;
}
else
{
textInput = false;
}
//handle utility keybinds
if(textInput) return;
if(Input.GetKey(KeyCode.LeftControl))
{
if(Input.GetKeyDown(KeyCode.N))
{
onFileNew();
}
else if(Input.GetKeyDown(KeyCode.O))
{
fileMenu = true;
fileOpenMenu = true;
}
else if(Input.GetKeyDown(KeyCode.Q))
{
Application.Quit();
}
}
}
private void onFileNew()
{
if(!GameObject.Find("WhirldBuffer"))
WhirldIn.ResetSpace();
}
private void ShowFileMenu()
@@ -61,8 +102,7 @@ public class Game : MonoBehaviour
new Rect(0, TopElemHeight, TopElemWidth, TopElemHeight),
"New"))
{
if(!GameObject.Find("WhirldBuffer"))
WhirldIn.ResetSpace();
onFileNew();
}
if(GUI.Button(
@@ -78,7 +118,7 @@ public class Game : MonoBehaviour
if(GUI.Button(
new Rect(0, TopElemHeight * 3, TopElemWidth, TopElemHeight),
"eXit"))
"Exit"))
{
Application.Quit();
}
@@ -86,12 +126,15 @@ public class Game : MonoBehaviour
private void ShowFileOpenMenu()
{
GUI.SetNextControlName("FileOpenTF");
fileOpenUrl = GUI.TextField(
new Rect(TopElemWidth, TopElemHeight * 2, 300, TopElemHeight),
new Rect(TopElemWidth, TopElemHeight * 2, TopElemWidth * 3, TopElemHeight),
fileOpenUrl);
GUI.FocusControl("FileOpenTF");
if(GUI.Button(
new Rect(TopElemWidth + 300, TopElemHeight * 2, TopElemWidth, TopElemHeight),
"Submit"))
new Rect(TopElemWidth * 4, TopElemHeight * 2, TopElemWidth, TopElemHeight),
"Submit") ||
Input.GetKeyDown(KeyCode.Return))
{
if(!GameObject.Find("WhirldBuffer") && fileOpenTimeout <= 0)
{
@@ -100,7 +143,14 @@ public class Game : MonoBehaviour
WhirldIn wi = new WhirldIn();
wi.url = fileOpenUrl;
wi.Load();
fileOpenMenu = false;
fileMenu = false;
}
} else if(Input.GetKeyDown(KeyCode.Escape))
{
fileOpenMenu = false;
fileMenu = false;
}
}
}
+2 -4
View File
@@ -249,10 +249,6 @@ public class WhirldIn : System.Object
"OnSceneGenerated",
SendMessageOptions.DontRequireReceiver);
}
foreach (ParticleEmitter pE in UnityEngine.Object.FindObjectsOfType(typeof(ParticleEmitter)))
{
pE.emit = false;
}
//Success!
status = WhirldInStatus.Success;
@@ -261,6 +257,8 @@ public class WhirldIn : System.Object
{
Debug.Log("Whirld Loading Info: " + info);
}
PlayerPrefs.SetString("openWhirldDefault", url);
}
public void ReadObject(Transform parent)
+6
View File
@@ -0,0 +1,6 @@
- slideshow abt unity 5.x internals
https://www.slideshare.net/slideshow/unity-internals-memory-and-performance/35909332
- unity pro for ppc machine. perhaps get this running on an old machine or vm and try ripping scenes/assets from it
https://www.macintoshrepository.org/15255-unity-pro
- info on godot engine architecture:
https://docs.godotengine.org/en/4.4/contributing/development/core_and_modules/index.html