Skip to main content

News

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

0 Members and 17 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.4.4
Reply #1500
ES6 is awesome:
https://github.com/fatcerberus/spectacles-i/blob/master/lib/kh2Bar.js

Classes and default parameters are great to have (I wouldn't give them up for anything now), and import/export is much nicer than the module.exports finagling in CommonJS/Node-style modules.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.4.4
Reply #1501
miniSphere 4.4.4 will probably be the last release for a while.  I have a long list of stuff I need to accomplish for v5.0, so I'd like to get started on that.  I don't like to do large refactorings in a patch cycle, so a 4.4.5 is unlikely to happen once I start adding 5.0 features to the codebase.

I originally wanted to implement ES6 support in the engine that works even without Cell, but Duktape is not fast enough to do transpilation on demand every time, so I'd need to implement a caching system or something.  So it's better to wait for the next major release to do that (see remark above on refactoring during a patch cycle).
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • FBnil
  • [*][*]
Re: miniSphere 4.4.4
Reply #1502
Thanks! Will take it for a spin.

Re: miniSphere 4.4.4
Reply #1503
Now that QSI feels like it isn't going to implode with the slightest touch, I'm going to start getting into the nitty gritty stuff. So just to make sure, is miniSphere still fully compatible, and will it continue to be fully compatible with the legacy map engine, even for miniSphere generation projects?

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.4.4
Reply #1504

Now that QSI feels like it isn't going to implode with the slightest touch, I'm going to start getting into the nitty gritty stuff. So just to make sure, is miniSphere still fully compatible, and will it continue to be fully compatible with the legacy map engine, even for miniSphere generation projects?


Yes and yes.  I'm planning a new JS-based map engine for miniSphere 5.0, but the legacy functions and map engine aren't going anywhere for the foreseeable future.  The Vanilla API is considered deprecated in its entirety though--so don't expect any new features to be added to it, just bug fixes and compatibility tweaks where necessary.  All the work now is going into Sphere v2/Pegasus.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: miniSphere 4.4.4
Reply #1505
Alright, awesome. I just didn't want to put a lot of effort into it to find out that it was on its way out.
And  minisphere/src/minisphere/map_engine.c has been a huge help so far :P

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.4.4
Reply #1506
I started a repository for the first Sphere library designed specifically for use with miniSphere.  It's an overhaul of my Kingdom Hearts HP meter:
https://github.com/fatcerberus/kh2bar

I'll give it some proper documentation soon.  It also needs some updates to play more nicely with newer stuff like the Dispatch API, but it's certainly usable now for those so inclined.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.4.4
Reply #1507
Regarding that kh2Bar, here's a screenshot of it in action.
  • Last Edit: February 15, 2017, 02:34:23 am by Fat Cerberus
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.0
Reply #1508
Since I have a long laundry list of stuff to do for 5.0 and it's looking more and more like I won't make the March 28 deadline (i.e. second anniversary of v1.0), I decided to do an interim v4.5 release with all the minor changes I've made.  This version has a lot of small breaking changes to the API, so be sure to review the release notes before upgrading.  I think I'm finally getting close to finalizing the Sphere v2, so hopefully there won't be much more of this kind of thing needed.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.2
Reply #1509
miniSphere 4.5.2 adds support for the .mjs filename extension which will eventually be used in Node.js for ES6 modules.  Cell's behavior for transpile() has changed to match: script.js will get compiled as a normal script (which is Sphere 1.x compatible), while script.mjs gets compiled as a module and therefore supports the import and export keywords.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.2
Reply #1510
I have to say, I love ES6 in Sphere, even if it requires a build step for now.  Combined with all that Sphere v2 brings to the table, I haven't enjoyed writing Sphere code this much in a long time, and I've finally started working on my battle engine again.  I'm currently going through and converting all my constructor/prototype definitions to classes and having a blast doing it.  Classes, arrow functions, template strings, import/export... there's just so much awesome stuff!

Besides ES6, so far I would have to say my favorite Sphere v2 feature is named colors.  With Sphere 1.5, with color-heavy code, I always ended up getting overwhelmed with CreateColor() calls, because it's not always easy to visualize what color a given RGB triple represents without actually running the game.  With named colors, the X11 palette has so many options that there's almost always a predefined color that serves the purpose, and that makes for much more readable code.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: miniSphere 4.5.2
Reply #1511
So JS modules get a different extension? Interesting. I hope this doesn't complicate things for text editors. (Syntax highlighting et al.)

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.2
Reply #1512
Yeah, that was what the Node.js team decided on.  The reason is that the semantics differ quite a lot between modules and regular scripts (automatic strict mode, global variables and functions are module-local, import/export aren't allowed in non-modules, etc.), so having a different extension lets tools be able to tell what mode to use to compile the code.  It helps me out too, since now the same transpile() Cellscript function can handle both Sphere v1 .js scripts as well as .mjs modules, which is awesome for migration.

There's a running joke in the JS community that .mjs stands for MichaelJacksonScript. :P

There is a problem with text editors not recognizing the extension as JS code, but I expect that will get better in time especially once a version of Node.js is available supporting JS modules.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.2
Reply #1513
There are some bugs in the debugger when using transpiled ES6, where breakpoints don't always work.  I know of two cases where this happens for sure: when using generator functions, and class properties (get/set).  This happens because Babel's "retainLines" feature glitches out and appends the accessors to the end of the class instead of where they actually are in the source.  No code is placed on the lines where the property implementation originally is, so the breakpoint is never hit.  Unfortunately there's nothing I can do to work around the bug for now; I have to wait for a fix upstream.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.3
Reply #1514
I added .mjs module support to Cell in the latest release (4.5.3).  Also fixed a bug which caused from.Object() to not enumerate any properties.
  • Last Edit: February 28, 2017, 08:26:06 pm by Fat Cerberus
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub