Compare commits
15 Commits
2c3aba3283
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7464150fe8 | |||
| 3aa6302f6d | |||
| 046247a1df | |||
| e7e11686f3 | |||
| ef1e01307c | |||
| c7d35c6761 | |||
| ed4751fa71 | |||
| a79e82891d | |||
| f070c32b88 | |||
| 1d6e3e871d | |||
| d295f43506 | |||
| 0cbb5fc447 | |||
| c4a78200d7 | |||
| d99e58b06c | |||
| 4dc21dc9a5 |
@@ -1497,9 +1497,18 @@ public class Game : MonoBehaviour
|
|||||||
|
|
||||||
GUILayout.Space(20f);
|
GUILayout.Space(20f);
|
||||||
|
|
||||||
|
if (
|
||||||
|
WorldDesc.url.Length >= 7 &&
|
||||||
|
WorldDesc.url.Substring(0, 7) == "file://")
|
||||||
|
{
|
||||||
|
serverHidden = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
serverHidden = GUILayout.Toggle(
|
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(
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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.V))
|
if(Input.GetKeyDown(KeyCode.V) && !Game.textInput)
|
||||||
moveCam = !moveCam;
|
moveCam = !moveCam;
|
||||||
|
|
||||||
if(!moveCam)
|
if(!moveCam)
|
||||||
|
|||||||
+59
-9
@@ -12,6 +12,14 @@ public class Game : MonoBehaviour
|
|||||||
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()
|
||||||
{
|
{
|
||||||
Camera cam = Camera.main;
|
Camera cam = Camera.main;
|
||||||
@@ -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, TopElemWidth * 3, TopElemHeight),
|
new Rect(TopElemWidth, TopElemHeight * 2, TopElemWidth * 3, TopElemHeight),
|
||||||
fileOpenUrl);
|
fileOpenUrl);
|
||||||
|
GUI.FocusControl("FileOpenTF");
|
||||||
if(GUI.Button(
|
if(GUI.Button(
|
||||||
new Rect(TopElemWidth * 4, 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user