Spring Map Edit Revisted - Page 2

Spring Map Edit Revisted

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

User avatar
FabriceFABS
Posts: 354
Joined: 28 Jul 2010, 16:20

Re: Spring Map Edit Revisted

Post by FabriceFABS »

OK perfect, thank you !
User avatar
FabriceFABS
Posts: 354
Joined: 28 Jul 2010, 16:20

Re: Spring Map Edit Revisted

Post by FabriceFABS »

Plz consider 2 things actually :

For info, edit window is on left screen, useless, I didn't capture it.

1. SpringMapEditTesting.zip 0348b21f491adb40fd0720105651398d76d36735 works ok, main window is correct.
Costs more ressources, but menu acces are smooth.
Image

2. SpringMapEdit : Main window is bugged (already saw it in the past, was also the reason I got back to Testing version).
Costs 0 CPU ressource when IDLE, but menus are laggy.
Image
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

hm.. I've decided to start working on SME, and this newly maintained version seems to be a very decent starting point.

Some things I did:
-added an ant build script. It's really minimal atm but it could be cleaned up and used to separate release related stuff from dev related stuff automatically.
-Changed how LOD works, so that it now uses 4 LOD levels instead of 6 and a logarithmic distance scale instead of linear. I also simplified the LOD settings to use a single value (base LOD distance) instead of an array, fixed an issue where it would always override the saved LOD settings on startup, and increased the maximum LOD level from 100 to 200.
-Made the default lighting a bit less dim/awful.

The list of features that I'd like to implement/fix/change is ridiculously long. That includes things like improved camera controls, rendering, improved (single window) gui, changing/adding/removing brush types, adding support for editing/rendering mapinfo.lua settings, adding better features/interface for terrain and texture generation, and so on. I disagree with the idea that SME could just be some small, short term project (how many years of development does it represent already?!) and I think it definitely needs a github page.

Of course, if you don't want to create one then I can do it myself no problem, but it needs doing one way or the other.
User avatar
prandipadaro
Posts: 98
Joined: 19 Oct 2011, 22:38

Re: Spring Map Edit Revisted

Post by prandipadaro »

aeonios wrote:and I think it definitely needs a github page.
+1
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

Alright, my commits were backing up to the point where I started forgetting what I had even done, so I went ahead and made a github repository for it:

https://github.com/mtroyka/SpringMapEdit

If you want to commit something just fork and pull request. I added gitignore stuff for a few things, but if you're using a different IDE do add gitignore for any of your IDE-related fluff.

If you have an issue to report or feature to request (and I'm sure you do!) go ahead and do so (https://github.com/mtroyka/SpringMapEdit/issues). I'm sure that'll end up being a looong list so we might as well start now.

I also cleaned up a few things, removed support for 32bit (upgrade your fossils plz) and added a startscript for OSX (needs testing, may have other issues). There's still plenty of things that could be cleaned and organized but at least it's a start. I'm not posting any releases yet, but when I do I will probably mirror them on springfiles.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

If you want a mac tester, I've been long waiting for a way to compile a map I partially constructed previously, and I have even more ideas circling. How should I go about downloading?
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

I don't know if compiling maps would work, since apparently SME wasn't able to compile on linux, but maybe that was all just voodoo. I have no idea.

Anyway: https://github.com/mtroyka/SpringMapEdi ... /tag/1.3.1

here's a tentative release so you can at least test it.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

Forgive me, but I can't work out how to start it. I tried running start_macosx.sh with the terminal and got this error:

Code: Select all

/Users/Foo/Documents/Spring/SpringMapEdit.1.3.1_/SpringMapEdit1.3.1/start_macosx64.sh ; exit;
Foos-MacBook-Pro:~ Foo$ /Users/Foo/Documents/Spring/SpringMapEdit.1.3.1_/SpringMapEdit1.3.1/start_macosx64.sh ; exit;
-bash: /Users/Foo/Documents/Spring/SpringMapEdit.1.3.1_/SpringMapEdit1.3.1/start_macosx64.sh: /bin/sh^M: bad interpreter: No such file or directory
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...49 completed.

[Process completed]
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

hmm, it looks like it's trying to run a sh script in bash. Apparently osx has some derpy quirks about that: http://apple.stackexchange.com/question ... g-sh-files

so basically you have to type:
sh start_macosx64.sh

Edit:
If you cd to your SME folder and type:
chmod +x start_macosx64.sh

it sets executable privileges for the script, which may allow you to launch it just by double clicking.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

If you cd to your SME folder and type:
chmod +x start_macosx64.sh
Don't know why not.

This didn't work for me. However after running
chmod +x start_macosx64.sh
I met the following error:

Code: Select all

Foos-MacBook-Pro:SpringMapEdit1.3.1 Foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx2048m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
So I know that at least somethig is doing something here.

I'm scared this is a dependancy thing. So I'm going to check that and get back to you.

So, one thing at this point that would be really nice: Less dependancies :D

EDIT: I downloaded JOGL and SWT, guessing that I didn't already have them, however I don't know a) how to make them be found if they're needed, or b) If that is what's causing this error.

