Skip to main content

News

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

0 Members and 5 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #360
And here's a screenshot. ;D
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 #361
Are you going to create that as an offshoot project from Sphere Studio? Because, I didn't want plugins to be belong with the same source as the editor. (besides the official plugins, of course). Your sound player I do consider an official plugin for fulfilling the role of a sound tester, because I think it needed one. Other than that, this hex editor is optional and I want to start seeing separated community uploaded plugins.

So, you could create a new topic I guess with the download. Installing a plugin for an end user only requires they put the DLL into the /plugins sub-directory and any associated DLLs into the root folder.
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

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Radnen's Sphere Studio v1.1.7.0
Reply #362
Looks super neat! I was wondering if you could highlight things in the Sphere files (like headers, image data etc.) with special colors, and indicate in the status bar what the selected value exactly is. Heck, could even go as far as popping up a little image if you selected graphics data inside one of the Sphere files.

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Radnen's Sphere Studio v1.1.7.0
Reply #363
I decided to give Sphere Studio another shot in Wine again, just to see how far I come! Well, I've got good news and bad news.



The editor opens! And it looks the way it should! There are no issues with the visuals other than tooltips not appearing (instead, the main window loses focus in order to focus on this invisible tooltip.) Actually - just noticed it sometimes does show the tooltip, but the content of it lags behind and would show the content of the previous thing I pointed at. It also disappears pretty quickly (less than half a second).

