Skip to main content

News

Topic: The Sphere Studio v1.2.1 (Read 200320 times) previous topic - next topic

0 Members and 3 Guests are viewing this topic.
  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Radnen's Sphere Studio v1.1.7.0
Reply #405
Two active developers on this editor = awesome. Which leads me to something that's going to make me sound like a broken record... but how feasible is it to get this compiling on Mono at this point so this whole thing can become cross-platform? I'm really eager to use this on Linux, y'know! :P

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #406
Can Mono be installed on Windows alongside the .NET Framework?  If so I could do some testing of my own.  Not sure how good .NET 4 support is in Mono...
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Radnen's Sphere Studio v1.1.7.0
Reply #407
I do believe you can do that, yes. As for .NET support, this is currently happening. I also know for a fact that there is winforms support already, at the very least.

Some of the libraries probably need an update or some changes to work.

I'm always prepared to run the program through Mono on Linux and report the results. (I'm getting a TargetInvocationException right now, could provide details, but maybe you'll get the same messages once you try Mono on Windows.)

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Radnen's Sphere Studio v1.1.7.0
Reply #408
Lord English: I hate what you've done to the editor.

You've made it awesome. I hate awesome things... not! It's amazing! The configuration selection feels like it's from Visual Studio - a nice touch. Later, I'm going to update the system for managing configurations since it's a little clunky which one you are editing and it's not easy to overwrite an old config with a new version (or straight-forward in any case).

I'm also still not done with the 'script' header section. I'm trying to figure out a good place to put it. Ultimately it must be tied to the currently active script plugin (which it's not). So, I'm going to rework the whole concept. I want to make a script header system that uses the game.sgm file and the current script plugin to provide consistent and clean script headers.

I'd also want to go through and update the editors from fonts to windowstyles. They are still a bit clunky for being from the version 1.0 era.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #409
Haha, for a second there I was worried you were serious. :P  Then again, that's why version control exists. ;). But yeah, I was going for a Visual Studio feel for the configuration selection.  I felt the x86/x64 selector was needed, since it's good to test a game on both platforms.

Have you tried the new minisphere installer perchance?  It preconfigures the editor for you with presets for minisphere, and selects Console by default.  That should go a long way towards making Sphere more accessible to newbies.

Since you're going to be making changes now, I guess I'll make a branch so I can work on some changes of my own.  Unless that was a hint...? :)

edit: Tell you what, I'll work on the GUI refresh on a separate branch (gui-overhaul) and merge it in when it's done.  This way it minimizes potential merge issues in case you make changes in the meantime.
  • Last Edit: July 03, 2015, 11:39:15 pm by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #410
@Radnen:
Since you hate awesome things so much, here:
https://github.com/Radnen/spherestudio/commit/8326b31d246b719851ad7abb5daec10187e485ef

Remember how I was working on a hex editor plugin a while back?  Well, I ended up stopping because the editor didn't have a way for multiple plugins to register a wildcard (*) handler without clobbering one another.  Now it does. :D

It always surprises me how little of the internal plumbing I have to change to support features like this.  The plugin manager was well designed.
  • Last Edit: July 04, 2015, 02:19:53 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Radnen's Sphere Studio v1.1.7.0
Reply #411
So guys, some good stuff is cooking up for this editor. I'm going to set up milestones toward a version 2.0 of this editor. At the end, it'll have full project management features.

You'll have a .ssuser file which contains the settings for your currently opened files and other local settings. This file does not get sent to a a project's repository.

Then you'll have a .ssproj file which is like a .vcproj file which contains everything a collaborator needs to build the project, even NuGet-like packages we discussed about. When you build the project with my editor it'll seek out and download nay linked dependencies. No more coping threads.js or link.js for your projects. :)

Speaking of building a project, Sphere Studio 2.0 will have a project pipeline. Everything will be written to a /dist folder. The game.sgm no longer is distributed with the project source anymore. Sphere Studio will generate that file on build. The /dist folder does not get sent to the repository. This build system will eventually support file processors like minification, sprite sheeting, font generation, etc. In this way the stuff you do distribute is perhaps of a lighter weight than the source.

The tandem of .ssuser and .ssproj files will make it easy to collaborate with others on a project.

Another module I'd love to add by 2.0 is a git integration. It's most likely going to be bare bones and require you to have git-scm.exe installed on your computer and in your PATH (like tortoise git and others) (it'll have push/pull and branch switching and merging and ability to set user info). But that's still some ways off.

I'd love to wait and surprise you all, but it is an open source project so some of you would see it all coming anyways. :P
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #412
I think what we should do for now is finalize the preset and settings handling to get the bugs out of that, so 1.2.0 can be released.  Then start on the 2.0 changes.

Oh, and also I still have to do some testing on Mono. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Radnen's Sphere Studio v1.1.7.0
Reply #413
Well I went ahead with user settings saving anyways. I figured it can be fairly standalone since it's not crucial to the whole pipeline concept, plus I really wanted to store currently opened files.

It's on a branch called user-settings.

This was actually extremely difficult to program, because WeifenLuo DockForms is a crappy, very terrible interface. I kept running into stupid issues with it when it comes to ActiveDocument, which should never happen. Currently if you close a project with no tabs open, it must open the start page even if you never wanted it to show. You can close it afterwards, regaining an empty screen, but you can't load it as an empty screen. This to me makes no sense.

It was also hard to figure out when to save the opened documents. Too late and they are disposed, and there was never too soon. It turned out I aggressively disposed the content panes too soon. Once I figured that out, I was able to retrieve the opened filenames. There is still some wonkiness with the last human-viewed file, but I think many quirks were ironed out.

Also closing documents when switching projects was a pain because at that point I needed to add a 'are you sure?' dialog to any unsaved files. I didn't want the system to store opened documents of another project into your current .ssuser project file. So I had to make sure the files were all closed - definitely closed - before loading another project.

The organization is terrible, however. Next step is to clean it up, which is tedious, time consuming and mind-numbing.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

Re: Radnen's Sphere Studio v1.1.7.0
Reply #414
This was actually extremely difficult to program, because WeifenLuo DockForms is a crappy, very terrible interface.


WeifenLuo DockForms was coincidentally the showstopper for me every time I tried to get the editor working under Mono.

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Radnen's Sphere Studio v1.1.7.0
Reply #415
Nice ideas. This sounds super excellent and like it'd bring Sphere back into the modern world of game development.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #416
@Radnen: I like refactoring, I could take a stab at the cleanup. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Radnen's Sphere Studio v1.1.7.0
Reply #417
I have now merged user-settings into master. If you want to do the refactoring, you can. What I want to see is a proper interface for handling opened projects and user settings. Basically, I want to reduce the # of lines in the IDEForm.cs file by offloading some of the management stuff to dedicated classes than trying to do it all at once there. Though I will say it can get a bit convoluted.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #418
So I got Mono set up on my main development machine, and I see that TargetInvocationException mentioned by DaVince, which is in reality a boxed ArgumentException thrown, ultimately, by the System.Drawing.Icon class.

The stack trace is interesting: I was about to trace the crash back to this line:
Code: (csharp) [Select]
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));


Apparently Mono doesn't like the Sphere Studio icon for some reason...

Here is the bit in the Mono source itself that's throwing the exception:
Code: (csharp) [Select]
//Determine the AND array size
numBytesPerLine = (int)((((bih.biWidth) + 31) & ~31) >> 3);
int andSize = numBytesPerLine * iconHeight;
iidata.iconAND = new byte [andSize];
nread = bihReader.Read (iidata.iconAND, 0, andSize);
if (nread != andSize) {
string msg = Locale.GetText ("{0} data length expected {1}, read {2}", "AND", andSize, nread);
throw new ArgumentException (msg, "stream");
}


edit: Okay, I got it past that by re-rasterizing the SVG and making a new .ico (768x768 Win10 icon, yay!).  I'm guessing Mono got tripped up by the 64x64 image in the original .ico file.  However, now I get a different exception, matching what FJ said above: It crashes with an ArgumentException from System.Drawing whose root cause traces back to a WeifenLuo call made in IDEForm.CloseAllDocuments().  Having done a bit of research, it appears there might be no way around this, at least for the time being--DockForms uses PInvoke internally to call into the Win32 API.

edit 2: Weird, apparently as of DockPanel 2.6, Mono should be fully supported (drag and drop would be disabled there since that's where all the PInvokes are used), yet it's clearly not working here.
  • Last Edit: July 07, 2015, 02:36:03 pm by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Radnen's Sphere Studio v1.1.7.0
Reply #419
Apparently, "the incompatible features are automatically disabled at runtime", according to a comment in the top answer. I guess SpheStu might be using an incompatible feature?

I really appreciate that you're checking it out on Mono, by the way. :)