Spherical forums

Sphere Development => Sphere General => Topic started by: Rhuan on August 26, 2017, 06:27:55 am

Title: Promoting Sphere?
Post by: Rhuan on August 26, 2017, 06:27:55 am
So... We all know that Sphere is a great game development tool.

And with forthcoming changes it's going to get even better:
- Fat Cerberus is working on high speed JS with chakracore
-> once CC works there's a possibility of full type script support via Cell with CC which could be attractive to some people
- there's already basic 3d support (though i think it may need some fine tuning)
- there are the v2 map/sprite engines I'm working on (including tiled support)
- with a decent tutorial for it the dataReader script from Fat Cerberus can load any basically data type you care to design
- there's the possibility of a web based implementation, Oozaru (though this is a little way off at the moment)
- there's the possibility of Android support from Eggbert.

What does it not have?
- There's no good 0 to everything tutorial or outline anywhere.
- There are very few great demos of what it can do, probably Trial and Error 4 beta and Aquatis Journey to Kiltos are the best we've got
- It doesn't have many active users talking about what they're using it for

How do we fix this?
1. I think the first few things on the improvements list should get finished before we do anything else as they could have some significant impacts on the best way to use Sphere
2. I think we want a 0 to working game tutorial using v2, possibly more than one such to cover a few different game types
3. Accompanying tech demos to go with the above
4. Consider where to share such materials (rpgmaker.net is one obvious place) but is there anywhere else that would be good?

