Skip to main content

News

Topic: Sphere 5.5.1 (miniSphere) (Read 415148 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.1
Reply #1875
Well, because it's an executable file.  For unsigned executables it's based on a popularity check: If very few people have downloaded it, it warns you as a kind of "proceed with caution".  If a bunch of people have downloaded it without it being flagged as a virus then you don't get the warning.

I think the idea is to combat zero-day attacks.

I wouldn't mind the warnings as much if the "Run anyway" button wasn't hidden from view by default.  Firefox and Chrome do the same thing when they block downloads, but at least in that case it's usually based on an actual virus detection rather than a popularity contest. ::)
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: miniSphere 4.8.1
Reply #1876
Have you ever had that issue when downloading QtSphere IDE?

Also, I noticed an issue with the new Sphere Studio version. I generally have my project tree on the left side, but whenever I restart Sphere Studio, it resets it back to the right.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.1
Reply #1877
You only get the warning for files that came from the internet.  Locally-sourced files (or if you clear the "came from the internet" attribute) won't get blocked unless Defender actually picks up a virus.

Regarding the project tree: I moved it to the right by default because that's how MSVC is set up in a fresh install.  But I haven't figured out how to get it to save the layout if you customize it :(
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: miniSphere 4.8.1
Reply #1878
Ah, alright.
I thought I remember Sphere Studio remembering the location.

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: miniSphere 4.8.1
Reply #1879
I wouldn't mind the warnings as much if the "Run anyway" button wasn't hidden from view by default.
I'm sure it's hidden exactly because the whole zero-day security thing wouldn't work if they didn't obscure it, and then it would defeat the whole purpose of the dialog box. Design through common human behavior and all that.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.2
Reply #1880
miniSphere 4.8.2 is up and finally fixes the SoundStream bug.  Yay!
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Rhuan
  • [*][*][*][*]
Re: miniSphere 4.8.2
Reply #1881
Not really complicated, just tedious.  I'd basically have to wrap almost all of the SpiderMonkey API in C functions that could be called from miniSphere's C code.  That's part of why I'm trying to isolate the script layer as much as possible from the actual engine code (which has mostly been accomplished, save for the map engine), so that only the files directly related to running JS code need to be updated, stuff like image handling, etc. don't have to be touched.
I was having a look around at details about different JS engines when I was bored earlier today. I suddenly noticed a contender that isn't talked about much, apple's JavaScriptCore:
1. Its compatibility with ES6 is higher than V8 and Spidermonkey: https://kangax.github.io/compat-table/es6/
2. It actually wins the speed tests on are we fast yet: https://arewefastyet.com/
3. It has an available pure C interface: https://karhm.com/JavaScriptCore_C_API/

I found just two downsides:
1. The license is LGPL not BSD/Mozilla - I think this should be ok, from my read of the LGPL you can static link against an LGPL library without importing the LGPL to the rest of your project as long as you make clear that the library is LGPL and provide a link to its license and source.

2. The documentation isn't great... The tutorial I linked above is the best I can find at the moment with some googling.

  • Rhuan
  • [*][*][*][*]
Re: miniSphere 4.8.2
Reply #1882
Possible bug, though I'm still using 4.7: Shape#draw() (with no parameter) appears to cause a hard crash. (replacing with Shape#draw(screen) removes the crash - but the api documentation says the parameter is optional AND obviously it should throw a missing parameter error not crash if it's not an optional parameter.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.2
Reply #1883
Possible bug, though I'm still using 4.7: Shape#draw() (with no parameter) appears to cause a hard crash.

I can confirm, engine crashes if no surface is specified.  As for whether it's optional, I'm actually a bit confused here.  The documentation says "if surface is omitted, draws to the backbuffer", however the signature of the function is listed as:
Code: [Select]
Shape#draw(surface[, transform]);

Only the second parameter is optional.  I'm thinking the signature is right and the description is wrong, as a surface is required for Model#draw() also.  I could make it optional, but it's currently required for Prim() calls as the first parameter so that'd be kind of awkward.  I'll see.  In any case, I'll definitely fix the crash.

edit: The miniSphere source code is the final authority and it indicates the surface parameter was intended to be optional.  It was just bugged: internally there's a real image_t object representing the backbuffer, but miniSphere tried to draw to NULL if the surface argument is omitted, hence the crash.  It's fixed in the latest build.
  • Last Edit: August 17, 2017, 11:30:14 pm by Fat Cerberus
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: miniSphere 4.8.2
Reply #1884
@Fat Cerberus
Yay an update!
Did you increase the minimum window resolution that makes the engine run in 2x scale windowed mode? My game runs at 480*270 and it was on a small window just now before I updated. I actually like the 2x better anyways.
And on that note, is there any chance we could use filters for windowed mode again sometime, like in the old Sphere 1.x days? I really like the 2x soft-ish look, always reminds me of playing chrono trigger on my emulator.

Also, just updated and getting an error when I try to enter Configuration Manager:


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.NullReferenceException: Object reference not set to an instance of an object.
   at SphereStudio.Ide.Forms.ConfigManager.UpdatePluginsList()
   at SphereStudio.Ide.Forms.ConfigManager..ctor()
   at SphereStudio.Ide.IdeWindow.menuConfigManager_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.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.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Sphere Studio
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Sphere%20Studio.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2104.0 built by: NET47REL1LAST
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2103.2 built by: NET47REL1LAST
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
SphereStudio.Base
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/SphereStudio.Base.DLL
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2046.0 built by: NET47REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.16.0.0
    Win32 Version: 2.16.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
AudioPlayerPlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/AudioPlayerPlugin.dll
----------------------------------------
ClassicSpherePlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/ClassicSpherePlugin.dll
----------------------------------------
Sphere.Plugins
    Assembly Version: 1.2.1.0
    Win32 Version: 1.2.1
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Sphere.Plugins.DLL
----------------------------------------
FontEditPlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/FontEditPlugin.dll
----------------------------------------
ImageEditPlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/ImageEditPlugin.dll
----------------------------------------
LegacySpherePlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/LegacySpherePlugin.dll
----------------------------------------
MapEditPlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/MapEditPlugin.dll
----------------------------------------
miniSphereGdkPlugin
    Assembly Version: 4.8.2.2246
    Win32 Version: 4.8.2.2246
    CodeBase: file:///C:/Program%20Files/miniSphere/ide/Plugins/miniSphereGdkPlugin.dll
----------------------------------------
ScriptEditPlugin
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0

Edit:
When I try to test-run my new projects (as in, games I didn't migrate from Sphere 1.x), I get this error:
Code: [Select]
setting up Cellscript environment...
evaluating 'Cellscript.mjs'...
   E: ReferenceError: identifier 'describe' undefined
   @ [Cellscript.mjs:13]
1 error(s), 0 warning(s).
================== Failed to build: Legend ==================

These are lines 13 to 23 in Cellscript.mjs (I haven't changed anything in them after the update):
Code: [Select]

// describe the game we're building.  this gets written to the game manifest
// (game.json) at the end of the build.

describe("Legend", {
version: 2,  // Sphere v2
author: "East",
summary: "",
resolution: '400x300',
main: 'scripts/main.js',
});
  • Last Edit: August 18, 2017, 10:18:31 am by East

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.2
Reply #1885
Uninstall, and reinstall 4.8.2.  There was a bug in the original 4.8.0 installer that installed a DLL in the wrong place and screwed everything up, and Inno Setup won't remove misplaced files if you just do an upgrade.  You'll need to do a full uninstall to get rid of the old cruft.

Also go into %LOCALAPPDATA% and delete "Spherical" and "Sphere_Engine_Group" folders to ensure you have a clean slate.

As for the scaling, I changed the scaling algorithm in 4.8.  Previously it would do a 2X scale if the game was 400x300 or less.  The new algorithm actually compares the game resolution to the real screen resolution and scales accordingly.  I did that because low-res games ended up being really tiny on HiDPI screens otherwise (think 4K monitor, 3840x2160).
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.2
Reply #1886
The Cell API changed a bit a few versions ago, I'm not sure exactly how much changed though since I don't know which version you had before.  Here's the current template, sans comments:

Code: [Select]
import { transpile } from 'cell-runtime';

Object.assign(Sphere.Game, {
name: "{0}",
author: "{1}",
summary: "{2}",
resolution: '{3}x{4}',
main: '@/bin/main.js',
});

transpile('@/bin', files('src/*.mjs'));
transpile('@/bin', files('src/*.js'));

install('@/images', files('images/*.png', true));
install('@/music',  files('music/*.ogg', true));
install('@/',       files('icon.png'));

That should hopefully let you see what needs to be changed to get it working again.
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: miniSphere 4.8.2
Reply #1887
Everything works perfect now. Thanks :)

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 4.8.3
Reply #1888
miniSphere 4.8.3 is up with a bunch of bug fixes (including two engine-crash bugs), under-the-hood improvements, and a new function, FS.relativePath():
https://github.com/fatcerberus/minisphere/blob/v4.8.3/docs/sphere2-core-api.txt#L555-L560
Sphere 5.5.1 - miniSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Rhuan
  • [*][*][*][*]
Re: miniSphere 4.8.3
Reply #1889
What are your thoughts on adding typescript support to cell?

So far I've stuck with writing ES5 javascript and not using a transpiler but I've noticed I'm frequently checking my type consistency and having built in type checking would probably save me quite a bit of time.

**I note that I've just read back and found that you had a negative of few of Typescript's type system a few months back, could it be in cell as an option for people who want it?