Skip to main content

News

Recent Posts

1
Sphere General / Re: Proper way of using Sphere?
Last post by Fat Cerberus -
Yes, miniSphere supports .mod (and .it, .xm etc.) through allegro.  It doesn't support mp3 however, or MIDI.
2
Sphere General / Re: Proper way of using Sphere?
Last post by Beaker -
Looping music, in particular mp3, has it's issues because of how the format is designed.  The fundamental problem occurs because of this:



You can read further into that if you want here, and while there are ways around it for mp3, it's flaky.  Some engines like Unity can get around it by accounting for the delay and padding programmatically/doing processing on the music file (this is more like what Rhuan was saying with changing the position).

To get looping working for music, the best way is to render it into .ogg format and then test how it loops in a good audio editor (eg: Audacity [it's free]).  If the music should be looping well, but there's a seam or click at the looping point, then you have to go down to the sample level of the audio file and make sure it starts and ends at the 0 volume point.  With monotracks you can do that by cutting off a few point samples, but with stereo tracks the easiest way is to fade out the music over the last few sample points and fade in the first few.


In the above, it can't cut be off correctly in stereo, so instead fade it out over the last 6 samples.  The 6 samples here will only last 1/10 of a millisecond, so it won't be noticeable to the listener and should get rid of the click sound.

From there, in sphere, you should be able to play it with repeat as true and it should loop just like in audacity.


If however, you're talking about more precise looping like, pay this part and then start looping this part, then you'll either have to do it in code by playing the first part and then fading in the loop when it should start (as two separate files would probably be easiest here), or maybe using a tracker format like .mod (more limited in terms of what it can do, but does have more complicated looping options).  I'm not sure if .mod is supported in miniSphere though.
3
Sphere General / Re: Proper way of using Sphere?
Last post by Rhuan -
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.
4
Sphere General / Re: Proper way of using Sphere?
Last post by Datomas -
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.
5
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Miscreant -
things are still rather hectic & stressful but for the next few days I have access to a laptop with minisphere on it so I can do a little more creation on ZeC.
6
Engine Development / Re: miniSphere 5.0.1
Last post by Fat Cerberus -
a) get the file path wrong (import expects relative paths)

Not entirely accurate - you can use a full path so long as it has a SphereFS prefix, e.g. @/bin/awesome.mjs.
7
Engine Development / Re: miniSphere 5.0.1
Last post by scojin -
Okay, thanks for the help.
Issues were file extensions(.js to .mjs) and getting rid of the tutorial changes.
I'll start a new thread if I have anymore questions.
8
Engine Development / Re: miniSphere 5.0.1
Last post by Rhuan -
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 :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):
https://www.dropbox.com/s/x5sfkcad3jjhk91/KRdemo.zip?dl=0

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
9
Game Development / Re: robotfindskitten, back from the dead
Last post by Eggbertx -
That must be the prequel.
10
Game Development / Re: robotfindskitten, back from the dead
Last post by scojin -
"A stegosaurus, escaped from the stegosaurusfindrobot game. It finds you."