Being fairly new to development, I have little to no idea what I'm doing. So all help appreciated.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

That basically means that the script ran and tried to launch java, but java did not accept the arguments it gave. The specific error you got suggests that something is overriding java's minimum heap size and making it bigger than 2g (thus a max of 2g would be invalid). Try editing the script and changing the maxmem value to something bigger, like "4g" and see if it doesn't work.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

I did some playing around:

Code: Select all

Foos-MacBook-Pro:SpringMapEdit1.3.1 foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx4096m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Foos-MacBook-Pro:SpringMapEdit1.3.1 foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx2048M
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Foos-MacBook-Pro:SpringMapEdit1.3.1 foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx2G
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Foos-MacBook-Pro:SpringMapEdit1.3.1 foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx4G
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Foos-MacBook-Pro:SpringMapEdit1.3.1 foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx8G
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Foos-MacBook-Pro:SpringMapEdit1.3.1 foo$ sh start_macosx64.sh
: command not foundline 2: 
: command not foundline 5: 
Invalid maximum heap size: -Xmx3072m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Doesn't work if I reduce it either.

What about the other errors? (i.e. the command not found errors) Might they have any relevance?
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

Ok I fixed the issue for now, by editting the code to this:
alternate start script.txt
(1.01 KiB) Downloaded 13 times
(I couldn't straight upload the .sh file so I copied the text into this.)

However now I encounter the following errors:

Code: Select all

: command not foundline 2: 
: command not foundline 5: 
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Composite
	at application.SpringMapEditApplication.main(SpringMapEditApplication.java:61)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Composite
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 1 more
I can't make head or tail of this.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

ok now I sort of see the problem. It isn't loading the replacements correctly, ie it isn't replacing $maxmem with the value correctly, and it isn't replacing $lib with the library directory either. Basically the error you got said 'libraries not found'.

Some of the errors you're getting may be due to the fact that I edited the script in windows and it used the wrong line endings. Probably the easiest thing to do would be to replace all of the variables with the value like this:

Code: Select all

#!/bin/sh
java -cp springmapedit.jar:lib_osx64/gluegen-rt.jar:lib_osx64/jogl.jar:lib_osx64/swt.jar -Xms512m -Xmx4g -Djava.library.path=lib_osx64 application.SpringMapEditApplication
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

Ok, that worked a lot better, however I'm still getting errors:

Code: Select all

: command not foundline 2: 
: command not foundline 5: 
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at frontend.gui.SpringMapEditGUI.<init>(SpringMapEditGUI.java:121)
	at application.SpringMapEditApplication.main(SpringMapEditApplication.java:61)
I think this might just be an issue of that it can't find SWT at all (There is no 32-bit SWT for mac)
I've downloaded the 64-bit SWT library, but I'm not sure where to place it, and if I need to do any setup.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

They go in the lib_osx64 folder, and you only need the two jar files. It's possible that sme was using the wrong version of swt in the osx64 folder, which is something I'll fix.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

Yes - it must have been the wrong version of SWT. So I get further now, but stopped by this error:

Code: Select all

***WARNING: Display must be created on main thread due to Cocoa restrictions.
Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access
and then it flows on to more errors.

This link might be of relevance:[link]http://stackoverflow.com/questions/7904 ... pse-helios[/link]
I tried just appending -XstartOnFirstThread to the last line, but that didn't work.

The link suggests another method for getting it to work, however I'm not quite sure that it's the problem here - because the path specified in the start script is to swt.jar not swt-debug.jar. I tried swt-debug.jar though, because it was just swt.jar not working for me, but that threw the same error.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

hmm.. note that you have to append -XstartOnFirstThread to java's arguments and not to sme's arguments, as in:

Code: Select all

java -cp springmapedit.jar:lib_osx64/gluegen-rt.jar:lib_osx64/jogl.jar:lib_osx64/swt.jar -XstartOnFirstThread -Xms512m -Xmx4g -Djava.library.path=lib_osx64 application.SpringMapEditApplication
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: Spring Map Edit Revisted

Post by MasterBel2 »

Ok, that works, no errors thrown, however I get no window. It starts, Java opens up (now window, just appears in dock), and after five or so seconds it comes up as not responding in the task manager (under the name SWT, if that helps). The computer seems to be doing something with it, as the memory and cpu allocation goes up and down. Or maybe I'm drawing too much of a conclusion. No crash, just nothing.
aeonios
Posts: 202
Joined: 03 Feb 2015, 14:27

Re: Spring Map Edit Revisted

Post by aeonios »

Urg. What about the terminal? If you're not getting a terminal window however you happen to be launching it (does double-click work?) then launch it so that you get one and can see the output. It should be saying something after it runs the java command.
Post Reply

Return to “Map Creation”