Whenever I try to open the Editor Settings, I am confronted with a runtime error:
Code: [Select]
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.MissingMethodException: Method not found: 'System.Collections.Generic.IReadOnlyDictionary`2<System.String,Sphere.Core.Editor.StyleGroup> Sphere.Core.Editor.StyleSettings.get_Styles()'.
   at SphereStudio.Forms.EditorSettings..ctor(SphereSettings settings)
   at SphereStudio.Global.EditSettings(IDEForm parent)
   at SphereStudio.IDEForm.OpenEditorSettings(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
(omitted unless you need them)


I can just click "Continue" and SpheStu won't crash, but it obviously won't open the settings either.
The Game Settings and New Project menu options do work.

Now here comes the biggest issue!



Once I've opened a project (which works without a hitch), I can't open any files! None whatsoever!
The New File and Open File icons in the toolbar don't work either. When I try to create a new file using the context menu instead, I get this:



Finally, Open Game Directory and the context menu item Open In Explorer do absolutely nothing. I expected Wine Explorer to open.

So it's almost functional on Wine. Much better than before, no crashes or graphical glitches or anything, just things that silently refuse to work now.
  • Last Edit: April 04, 2015, 07:33:47 am by DaVince

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Radnen's Sphere Studio v1.1.7.0
Reply #364
Looks like it's not loading the plugins for some reason.

As for the hex editor, I was going to propose it as an official plugin only because the current default is to open unrecognized files in the script editor, which is dangerous if a user opens a binary file and accidentally hits save (even if no explicit edits are made--which I believe is why I removed the wildcard from the script plugin originally).  My hex plugin opens read-only by default for this very reason.

It's up to you, but keep in mind the current approach is a disaster waiting to happen. :P

Edit: There's also the issue of the WeifenLuo DockPanel dependency.  Unfortunately neither of us ever fixed that issue, and I don't want to release an external plugin with an explicit dependency on it, since if you ever decide to use a different docking library or a DockPanel update itself includes breaking changes, the plugin will break.
  • Last Edit: April 04, 2015, 10:21:32 am 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 #365

Looks super neat! I was wondering if you could highlight things in the Sphere files (like headers, image data etc.) with special colors, and indicate in the status bar what the selected value exactly is. Heck, could even go as far as popping up a little image if you selected graphics data inside one of the Sphere files.


That would be very neat, but that's a job for another plugin, I think.  This is basically just meant to fill the role of a default binary file editor, nothing super-fancy.
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 #366

As for the hex editor, I was going to propose it as an official plugin only because the current default is to open unrecognized files in the script editor, which is dangerous if a user opens a binary file and accidentally hits save (even if no explicit edits are made--which I believe is why I removed the wildcard from the script plugin originally).  My hex plugin opens read-only by default for this very reason.


Yeah, but I'm unsure on how to handle other filetypes.

I think what should happen next for the editor is to have plugins interact with a sphere-studio file associations section in the settings menu. A plugin registers the filetype to Sphere (and automatically links the defaults) and then you can go into that associations menu and move filetypes around between plugins. Plugins with wildcards get free reign over all filetypes you give them.

I'll comp it up, give it a spin and see how it goes.

Then we won't need the hex editor as a default with Sphere Studio. If you install it, you can go into the file associations settings tab and move associations over to it at your own discretion.

@DaVince:

Manually open the editor.ini and add/replace this key-value pair:
Code: (txt) [Select]

plugins=FontEditPlugin,ImageEditPlugin,MapEditPlugin,ScriptEditPlugin,SoundTestPlugin,SpritesetEditPlugin,TaskListPlugin,WindowstyleEditPlugin
  • Last Edit: April 04, 2015, 05:52:09 pm by Radnen
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 #367
No problem, I made a separate branch for hex editor development, so it'll be easy to split it off without causing merge issues.  I do have to do something about that Weifen Luo dependency though...
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 #368
I'm solving the problem of plugins requiring Weifen Luo right now. I'm creating a descriptor shim, that offloads the dependency to a descriptor. I then use this descriptor editor-side to do work. That means plugins no longer have to worry how their controls get docked. They just tell the editor what and how to do it.

It was bad design of me to give the power of the weifen luo forms to each plugin. I should have done this early on. :(

Edit:
1. I'm rewriting the script auto header tool to take "auto-fields".
2. I'm also moving presets to the presets folder rather than the root.
3. I'm also adding weifen luo as a sole dependency to the editor as a NuGet package rather than as a binary with the source (and removing it from all existing plugins).

When I'm done I'm bumping this to v1.2.0 and removing the last digit from the versioning. I hate MS's versioning structure, the 3-group is perfect for small open source projects.
  • Last Edit: April 04, 2015, 06:28:23 pm by Radnen
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 #369

When I'm done I'm bumping this to v1.2.0 and removing the last digit from the versioning. I hate MS's versioning structure, the 3-group is perfect for small open source projects.


Agreed, semantic versioning with three components is easier to understand than using all four elements.  For minisphere, I reserve the fourth number as the "build number"--which is really just the ordinal of the Git commit it was built against. :-)
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 #370
Ah man it was a lot of work! So not only did I need to create a descriptor shim, but I had to do a lot of other crap just to get other things to work right like setting the name of the tab text, or updating the style on script editors.

See, when I added WeifenLuo as a required dependency, I kinda gave the plugin creator full free reign over their DockContent. That means peaking at other dock contents too and other weird things that should not be allowed. I must say, adding restrictions requires writing lots more code than giving full access. <sigh>.
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 #371
Yes, now you see that encapsulation is hard.  It's the biggest thing that turns me off of OOP, and why I prefer C over anything else (save for JS, which is awesome)--not having classes means I'm not pressured into trying to encapsulate out of the gate--I can put it off and not have to worry about breaking everything horribly when I do decide to change, since things can more easily be phased in.
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 #372
I guess I'll hold off on further development of the hex editor plugin until you finish your changes, since I imagine this is going to affect the plugin manager API in a major way.

My name is Mr. Wilson and I'm here to say
I'm gonna smack your ass in a major way
What are you doing in my basement? Get outta here!
GET OUTTA HERE!!!
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 #373
Does there exist a method in .NET to find out if the OS is 64-bit capable?  This way we could have it try to run engine64.exe if the machine is 64-bit.  Either that or allow other filenames than engine.exe, since currently even if you select a different executable it automatically changes the filename to engine.exe.
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 #374

Does there exist a method in .NET to find out if the OS is 64-bit capable?  This way we could have it try to run engine64.exe if the machine is 64-bit.  Either that or allow other filenames than engine.exe, since currently even if you select a different executable it automatically changes the filename to engine.exe.


No method, but I use this hack in SphereStudio:

Code: (csharp) [Select]

(IntPtr.Size == 4) ? "x86" : "x64"
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