I've temporarily deleted that larger example from the github repository I wrote some of that a while ago when I was still designing the map engine and I'm afraid I never updated it for some key changes so it doesn't behave correctly anymore. I'm really sorry about this failure.
I'd reccomend building upon the simpleExample instead for now - the map-engine.mjs interface it uses should be good enough for most things.
Edit: easier fixes than I thought: 1. Change the update function (line 92) so the parameters are this.camera.x, this.camera.y and this.camera.zoom (i.e. without the square brackets around the x and y) 2. add this.spriteSystem.takeInput(); anywhere in the start function
With these two changes it should work BUT I'm not going to put it back on GitHub for now as IMO it's not the best way to do things, the simpleExample (whilst it covers a few less features) is a better starting point at the moment.
That's not an error I've seen, please could you post a sample project that produces it and I'll take a look?
My map engine should support any (positive) tile size and any number of layers.
At a guess - "-929892776" sounds like the wrong file is being read for the map - possibly the cellscript is wrong or you're trying to load the original .rmp file at runtime rather than the .mem file that the cell script will turn it into.
Could this older machine perhaps run miniSphere 4.x? that should run on somewhat older machines and whilst no longer supported should be a bit better to work with than Sphere 1.5 I'd think.
Still a work in progress but I've been a writing a combined tutorial for modern Javascript and Sphere v2.
Would be interested in any thoughts, latest version can be seen here - note the documents aren't linked together they're just all in the same folder of this gitbhub repo - they're formatted with markdown so should be easy to read directly on GitHub:
Bad news I'm afraid regarding the miniSphere build for macOs. It appears that a new security feature of some kind in macOs High Sierra breaks it. (The error message you'll get is "can't find system font")
The build should still run fine on macOs Sierra though.
For anyone who's at the bleeding edge with macOs I'll try and find a way around this but not really sure what the answer is yet - it may have t have an installer or the answer may be that I just to put the system folder inside the app bundle - and change the path handling to expect this.
For now sphereRun is still usable, so if you're ok with having to launch everything from the command line it's all good... (I assume apple doesn't apply security to unix style applications in the same way they do to app bundles)
Didn't want to make another thread to ask this, but does Sphere support looping audio by reading metadata? I've always wondered how do deal with the problem of looping music.
As far as I know there is no built in feature for reading metadata.
BUT you can achieve the same effect as long as you use a seekable sound format (such as Ogg).
Sphere v2 soune objects have a writeable position property. Or if using the v1 api there's the setPosition Method and the getPosition method.
You would need to seperately store values for loop points somewhere then have an update script/function that checks the position of the current sound and if it has reached the loop point sets the position to wherever its meant to loop from.
This would be quite a simple system to make in Javascript - let me know if you'd like more detailed guidance.
I recently updated from 4.5 to 5.0.1 so I already know I'm going to run into a heap of issues with the project I'm working on. I got the cellscript working and have a successful build, but I'm getting errors in my main script when importing my own modules. I'm sure there is a lot of nuance and order that is over my head, so is there an example demo that I could view? I've looked at the getting started tutorial and it helped a little bit, but I've got a small rat's nest that's gotta be sorted through.
Any tips on updating projects from the older version of minisphere? Any recommended reading would be great, too! Thanks!
This should probably be a topic in support rather than engine dev but
The getting started tutorial is horribly out of date right now...
One important change if moving from 4.x to 5.x is to get rid of uses of transpile() in your cell script - scripts should just be install()'ed with 5.x.
Also if using the import operator scripts need the extension ".mjs" rather than ".js".
If you need more specific help saying what error messages you're getting exactly and posting some of your code would make it easier.
If the problems are just with import then maybe read the MDN article on it: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import The common places I expect people to go wrong with it are: a) get the file path wrong (import expects relative paths) b) confuse default exports with other named exports c) try and use static import syntax in a dynamic way d) not use the .mjs extension that miniSphere requires
See the "Map Engine tutorial.md" file for a fairly brief getting started tutorial - it's a lot of files to put in your project but should hopefully be simple to use once in place.
Any questions let me know.
Note: this requires miniSphere version 5.0 (or later) it will not run with earlier versions and certainly won't run with Sphere 1.5.