Skip to main content


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rhuan

Projects / Re: Sphere 6502 emulator
Glad I could help - I'm almost always happy to spend time optimising code :)

Nice to see this running smoothly at high FPS now.
Engine Development / Re: miniSphere 5.1.3
MacOS release of 5.1.3 link here until @Fat Cerberus uploads a copy:
Articles / WIP: Sphere v2 Tutorial
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:
Engine Development / Re: miniSphere for Mac (with link)
I now do macOS builds for most releases of miniSphere which are posted in the main miniSphere topic so closing this.
Engine Development / Re: miniSphere 5.1.0
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)
Sphere General / Re: Proper way of using Sphere?
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.
Engine Development / Re: miniSphere 5.0.1
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!
This should probably be a topic in support rather than engine dev but :P

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".

Here's a link to a simple example project in miniSphere 5.0, very early demo of my remake of Kefka's Revenue (mostly just showing off the map engine I've made):

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:
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
6/10 not enough pigs
Should I make some kind of performance test involving a herd of pigs?
This has moved from a project to a usable library now I think, new topic:,1529.msg11018.html#new
Libraries / MapEngine for Sphere v2
This is still an alpha version I suppose but really needs some usage so I can know what else to do with it.

Feels good enough to share as a release of sorts now rather than just a project.

See the "Map Engine" 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.
Projects / Re: Project ZeC (My Zelda-esque Clone)
The zip file is too large to post in the forum.
Upload it with drop box or sendfile or something OR maybe make a github repository for it?
The Map Engine should now be usable - more polishing to do and more features coming also more documentation is coming...

But the code is all on github so you can take a look, if anything's not obvious feel free to ask.
Sphere General / Re: Proper way of using Sphere?
And yeah, I've peeked into the Discord. Looks like you guys talk about stuff related to developing the engine that I can barely make sense of.
Sorry that's probably my fault :(

As for examples of modules, can I push my Map Engine and related files - all modular and all Sphere v2 code - have a read of the code:
Sphere General / Re: Proper way of using Sphere?
miniSphere 5.0 is about to be released (due date the 31st) in which the Sphere v2 api will finally be stable additionally I'm hoping that the modules I've been working on to go with it will provide a good base for a game (though no one other than me has tested them yet).

Previously with the Spherev1 api there were two basic means of working:
1. Use the mapEngine, have anything else you wanted to happen regularly go in the update script and render script and store key data as global objects.
2. Don't use the mapengine (as it's not suited to your project) set up your own loop with an update stage and a render stage etc.

With Sphere v2
1. The engine now provides the loop
 - it has an update stage for logic a render stage and a dispatch stage (for handling one-offs)
2, I'm hoping that my Map Engine script can replace the v1 mapengine, it's intended to be more flexible and give more control - also for more complex maps it should run faster as there are fast less calls between JS and C
3. Generally with v2 globals are discouraged, run all your code as modules with their own seperate scopes, hand anything you need to share around as parameters.

Hellos and Byes / Re: Hello all, from a mac user
Always good to see new members, welcome to spheredev.

Firstly on macOs support - miniSphere's source is fully macOs compatiable, just the provided makefile is not and you need to sort out some dependencies before you can build it; I have an xcode project that does it but it's just rather messy so I haven't posted the project, I'm intending to make a clean version at some point to be added to the github repo but it hasn't been my priortiy; I've only done macOs Sierra builds as Sierra is what I use and I've had almost no interest from anyone else in the mac version; I could make a build for an older version of macOs if you'd like? (will be most of a day until I can do it as I'm about to go to work).

On your other questions:
1.Android support is an idea, it could be a reality in maybe a year's time - it's no ones priority right now and would require this to be resolved first:

2. Raspberry pi I don't think we've even thought about - it should be possible but would need someone to do some work to make it work.

3. Depends what you mean by packaging - my current build of miniSphere is designed to be dev friendly - it runs with it's "system" resources in a folder with it so (so you can look at them etc) it's not quite the macOs dream of a drag and drop .app - your game can be packaged as one file that can then be opened with miniSphere on a different computer (or shipped in the same folder as miniSphere and named so miniSphere will auto-open it on launch) - with some minor tweaks to the source of miniSphere (literally two lines) I could make it work as .app bundle with the game inside it - that version wouldn't be so usable for development but I do intend to add such a version in the future as an extra build for releasing games with.

4. There's not much, the Sphere community seemed to dry up quite badly over the last couple of years we're hoping to give it a new shot of life shortly with all the new features coming in miniSphere 5 as well as some work I'm doing on a library of modules that should make game development with modern style JS easier/more intuitive - demo videos could be something for us to do over the next few weeks.

(note when I say "we" above at the moment miniSphere effectively has two developers @Fat Cerberus and me - Fat Cerberus writes the miniSphere code and I find problems with it for him to fix + make it work on macOs + sometimes help fix things + write lots of JS that I'm hoping will be a useful standard lib of sorts to go with it)