Skip to main content

News

Topic: neoSphere 5.9.2 (Read 522118 times) previous topic - next topic

0 Members and 21 Guests are viewing this topic.
  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: minisphere 2.0b2 (stable 1.7.11)
Reply #870

I may have mentioned this above but const works now, thanks to a quick hack by the author to add it as an alias for var.


That is the single best thing. Man, I think that's it then, you've reimplemented Sphere (minus a few small things?)
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: minisphere 2.0b2 (stable 1.7.11)
Reply #871
Pretty much, yeah.  There are a handful of lesser-used APIs that I never bothered to implement such as Complex(), but otherwise nearly 100% of the Sphere API is there.  I even managed to add all the new stuff for 2.0 without changing the semantics of the legacy functions.  Of course that was only possible because Sphere doesn't have constructors. :)

Oh, and there are also a few regexes that don't work under minisphere because Duktape's parser is stricter to the ES standards than most engines.  Not much I can do there.
  • Last Edit: October 22, 2015, 11:23:26 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: minisphere 2.0b2 (stable 1.7.11)
Reply #872
Okay, I improved the path handling in the latest minisphere commit.  Fully rooted (absolute) paths are still allowed; however, a relative path like this:

Code: (javascript) [Select]

var image = new Image("../../../image.png");


will be rejected with a very clear error message ("SphereFS sandbox violation").  This is an improvement over Sphere 1.5, which I believe just says something stupidly vague like "invalid filename".
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.0b2 (stable 1.7.11)
Reply #873
Regarding compatibility, I discovered that this line in Blockman doesn't work:
Code: (javascript) [Select]
Debug.log("Can't deserialize: {?}", o.toSource(), LIB_ERROR);


It craps out with a "not callable" error because Duktape doesn't support .toSource().  Apparently that's a Spidermonkey-specific thing.  Duktape doesn't track source code for functions at all, even calling .toString() on a function just gives you an empty function body.

The debugger is such an awesome thing to have by the way, normally with Sphere I would have to drill down into the project tree to find the file (annoying when there are multiple levels of subfolders), then scroll to the correct line, instead I just let the debugger open the file and highlight the line for me. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.0b2 (stable 1.7.11)
Reply #874
Last-minute debugger feature addition: You can double-click any callstack entry while stopped at a breakpoint to see the values of variables in that function.  Unfortunately you can only Eval in the context of the topmost call, so you can only view primitive values in this case. :(

edit: Scratch that, Eval is supported now as well. :)
  • Last Edit: October 25, 2015, 02:39:48 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: minisphere 2.0.0
Reply #875
minisphere 2.0 is out! ;D

A few planned features got knocked off the checklist, but regardless this is still a very worthy upgrade.  The only thing I didn't get to yet was writing an API reference for Cell, but seeing as that API consists of exactly four functions, it shouldn't be a big issue.  I'll get to it eventually.

The debugger improvements are worth the upgrade alone--you can now view variables at any point in the call chain, not just from the currently executing function.  Plus you get some neat goodies like 16-bit and float support for Audialis, better integration of ArrayBuffers, and of course, the new S2GM format.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: minisphere 2.0.0
Reply #876
Remind me to try 2.0.0 on my OSX Mavericks this weekend!

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.0.0
Reply #877
Sure, you should be good as far as Allegro goes, I'm still using 5.1.11.  minisphere and Cell both build with no issues under Linux using SCons, so you should be good.  Unfortunately, single-step debugging is Windows-only for the moment because I haven't made a command-line debugger yet, so you need Sphere Studio for that.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.0.1
Reply #878
Just posted minisphere 2.0.1 which fixes a bunch of crashes and adds an API reference for Cell.  The installer has been improved somewhat, too.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.0.1
Reply #879
New feature in latest Git build: SetScreenSize() API allowing to change screen resolution on the fly.  No more ugly hacks modifying the .sgm and restarting. :P

edit: Sneak peak of what's in the pipeline so far for minisphere 2.1:

  • SetScreenSize(), mentioned above

  • Ability to run bare JS scripts from the command-line, e.g. msphere foobar812.js (script must have a game() function)

  • Better error message for invalid property access than "invalid base value"

  • Checked extensions for S2GM-based games: Specify required APIs in the manifest and the engine will check if they are supported on startup.


  • Last Edit: October 31, 2015, 08:44:41 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: minisphere 2.0.1
Reply #880
Regarding the checked extensions, you have to use an S2GM manifest first of all, and add a minimumPlatform object to it, like this:

Code: (javascript) [Select]

install(s2gm({
name: "Spectacles: Bruce's Story",
author: "Fat Cerberus",
summary: "Follow Scott Starcross in his quest to stop the Primus.",
resolution: '320x240',
script: 'scripts/main.js',

minimumPlatform: {
recommend: "minisphere 2.1 or later",
apiVersion: 2.0,
extensions: [
"sphere-legacy-api",
"sphere-obj-constructors",
"sphere-obj-props",
"sphere-map-engine",
"sphere-rng-object",
"sphere-s2gm",
"sphere-spherefs",
]
},
}));


The engine will then check for required extensions when loading the game, before any JS code is even executed.  This is better than leaving the requirements check completely up to script, as RequireScript()'d scripts may actually cause a runtime error before the check can be done if they use any extended functionality.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.0
Reply #881
In what must be the fastest turnaround for a release in minisphere history, even by my standards, minisphere 2.1 is now available for download! ;D

Now I think I'll take a much-needed break from my tireless work on the engine to work on Spectacles instead... It is, after all, the whole reason I started working on minisphere on the first place. :P
  • Last Edit: November 01, 2015, 11:06:59 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • FBnil
  • [*][*]
Re: minisphere 2.1.0
Reply #882
You say that... but I still get updates on the git pull.
Pretty impressive so far.
Found some time to play Blackfoot. Very nice block-pushing puzzle game.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.0
Reply #883

You say that... but I still get updates on the git pull.
Pretty impressive so far.
Found some time to play Blackfoot. Very nice block-pushing puzzle game.


Yeah, mostly it's just fixing little annoyances I run into while working on Specs.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 2.1.1
Reply #884
Quick update (2.1.1): JS errors are now more informative thanks to recent enhancements to Duktape.  Instead of a vague "invalid base value" or "not string", you now get "cannot read property 'foo' of undefined" or "number required, found string 'foobar'" and similar.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub