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 - casiotone

Site Comments / Re: Thoughts about a Discord server?
Sounds good to me. Forums are pretty old school at this point!
Sphere General / Re: Sphere v2 API discussion

5.0 will change the save data handling so that games no longer have to share the same save file folder.  How that works is you set a "save ID" in the JSON manifest and miniSphere uses that as the name of the folder.  If you have want to have sequels be able to share save data, you can just give them the same save ID.

I'm thinking there should be a standardized format for save IDs to avoid clashes, something like this maybe (inspired by Android app IDs):
Code: [Select]

Could this not be set at runtime? A game may want to have its own save directory but still be able to access previous game data.

Perhaps the game ID could be set in the manifest, but an optional one also at runtime - and enforcing read-only access if it isn't the ID in the manifest.
You should probably focus on things like maps/spritesets/fonts first - that's the real pain of Sphere on other platforms. I can't work with Sphere on Mac because I can't create maps or sprites, but I can use any editor for JS.
Site Comments / Re: Sphere Wiki is Dead
Sphere wiki is alive  :)
Spherical News / Re: Server upgrade
If anyone's wondering I eventually got around to completing this upgrade this week after it ended up in an inconsistent state. Not fun having aptitude run out of memory resolving dependencies.

Probably cuz 14.04 is the last sane LTS of Ubuntu before the attempts to Gnome-ify everything? Go for it, dude.

14.04 is the latest my VPS provider offers. No, there's no GUI :)
Spherical News / Re: Downtime

Access log is reading as 1.04GB, so...yea. Trimming that now. :/

Not really an issue to be honest. The issue was actually caused by 30GB of logs being generated from the failed upgrade! I had cleared them out but the next day the drive was full again - but after restarting it was all freed. So not sure what happened there.
Spherical News / Re: Downtime
It happened again! I'm not sure what's going on but I'll keep an eye on it
Spherical News / Downtime
Sorry for recent downtime (not sure how long it was... I should pay more attention). The server ran out of disk space. All good now.
Spherical News / Server upgrade
I'm planning to do an OS upgrade on the server this weekend (from Ubuntu 12.04 to 14.04). Hopefully nothing will go wrong but there will be some downtime.
I'd also really like this.. working on a Mac makes Sphere dev almost impossible.

But an IDE is not necessarily required.. it would be nice if we could make some cross platform tools to convert to/from Sphere formats, and a Tiled export plugin.
Engine Development / Re: minisphere 2.1.4

You're the second person to request that, I'll see what I can do.  For now you can probably disable it by:
* Remove 'animation.c' from msphere_sources in the SConscript
* Remove 'mng' from msphere_libs in the SConscript
* Comment out the call to init_animation_api() in api.c

There's been talk of Allegro adding optional MNG support to the library; if that happens I can do away with my own libmng dependency.  Oh, that reminds me, watch out with Allegro's audio support; if you didn't set WANT_ACODEC_DYNAMIC_LOAD=0 when using Allegro's CMake, then it attempts to dynamically load libvorbis, etc. at runtime and fails silently if it can't, so if minisphere fails to load any sound files--it's most likely not my fault! ;)

Works like a charm, thanks again.
Engine Development / Re: minisphere 2.1.4
Thanks, managed to build Allegro. Now having a problem with libmng - I can't get that to build on OS X at all. I have no plans to actually use MNG, is there any chance you could add an option to compile without MNG support?
Engine Development / Re: minisphere 2.1.4
Having an issue building this again on OS X - I've installed Allegro 5.0.11 through homebrew and I'm getting this when running scons:

Code: [Select]
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o obj/msphere/main.o -c -DDUK_OPT_HAVE_CUSTOM_H obj/msphere/main.c
obj/msphere/main.c:183:44: error: use of undeclared identifier 'ALLEGRO_PROGRAMMABLE_PIPELINE'
        al_set_new_display_flags(ALLEGRO_OPENGL | ALLEGRO_PROGRAMMABLE_PIPELINE);
obj/msphere/main.c:624:5: warning: implicit declaration of function 'al_set_clipboard_text' is invalid in C99
                                al_set_clipboard_text(g_display, msg);
obj/msphere/main.c:779:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        while (fse = al_read_directory(engine_dir)) {
obj/msphere/main.c:779:13: note: place parentheses around the assignment to silence this warning
        while (fse = al_read_directory(engine_dir)) {
               (                                  )
obj/msphere/main.c:779:13: note: use '==' to turn this assignment into an equality comparison
        while (fse = al_read_directory(engine_dir)) {
2 warnings and 1 error generated.
scons: *** [obj/msphere/main.o] Error 1
scons: building terminated because of errors.

Any ideas?
Engine Development / Re: CommonJS modules

Just going to bump this thread as minisphere 1.2 has been released and includes CommonJS support and require() built in.  module.exports is not supported yet, but the next release of Duktape will include it.

As a word of caution, 1.2's implementation is a bit barebones.  There is no package support as in casiotone's solution, it simply loads a JS file from ~/cjs_modules and executes it as a module (via a C-side Duktape.modSearch() function).  Any advanced package-type stuff will have to wait.


You could implement something like described in this comment:

i.e. provide a way to register a modResolve function that takes the calling module id and the id passed to require and returns the path the engine should load from, then any advanced resolution can just be done in JS.
Engine Development / Re: minisphere 1.0.10

ALLEGRO_MIN_LINEAR and ALLEGRO_MAG_LINEAR. It improves image scaling a lot.