Thoughts? Opinions? Volunteers?
Title: Re: Promoting Sphere?
Post by: DaVince on August 26, 2017, 08:35:50 am
Quote
There's no good 0 to everything tutorial or outline anywhere.
The new Getting Started (http://wiki.spheredev.org/index.php/Getting_started) was a start to fixing this, but it goes from 0 to basic, not from 0 to everything. I'd like to have more articles up on the wiki, especially now that miniSphere is quite usable and that much better compared to the v1 API.
Anyway, I very much agree that we need a bigger tutorial. :smiley:

Quote
- There are very few great demos of what it can do, probably Trial and Error 4 beta and Aquatis Journey to Kiltos are the best we've got
Interestingly, once you start digging, there are a lot of interesting Sphere games out there. I kept posting games made with Sphere on the Twitter (https://twitter.com/spheredev) for a while and had set it to post one a day but then I ran out of free time/interest to create posts for the big list I have of Sphere projects I want to promote. (Big list is here: https://pastebin.com/PzBR0jWT)

Honestly, I want to be more active on social media in general to create more of a presence for both Sphere as an engine and Spherical as a community, as a lot of people can be found specifically on social media these days. Especially Twitter has some potential to pique the interest of game devs. Some specific groups like the Game Dev Facebook group would be a good place too, if any game made with Sphere finds its way in places like those. RPGMaker.net is also a good place, that's where I found a lot of the more interesting/complete Sphere games to begin with.
Title: Re: Promoting Sphere?
Post by: Eggbertx on August 28, 2017, 03:36:35 pm
I've been thinking of starting a thread on another forum unrelated to programming or gaming (though the latter sometimes comes up) encouraging people to try out miniSphere and get them interested in programming. There are some people with artistic talent and others with musical talent, so hopefully we'll get at least a couple newcomers soon.
Title: Re: Promoting Sphere?
Post by: DaVince on August 30, 2017, 01:52:56 am
Sounds good to me. Anywhere where promoting Sphere seems appropriate, go for it. :)
Title: Re: Promoting Sphere?
Post by: Beaker on September 06, 2017, 07:40:30 pm
I think marketing sphere with some kind of notable game, released on steam, would make a lot of sense.  So, some kind of library to support steam achievements (maybe some other platforms) would do a lot to tell indies that sphere is a viable engine to make and release a game.  Once there's attention, that's when good tutorials become really important.

I have been considering a steam release for The Rainis Manuscript.  First I have to finish rewriting the dialog and adding the new scenes, then finish tweaking the new battle engine, then get it working in miniSphere (currently with 1.5 it crashes quite a bit due to what I *think* are segmentation faults, but I haven't looked into the actual error), then consider adding in other features like multiplayer networking, QA and finally release.  Over the past year it's become a lot more compelling, and I'm more excited about it now than I have ever been before.  While there are no modifications needed to release on steam itself, having support for achievements in particular would certainly be nice, even if it's just some kind of external library interface.

I know other indies would be interested in trying out new engines and technologies at game jams when they hear about someone else using it, and at least one person I know was interested in trying it out after seeing me use it at TOJam for the past 9 years (though probably more half-heartedly since he's really used to making games in unity).
Title: Re: Promoting Sphere?
Post by: Fat Cerberus on September 06, 2017, 07:48:37 pm
Over the past year it's become a lot more compelling, and I'm more excited about it now than I have ever been before.

If you're referring to miniSphere with this, it's about to get even more exciting, as I'm switching to ChakraCore--a modern JS engine with JIT (so performance blows Sphere 1.5 completely out of the water) and native support for pretty much all of ES6 including modules.  With that, combined with already having a real command-line debugger and scriptable build engine, miniSphere is a true modern implementation of Sphere.

Re: Steam integration: This is one of the things I was really interested in implementing back during the early months of the project.  I should probably look into it again.
Title: Re: Promoting Sphere?
Post by: Radnen on September 07, 2017, 02:56:38 am
Steam integration has been often on my mind. So I'm all in for that idea.
Title: Re: Promoting Sphere?
Post by: DaVince on September 07, 2017, 09:59:16 am
I also like the idea of Steam integration. Does miniSphere support external JS modules? I kinda remember one engine doing that at some point, and it would come in perfect when it comes to something like Steam integration.
Title: Re: Promoting Sphere?
Post by: Fat Cerberus on September 07, 2017, 10:04:25 am
Not sure what you mean by external modules?  Like being able to load native code?  Plugins?
Title: Re: Promoting Sphere?
Post by: DaVince on September 07, 2017, 10:16:34 am
Yeah, something like plugins. Maybe it was TurboSphere that did that?
Title: Re: Promoting Sphere?
Post by: Fat Cerberus on September 07, 2017, 10:23:00 am
Yeah, TurboSphere.  I experimented with implementing it at one point about a year or so ago (around the time I added support for require()) but ultimately decided evolving the engine in other ways was more important.  That seems to be paying off now :D
Title: Re: Promoting Sphere?
Post by: Beaker on September 07, 2017, 05:04:53 pm
If you're referring to miniSphere with this, it's about to get even more exciting, as I'm switching to ChakraCore--a modern JS engine with JIT (so performance blows Sphere 1.5 completely out of the water) and native support for pretty much all of ES6 including modules.

I was referring to TRM instead.  In terms of engine updates, there hasn't been much added since 1.0 that I've needed (a few features here and there but not a lot).  The main benefit of upgrading versions, especially for TRM has been to use an engine that's stable under current operating systems and allocates enough memory to the JS heap to allow the scripts to run (TRM was dead for a while between 1.101984-1.2 [I think, whatever the last crazy version number was] because of this).  Performance hasn't been that important since TRM was initially designed to run on Pentium 2 era machines (300-500mhz), and for the type of stuff I'm interested in doing (mostly pure pixel art, fairly low res), the engine has been fast enough for quite some time.  While performance issues can always (well, usually*) be worked around by being creative, it's the hard limit stuff like the draw order of map sprites (RTD:E**), bugs because of newer OSes, or something like steam integration that is exciting to me.

But getting back the main topic.  A lot of people seem interested in that steam integration, I guess because even if one doesn't really want to commercialize their game, the possibility of doing so is appealing, especially to someone starting out.  Besides that, are there other things that a fully commercialized game should have?  For instance, in Sphere-v1 (I haven't looked deeply into miniSphere yet), while you can change the resolution mid-game, you can't change the graphic drivers, which means you would have to make your own prelauncher to do something like that since most games don't expect you to go to the install folder (or the program files menu) and run a different .exe to change configuration - you just click play in steam or on the desktop icon and then change it in the prelauncher or the game itself.


(*) RTD:E needed to use its own build of sphere to get around the fact that GetPerson calls were being mapped from the person's name to the person_id number via an array lookup.  That's fine for a low number of sprites, but for updating a large number of sprites at once (for example, gore globs or large number of enemies) would quickly slow down with increased numbers of persons on the map.  Rouge Rogue Rabbit Puncher also had this problem, but only after defeating the mid-boss.

(**) The draw order of the sprites on each layer was determined by sorting the y-position of the sprites in vanilla sphere.  This is reasonable for an rpg, but for a platformer where a lot of sprites are on the same y-value and can overlap, it makes a lot less sense when you start seeing the sprites glitch in front and behind each other, so RTD:E set the order to be fixed instead.  By now, it may be reasonable to implement pure js map engines, which would make patching something like yourself this just a matter of loading the js library and overriding some functions instead of asking for a feature request/building the engine yourself.
Title: Re: Promoting Sphere?
Post by: Fat Cerberus on September 07, 2017, 05:30:08 pm
Right, that's the main benefit to having a fast JS engine, you can implement all the high-level stuff like map engines, etc. in JavaScript.  Sphere 1.5 uses a veritably *ancient* SpiderMonkey version (2003) and it's just not up to the task of running a full JS map engine.

Sphere 1.5 having a built-in map engine written in C++ is a big part of what's given it as much staying power as it has.  Almost all the heavy lifting is done by the engine, so if all you're doing is map-based stuff the slow JS performance isn't a bottleneck.  Once you do anything really code-heavy though, like my Spectacles battle engine, or @Rhuan's map engine, the poor performance of interpreted JS really starts to hurt.

Regarding that resolution switch: I was under the impression you couldn't do that in Sphere 1.x without actually forcibly rewriting the .sgm file and then calling RestartGame()?  miniSphere lets you just do screen.resize(w, h) but I didn't think there was an equivalent function in the Sphere v1 API.
Title: Re: Promoting Sphere?
Post by: Beaker on September 07, 2017, 06:26:13 pm
Regarding that resolution switch: I was under the impression you couldn't do that in Sphere 1.x without actually forcibly rewriting the .sgm file and then calling RestartGame()?

Yep, that's called changing resolution mid-game in 1.x.  Also works to limit heap size growth if that's an issue for you and it's 2005.

Doesn't work for changing the graphics driver though.
Title: Re: Promoting Sphere?
Post by: Fat Cerberus on September 07, 2017, 06:33:24 pm
Well, that "mid-game" part is maybe kind of a stretch since you lose all current state, and end up having to write even more code to save the state of the game and restore it after restarting (and the way the 1.x map engine is engineered sometimes makes that a challenge).  But yeah, I didn't realize that's what you were referring to, thought you knew of a secret API function I didn't know about ;)
Title: Re: Promoting Sphere?
Post by: Rhuan on September 07, 2017, 07:16:16 pm
As far as I know miniSphere doesn't have a choice of graphics drivers? Which somewhat removes that issue...
Title: Re: Promoting Sphere?
Post by: Rhuan on September 09, 2017, 06:38:15 pm
Once you do anything really code-heavy though, like my Spectacles battle engine, or @Rhuan's map engine, the poor performance of interpreted JS really starts to hurt.
The map engine I'm working on was ok under Duktape - my update and render scripts could process 1000 sprites in approximately 15 ms, which is just fast enough for 60 FPS - though that was before I added collisions - with tile based collisions I tested with 500 and it was fine; I haven't done a stress test with polygon based collisions yet but it would probably be ok for 400+, the entities are moved in and out of segments of the map so that minimal collisions have to be tested directly.

I obviously can't test performance on old Sphere as my engine code is very dependent on the pegasus/galileo api which doesn't exist in 1.5.

Also though the fact that code I write runs fast on an engine does not mean the engine is fast - I'm a compulsive micro-optimiser.
Title: Re: Promoting Sphere?
Post by: Rukiri on September 27, 2017, 01:04:47 pm
Sphere was insanely popular back in the day, it was literally the go-to pokemon engine "even tho it's not a pokemon kit... one came out for XP which kinda killed the poke sphere scene..."   There were also tutorials on any RPG Maker related site, however with minisphere a lot changes also even tho it's cross platform the editor is still windows based so I would suggest at least focusing on OS X then work on a Linux port but that's just me.

You're going to need generate buzz, how do you do that? Show off current in progress titles "not titles that haven't been touched in years..."  Focus on minisphere, make sure there's really only 1 sphere to work with and make it blatantly clear that 1.5x is legacy and not supported for future development.

I would also consider making an RPG Template, essentially copy RPG Maker (look at RMs success and mimic it).  by having a template you have a foundation for new users to come in and create projects, I believe there was one for sphere 1x but that's long gone tho...
Title: Re: Promoting Sphere?
Post by: Fat Cerberus on September 27, 2017, 01:15:43 pm
Focus on minisphere, make sure there's really only 1 sphere to work with and make it blatantly clear that 1.5x is legacy and not supported for future development.

That's what I keep telling people, but they insist on writing new code against the Sphere v1 API anyway.  I guess it doesn't help that most of our active members are still old-timers and there's no Sphere v2 map engine yet (though @Rhuan is slowly working on one).  The classic map engine just isn't conducive to writing idiomatic Sphere v2 code, and the divide has widened even further with ES6 being supported in the beta.
Title: Re: Promoting Sphere?
Post by: Rukiri on September 27, 2017, 01:25:04 pm
Focus on minisphere, make sure there's really only 1 sphere to work with and make it blatantly clear that 1.5x is legacy and not supported for future development.

That's what I keep telling people, but they insist on writing new code against the Sphere v1 API anyway.  I guess it doesn't help that most of our active members are still old-timers and there's no Sphere v2 map engine yet (though @Rhuan is slowly working on one).  The classic map engine just isn't conducive to writing idiomatic Sphere v2 code, and the divide has widened even further with ES6 being supported in the beta.
It's almost better if Minisphere had it's own community...  and spidermonkey js is pretty old...  I personally haven't touch sphere in ages which I don't think minisphere any of the "new" spheres were a thing yet.   

Still think a rpg template would go a long way in bringing in people, use xp stuff "everybody does..." just put a disclaimer for assets use *can not be used for commercial projects.   I'm also thinking about moving my rpg project from unity I was going to use RPG Maker MV only because I could do entire 5hr story arks in a month or 2, Dragon Ball currently has 10 so the game would be around 50hrs "the Future trunks ark is going to be 10+ only because I love Black <3"  So imagine doing a project like that in Unity especially with how scenes are organized... even tho I have most of my Zelda kit done it was quite a pain in unity "especially the room transitions...". 
Title: Re: Promoting Sphere?
Post by: Rhuan on September 27, 2017, 04:12:15 pm
Focus on minisphere, make sure there's really only 1 sphere to work with and make it blatantly clear that 1.5x is legacy and not supported for future development.

That's what I keep telling people, but they insist on writing new code against the Sphere v1 API anyway.  I guess it doesn't help that most of our active members are still old-timers and there's no Sphere v2 map engine yet (though @Rhuan is slowly working on one).  The classic map engine just isn't conducive to writing idiomatic Sphere v2 code, and the divide has widened even further with ES6 being supported in the beta.
I think the absence of a v2 map engine is a pretty major issue, I'm trying to fix that but getting it right is taking time (plus I was away for almost a month since starting it which delayed me quite a bit).

Also the v2 API still feels a little new/untested, it's not a stable 100% there definitely good to go platform yet, it's getting there and when it's finalised it will be great just needs a little bit longer IMO.

Still think a rpg template would go a long way in bringing in people, use xp stuff "everybody does..." just put a disclaimer for assets use *can not be used for commercial projects.   I'm also thinking about moving my rpg project from unity I was going to use RPG Maker MV only because I could do entire 5hr story arks in a month or 2, Dragon Ball currently has 10 so the game would be around 50hrs "the Future trunks ark is going to be 10+ only because I love Black <3"  So imagine doing a project like that in Unity especially with how scenes are organized... even tho I have most of my Zelda kit done it was quite a pain in unity "especially the room transitions...". 
I'd love to make a full RPG template - just taking a while on the map engine; I have a full time job and other things in my life + recently have just been writing too much code both in and outside of work, been making my brain spin and I've had to slow down/do simpler stuff.

So you've got a project you're thinking of moving from unity? What do we need to do to persuade you to bring it to miniSphere?
Title: Re: Promoting Sphere?
Post by: Rukiri on September 27, 2017, 04:26:21 pm
Focus on minisphere, make sure there's really only 1 sphere to work with and make it blatantly clear that 1.5x is legacy and not supported for future development.

That's what I keep telling people, but they insist on writing new code against the Sphere v1 API anyway.  I guess it doesn't help that most of our active members are still old-timers and there's no Sphere v2 map engine yet (though @Rhuan is slowly working on one).  The classic map engine just isn't conducive to writing idiomatic Sphere v2 code, and the divide has widened even further with ES6 being supported in the beta.
I think the absence of a v2 map engine is a pretty major issue, I'm trying to fix that but getting it right is taking time (plus I was away for almost a month since starting it which delayed me quite a bit).

Also the v2 API still feels a little new/untested, it's not a stable 100% there definitely good to go platform yet, it's getting there and when it's finalised it will be great just needs a little bit longer IMO.

Still think a rpg template would go a long way in bringing in people, use xp stuff "everybody does..." just put a disclaimer for assets use *can not be used for commercial projects.   I'm also thinking about moving my rpg project from unity I was going to use RPG Maker MV only because I could do entire 5hr story arks in a month or 2, Dragon Ball currently has 10 so the game would be around 50hrs "the Future trunks ark is going to be 10+ only because I love Black <3"  So imagine doing a project like that in Unity especially with how scenes are organized... even tho I have most of my Zelda kit done it was quite a pain in unity "especially the room transitions...". 
I'd love to make a full RPG template - just taking a while on the map engine; I have a full time job and other things in my life + recently have just been writing too much code both in and outside of work, been making my brain spin and I've had to slow down/do simpler stuff.

So you've got a project you're thinking of moving from unity? What do we need to do to persuade you to bring it to miniSphere?
Not much sadly :)
One thing I absolutely have to recommend is polygon colliders (basically full "tile", none, and shape "great for slopes/half tiles")  Unity spoiled me in this regard, Zelda A Link To The Past used or at least appeared to use Polygon colliders or at the very least used circular collision.
Title: Re: Promoting Sphere?
Post by: Rhuan on September 27, 2017, 04:51:13 pm
Collision algorithm built into my work in progress map engine, I could add more shape types in the future - for now does rectangles and circles:
Code: [Select]
	static polysCollide(x, y, _one, two)
{
let result = false;
let one = {x: _one.x + x, y:_one.y + y, type: _one.type, w:_one.w, h:_one.h};
if(one.type === 0)
{
if(two.type === 0)
{//circle with circle
result = (((one.x - two.x) * (one.x - two.x) + (one.y - two.y) * (one.y - two.y)) <= ((one.w + two.w) * (one.w + two.w)));
}
else if(two.type === 1)
{//circle with rect
let x_d = one.x - two.x - two.w /2;
x_d = x_d < 0 ? -x_d : x_d;
let y_d = one.y - two.y - two.h /2;
y_d = y_d < 0 ? -y_d : y_d;
if((x_d > (two.w/2 + one.w)) || (y_d > (two.h/2 + one.w)))
{//distance between centres > radius + half width or height of square
result = false;
}
else
{
if(x_d <= two.w/2 || y_d <= two.h/2)
{//distance between centres < half width or height of square (combined with check above)
result = true;
}
else
{//final check pythag
x_d = x_d - two.w/2;
y_d = y_d - two.h/2;
result = ((x_d * x_d + y_d * y_d) <= one.w * one.w);
}
}
}
else
{
CEngine.error ("Unknown polygon type given to collision engine, valid types are 0 or 1, supplied type was " + two.type);
}
}
else if(one.type === 1)
{
if(two.type === 0)
{//circle with rect
let x_d = two.x - one.x - one.w /2;
x_d = x_d < 0 ? -x_d : x_d;
let y_d = two.y - one.y - one.h /2;
y_d = y_d < 0 ? -y_d : y_d;
if((x_d > (one.w/2 + two.w)) || (y_d > (one.h/2 + two.w)))
{//distance between centres > radius + half width or height of square
result = false;
}
else
{
if(x_d <= one.w/2 || y_d <= one.h/2)
{//distance between centres < half width or height of square (combined with check above)
result = true;
}
else
{//final check pythag
x_d = x_d - one.w/2;
y_d = y_d - one.h/2;
result = ((x_d * x_d + y_d * y_d) <= two.w * two.w);
}
}
}
else if(two.type === 1)
{//rect with rect
result = (
(one.x <= (two.x + two.w)) &&
((one.x + one.w) >= two.x) &&
(one.y <= (two.y + two.h)) &&
((one.y + one.h) >= two.y));
}
else
{
CEngine.error ("Unknown polygon type given to collision engine, valid types are 0 or 1, supplied type was " + two.type);
}
}