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
+11 -2
View File
@@ -1496,10 +1496,19 @@ public class Game : MonoBehaviour
serverName = GUILayout.TextField(serverName, 45); serverName = GUILayout.TextField(serverName, 45);
GUILayout.Space(20f); GUILayout.Space(20f);
serverHidden = GUILayout.Toggle( if (
WorldDesc.url.Length >= 7 &&
WorldDesc.url.Substring(0, 7) == "file://")
{
serverHidden = true;
}
else
{
serverHidden = GUILayout.Toggle(
serverHidden, serverHidden,
"Hide This Game From List"); "Hide This Game From List");
}
if(!serverHidden) if(!serverHidden)
{ {
bool usePass = GUILayout.Toggle( 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> <hr>
<h1>building</h1> <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> 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> 1. configure the project: <pre>python waf configure [--mono_home=...]</pre>
2. build the project: <pre>python waf build</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> 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> 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; Quaternion originalRotation;
public bool moveCam = false; public static bool moveCam = false;
void Update() void Update()
{ {
if(Input.GetKeyDown(KeyCode.LeftAlt)) if(Input.GetKeyDown(KeyCode.V) && !Game.textInput)
moveCam = !moveCam; moveCam = !moveCam;
if(!moveCam) if(!moveCam)
+63 -13
View File
@@ -5,12 +5,20 @@ using UnityEngine;
public class Game : MonoBehaviour public class Game : MonoBehaviour
{ {
public GUISkin Skin; public GUISkin Skin;
const float TopElemWidth = 50f; float TopElemWidth = Screen.width / 19f;
const float TopElemHeight = 20f; float TopElemHeight = Screen.height / 38;
bool fileMenu = false; bool fileMenu = false;
bool fileOpenMenu = false; bool fileOpenMenu = false;
string fileOpenUrl = "http://gitea.moe/lamp/whirlds/raw/branch/master/Geiodo/bagels_skate_park.utw"; string fileOpenUrl = "http://gitea.moe/lamp/whirlds/raw/branch/master/Geiodo/bagels_skate_park.utw";
float fileOpenTimeout = 0f; float fileOpenTimeout = 0f;
public static bool textInput = false;
public void loadPrefs()
{
string openWhirldDefault = PlayerPrefs.GetString("openWhirldDefault", "");
if(openWhirldDefault != "") fileOpenUrl = openWhirldDefault;
}
public void Start() public void Start()
{ {
@@ -21,6 +29,8 @@ public class Game : MonoBehaviour
{ {
pE.emit = false; pE.emit = false;
} }
loadPrefs();
} }
public void Update() public void Update()
@@ -31,18 +41,15 @@ public class Game : MonoBehaviour
public void OnGUI() public void OnGUI()
{ {
CameraVehicle camveh = Camera.main.GetComponent<CameraVehicle>(); if(CameraVehicle.moveCam) return;
if(!camveh) return;
if(camveh.moveCam) return;
if(GUI.Button( if(GUI.Button(
new Rect(0, 0, TopElemWidth, TopElemHeight), new Rect(0, 0, TopElemWidth, TopElemHeight),
"File")) "File"))
{ {
if(fileMenu) if(fileMenu && !fileOpenMenu)
{ {
fileMenu = false; fileMenu = false;
fileOpenMenu = false;
} }
else else
{ {
@@ -53,6 +60,40 @@ public class Game : MonoBehaviour
{ {
ShowFileMenu(); 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() private void ShowFileMenu()
@@ -61,8 +102,7 @@ public class Game : MonoBehaviour
new Rect(0, TopElemHeight, TopElemWidth, TopElemHeight), new Rect(0, TopElemHeight, TopElemWidth, TopElemHeight),
"New")) "New"))
{ {
if(!GameObject.Find("WhirldBuffer")) onFileNew();
WhirldIn.ResetSpace();
} }
if(GUI.Button( if(GUI.Button(
@@ -78,7 +118,7 @@ public class Game : MonoBehaviour
if(GUI.Button( if(GUI.Button(
new Rect(0, TopElemHeight * 3, TopElemWidth, TopElemHeight), new Rect(0, TopElemHeight * 3, TopElemWidth, TopElemHeight),
"eXit")) "Exit"))
{ {
Application.Quit(); Application.Quit();
} }
@@ -86,12 +126,15 @@ public class Game : MonoBehaviour
private void ShowFileOpenMenu() private void ShowFileOpenMenu()
{ {
GUI.SetNextControlName("FileOpenTF");
fileOpenUrl = GUI.TextField( fileOpenUrl = GUI.TextField(
new Rect(TopElemWidth, TopElemHeight * 2, 300, TopElemHeight), new Rect(TopElemWidth, TopElemHeight * 2, TopElemWidth * 3, TopElemHeight),
fileOpenUrl); fileOpenUrl);
GUI.FocusControl("FileOpenTF");
if(GUI.Button( if(GUI.Button(
new Rect(TopElemWidth + 300, TopElemHeight * 2, TopElemWidth, TopElemHeight), new Rect(TopElemWidth * 4, TopElemHeight * 2, TopElemWidth, TopElemHeight),
"Submit")) "Submit") ||
Input.GetKeyDown(KeyCode.Return))
{ {
if(!GameObject.Find("WhirldBuffer") && fileOpenTimeout <= 0) if(!GameObject.Find("WhirldBuffer") && fileOpenTimeout <= 0)
{ {
@@ -100,7 +143,14 @@ public class Game : MonoBehaviour
WhirldIn wi = new WhirldIn(); WhirldIn wi = new WhirldIn();
wi.url = fileOpenUrl; wi.url = fileOpenUrl;
wi.Load(); 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", "OnSceneGenerated",
SendMessageOptions.DontRequireReceiver); SendMessageOptions.DontRequireReceiver);
} }
foreach (ParticleEmitter pE in UnityEngine.Object.FindObjectsOfType(typeof(ParticleEmitter)))
{
pE.emit = false;
}
//Success! //Success!
status = WhirldInStatus.Success; status = WhirldInStatus.Success;
@@ -261,6 +257,8 @@ public class WhirldIn : System.Object
{ {
Debug.Log("Whirld Loading Info: " + info); Debug.Log("Whirld Loading Info: " + info);
} }
PlayerPrefs.SetString("openWhirldDefault", url);
} }
public void ReadObject(Transform parent) 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