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

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)
I lost most of my old Sphere games and resources when my laptop died (milk +laptop + seizure = spilled milk and a dead laptop), but I remember someone created a rudimentary 3D test game that rendered some cubes with textures from Minecraft, and you could move around the camera.
You could always do it with transformBlit and some maths but it's a bit of a pain.
Sphere was designed as a 2D RPG engine, it can do more than that but full 3d isn't quite there yet as said miniSphere's got a lot of what it needs but not quite all.

With miniSphere you can make shapes/polygons and apply a texture to them but you can only give their vertices x and y coordinates, they have a z coordinate property but it isn't used at the moment.

What have you been implementing your own 3d engine in?
@SilicateWielder welcome to spheredev/spherical. Recently there's been more conversation on the discord channel: But the forum is still good for conversations we want to last. Sorry to hear you've had problems joining.

As for 3d; I think proper 3d support could come in miniSphere 6....

TBH all we need is an ability to draw shapes that have z coordinates, most of the hooks are there just a bit of internal plumbing missing.

After that we'd want a method for loading some common 3d formats - wouldn't be too hard to write some loading scripts I assume.

We may run into performance issues at that point if we tried to do anything too big with 3d stuff but I dunno - miniSphere with chakra is pretty fast but we're currently locked to being single threaded.
Projects / Re: Project ZeC (My Zelda-esque Clone)
Code: [Select]
var name = candle_flame;

var tile;
var tw = GetTileWidth();
var th = GetTileHeight();
var tn = GetTileName(tile);

var px = GetPersonX(name);
var py = GetPersonY(name);
var pl = GetPersonLayer(name);
var dir = GetPersonDirection(MainChar);

var x;
var y;
var l;

switch (dir) {

case "north":
 x = px;
 y = py - 2;
 l = pl;
 tile = GetTile(x, y, l);
  if (tn = "burnable_bush") //tile name to be changed later
    if (py == y)

I am not currently in front of a computer to test this on... Writing the code on my mobile phone. Looking at how this code is written so far, I'm wondering if it will produce an error on var tn due to the fact that var tile technically isn't being define until the switch (dir)?
I'm not even sure what you're trying to do in this example, I'm sure there's a way to do it that's more concise and won't make an error though.
Sphere Support / Re: Player Movement Systems...
It's certainly possible and a simple switching mechanism could be implemented.

Could it cause glitches? Well if there were mistakes in the code, sure :P
Projects / Re: Project ZeC (My Zelda-esque Clone)
Rhuan helped me come up with a way to handle the map transitions. It's a very good starting point but I need to find a way for the player not to be able to move across the map while the transition is occurring.
To do that just put in  DetachInput() and ClearQueue() (with the player as the parameter) at the start of the transition and then an AttachInput at the end.
Alpha version of MapEngine and associated scripts available for download - I need to write some documentation and clean up a few things but I think this now counts as a usable system.

Note the graphical resources used to demo this are not mine and they are from Kefka's Revenge, please don't use them in any other public project without permission from their original authors.

The demo in this download allows you to walk around and talk to two people that is the extent of it - it's meant to demo a map engine and sprite system which I think it does.

Requires miniSphere 5 beta 2 at least also needs the latest version of the pact.js system module - this was updated today 30/09/17 so you maybe need to visit the miniSphere github for that.

edit by Fat Cerberus: Or just use beta 3 ;)

EDIT: link updated - I fixed a bug where collision checks between sprites would sometimes fail.

EDIT2: the first fixed version wasn't actually fixed, should be fixed now

EDIT3: re-uploaded again.... Sorry about this, found and fixed more bugs, I guess I should have tested more before posting the first time.
Projects / Re: Project ZeC (My Zelda-esque Clone)
Oh no I'm really sorry to hear that and hope it is fixed somehow soon.
I got a switch at release and had a lot of fun with Zelda BOTW for a while but haven't touched it much since - I haven't really played games for several months now, I've been coding instead, though I'm looking forward to Xenoblade 2 - I was kinda obsessed with Xenoblade X on the Wii U for a long time.
Projects / Re: Project ZeC (My Zelda-esque Clone)
It was based off of tile movement. A good portion of my x,y put you on the other side of a door at mid tile points. Especially in the dungeon levels where the north & south doors take up 2 tiles & the entry point is between those 2 tiles.
You could do 4 directions without doing tile movement - tile movement in an action rpg would be problematic anyway.
Projects / Re: Project ZeC (My Zelda-esque Clone)
You shouldn't have needed to move everything - what was your movement script?