Skip to main content

News

Topic: Questions before I start work in Sphere. (Read 14169 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Mooch
  • [*][*][*]
Questions before I start work in Sphere.
Hey, all. I have a few questions before I start getting involved with Sphere again. I've been out of it since before the re-launch, when Radnen's editor wasn't official, and it's just quicker and easier to ask than to look through all the documentation myself.

1) Can any current Sphere editor produce uneditable, standalone executables?

2) What's the outlook of a browser-based Sphere engine?

3) As I recall, there's functions in the API to have like, a window within the game window that displays a different map or a different part of the current map. Is there any major limitations on that?

Could I, for example, have a three-by-four grid of totally different views, each showing something completely different?

'cause I have this idea for a puzzle/platformer that would have a bunch of "panes" on screen at once, and when you walk out of one, you appear not in the pane directly next to it, but a completely different pane. Like...
Code: [Select]
    v--- Walk right out of this pane
[] [] [] []
[] [] [] []
[] [] [] []
       ^--- Appear in this pane

...and the panes need to be able to more-or-less display stuff completely independently of one another. I could, obviously, just change graphics and jump the player around, but if I could simply use views, it'd be way, way easier.

4) This questions basically only answerable by Radnen -- there's native Xbox controller support now, I see. Any chance of native Wiimote support? It's not strictly necessary -- there's this program called GlovePIE and it has built-in Wiimote support. Still, native support would be wicked sweet, plus, if ever a browser-based Sphere were released, you'd be able to play on your Wii / Wii U web browser using a Wiimote, which would be epic.

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: Questions before I start work in Sphere.
Reply #1
1. No. Currently, no Sphere editor can produce a singular executable file for distribution like RPGMaker can. For now, the best solution for Windows-specific packaging is to replace the content of the startup folder with your game data and zip up the Sphere folder in that state. Remove editor.exe and the games folder from that zip and if you like you can rename sphere.exe to yourgamename.exe instead.

2. Sphere engines in the browser are technically within our reach; at this point it's mostly about having the time available to make it happen, since my Web Sphere Utilities repository (a reference implementation for loading Sphere files with JavaScript) is only missing map loading.

3. The technique in question is commonly for making mini-maps, though I think you're also talking about split-screen functionality. I haven't done it myself and I'd imagine someone here who has (probably Radnen or Flying Jester) can be more detailed on the limitations, but my guess is that the major limitations are having to recreate the existing Camera functionality that the map engine already has in script rather than in C++ and the performance hits that would incur.

  • Mooch
  • [*][*][*]
Re: Questions before I start work in Sphere.
Reply #2
Thanks.

1) Is there a detailed tutorial for Windows packaging? And is there any drawback to doing things through that method (other than it only being playable on Windows)?

Radnen really needs to focus on this one, I think. Without the ability to produce standalone executables, Sphere is never going to become widely used, because having to release all your games as source means you can't possibly sell a game made in Sphere.

2) By map loading, do you mean the MapEngine? Or it literally just simply can't load maps?

3) Things would pretty much only be happening in one panel at a time (namely, you moving your character about). Why would I have to recreate anything, though? Isn't there just an API function?

Also, I didn't know C++ had anything to do with Sphere, I thought it was all Javascript.

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Questions before I start work in Sphere.
Reply #3
1) See http://wiki.spheredev.org/Distributing_a_Sphere_game

2) No map loading. NEO's reference implementations just open Sphere format files for viewing in the browser; it doesn't try to be Sphere, but can be used for developing a web version of Sphere. There have been a few implementations: Radnen's Sphere SFML version, written in C# and .NET has the most potential to work in the browser, if you ask me. There's also https://github.com/sphere-group/web-sphere

3) There is only one possible camera. There is also no function to retrieve a different part of the map; just what's on camera. So it requires some trickery in order to get part of a different section of the map. As for showing different maps altogether; that would be even more difficult as you can only have one map open at a time in the map engine. Yeah, there's some funky limitations here that require creative workarounds.

As for the C++ part: Sphere itself, and all of its functions, have been coded in C++ (for speed) and are exposed to you through JavaScript. So you would only ever have to touch JS, not Sphere's original C++ source code.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Questions before I start work in Sphere.
Reply #4

4) This questions basically only answerable by Radnen -- there's native Xbox controller support now, I see. Any chance of native Wiimote support? It's not strictly necessary -- there's this program called GlovePIE and it has built-in Wiimote support. Still, native support would be wicked sweet, plus, if ever a browser-based Sphere were released, you'd be able to play on your Wii / Wii U web browser using a Wiimote, which would be epic.


Umm, there's always been support for the xbox controller, all you needed to do was find the correct buttons and use them. In fact those buttons are thus:
Code: (javascript) [Select]

this.AButton      = 0;
this.BButton      = 1;
this.XButton      = 2;
this.YButton      = 3;
this.LButton      = 4;
this.RButton      = 5;
this.selectButton = 6;
this.startButton  = 7;


There is wiimote support, but it's unofficial. Beaker added it to one of his games. So yes, it is possible to have a wiimote be used for your game, but I don't know where Beaker is right now. I'm also not sure if wiimote support would ever become official, but it's certainly a possibility.


2) No map loading. NEO's reference implementations just open Sphere format files for viewing in the browser; it doesn't try to be Sphere, but can be used for developing a web version of Sphere. There have been a few implementations: Radnen's Sphere SFML version, written in C# and .NET has the most potential to work in the browser, if you ask me. There's also https://github.com/sphere-group/web-sphere


Well that's actually my PixiSphere implementation (which I should work on now since pixi has came along nicely now). But SphereSFML will one day be browser based if I can use JSIL to "embed" it in a browser so to speak.
  • Last Edit: November 29, 2013, 02:34:18 pm by Radnen
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Mooch
  • [*][*][*]
Re: Questions before I start work in Sphere.
Reply #5

1) See http://wiki.spheredev.org/Distributing_a_Sphere_game


How will the Windows distribution thing prevent someone from just re-renaming the files and editing my game?

2) No map loading. NEO's reference implementations just open Sphere format files for viewing in the browser; it doesn't try to be Sphere, but can be used for developing a web version of Sphere. There have been a few implementations: Radnen's Sphere SFML version, written in C# and .NET has the most potential to work in the browser, if you ask me. There's also https://github.com/sphere-group/web-sphere

Neat. How complex and difficult is that to use? Let's say I had a complete Sphere game. What are we talking in terms of time to get it setup on the web? A few minutes? A few hours? More than a day?

3) There is only one possible camera. There is also no function to retrieve a different part of the map; just what's on camera. So it requires some trickery in order to get part of a different section of the map. As for showing different maps altogether; that would be even more difficult as you can only have one map open at a time in the map engine. Yeah, there's some funky limitations here that require creative workarounds.

Hmm. Guess I'll leave that idea for when I code a game from scratch.



4) This questions basically only answerable by Radnen -- there's native Xbox controller support now, I see. Any chance of native Wiimote support? It's not strictly necessary -- there's this program called GlovePIE and it has built-in Wiimote support. Still, native support would be wicked sweet, plus, if ever a browser-based Sphere were released, you'd be able to play on your Wii / Wii U web browser using a Wiimote, which would be epic.


Umm, there's always been support for the xbox controller, all you needed to do was find the correct buttons and use them. In fact those buttons are thus:
Code: (javascript) [Select]

this.AButton      = 0;
this.BButton      = 1;
this.XButton      = 2;
this.YButton      = 3;
this.LButton      = 4;
this.RButton      = 5;
this.selectButton = 6;
this.startButton  = 7;

I did not know that. I never heard about it until after the site relaunch.

There is wiimote support, but it's unofficial. Beaker added it to one of his games. So yes, it is possible to have a wiimote be used for your game, but I don't know where Beaker is right now. I'm also not sure if wiimote support would ever become official, but it's certainly a possibility.

Off the top of your head, do you know if Beaker's implementation enabled all the features of the Wiimote, like the tilt sensor and accelerometer?


2) No map loading. NEO's reference implementations just open Sphere format files for viewing in the browser; it doesn't try to be Sphere, but can be used for developing a web version of Sphere. There have been a few implementations: Radnen's Sphere SFML version, written in C# and .NET has the most potential to work in the browser, if you ask me. There's also https://github.com/sphere-group/web-sphere


Well that's actually my PixiSphere implementation (which I should work on now since pixi has came along nicely now). But SphereSFML will one day be browser based if I can use JSIL to "embed" it in a browser so to speak.

Would you be able to just create an html file and run the web-based Sphere in that, or would you need a server to host it?

New Question: I've got eye problems so my ability to use the computer is very limited. So I don't have to trawl through the API, can someone tell me, is there a function to access the text as an image? i.e. so that I'd be able to display Sphere system text onscreen without havng to actually do a text box, just like, display a few characters as images?

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Questions before I start work in Sphere.
Reply #6

I did not know that. I never heard about it until after the site relaunch.


Ah well, yeah Sphere only has basic controller support so really any controller is supported. That said it doesn't sup[port them well. The 360 controller for example, the L and R buttons don't work quite right. You can't use them in tandem, as in you can use one or the other but not both at the same time.


There is wiimote support, but it's unofficial. Beaker added it to one of his games. So yes, it is possible to have a wiimote be used for your game, but I don't know where Beaker is right now. I'm also not sure if wiimote support would ever become official, but it's certainly a possibility.

Off the top of your head, do you know if Beaker's implementation enabled all the features of the Wiimote, like the tilt sensor and accelerometer?


Yes, all that stuff.


Quote from: Radnen

Well that's actually my PixiSphere implementation (which I should work on now since pixi has came along nicely now). But SphereSFML will one day be browser based if I can use JSIL to "embed" it in a browser so to speak.

Would you be able to just create an html file and run the web-based Sphere in that, or would you need a server to host it?


Yes you'd need to create an HTML file and stuff, but all of the web based sphere engines are in very early alpha/experimental stages. Once I use JSIL on SphereSFML, you'd not have to worry about html files and stuff, it'd be automatic, just drop your game in and play. but you would need a website to host the stuff; I'm sure NEO would make reservations or DaVince. But this stuff is a year down the line.


New Question: I've got eye problems so my ability to use the computer is very limited. So I don't have to trawl through the API, can someone tell me, is there a function to access the text as an image? i.e. so that I'd be able to display Sphere system text onscreen without havng to actually do a text box, just like, display a few characters as images?


Yes, just use font.drawText(x, y, text); It'll draw a single line of characters only, no text boxes or anything.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Mooch
  • [*][*][*]
Re: Questions before I start work in Sphere.
Reply #7


I did not know that. I never heard about it until after the site relaunch.


Ah well, yeah Sphere only has basic controller support so really any controller is supported. That said it doesn't sup[port them well. The 360 controller for example, the L and R buttons don't work quite right. You can't use them in tandem, as in you can use one or the other but not both at the same time.


Any controller is supported...? So if I have my Wiimote connected to my computer, I can just use this.buttonwhatever and it'll work? How does the Wiimote map? Since the buttons are A, B, +, -, 1, 2, Home and D-Pad, not ABXYLRStSel.



There is wiimote support, but it's unofficial. Beaker added it to one of his games. So yes, it is possible to have a wiimote be used for your game, but I don't know where Beaker is right now. I'm also not sure if wiimote support would ever become official, but it's certainly a possibility.

Off the top of your head, do you know if Beaker's implementation enabled all the features of the Wiimote, like the tilt sensor and accelerometer?


Yes, all that stuff.


Quote from: Radnen

Well that's actually my PixiSphere implementation (which I should work on now since pixi has came along nicely now). But SphereSFML will one day be browser based if I can use JSIL to "embed" it in a browser so to speak.

Would you be able to just create an html file and run the web-based Sphere in that, or would you need a server to host it?


Yes you'd need to create an HTML file and stuff, but all of the web based sphere engines are in very early alpha/experimental stages. Once I use JSIL on SphereSFML, you'd not have to worry about html files and stuff, it'd be automatic, just drop your game in and play. but you would need a website to host the stuff; I'm sure NEO would make reservations or DaVince. But this stuff is a year down the line.


Sweet. So if I made a game that could use the Wiimote, once you finish that, I can host it somewhere and actually play it on my Wii or Wii U?


New Question: I've got eye problems so my ability to use the computer is very limited. So I don't have to trawl through the API, can someone tell me, is there a function to access the text as an image? i.e. so that I'd be able to display Sphere system text onscreen without havng to actually do a text box, just like, display a few characters as images?


Yes, just use font.drawText(x, y, text); It'll draw a single line of characters only, no text boxes or anything.


I was kinda hoping for a sort of font-to-image thing, so that I could perform image functions on the text in question. That's just drawing text.

What is the text stored as, anyway? A Windows-style Font file, or an image or what?

(FYI: I wanna make a command prompt ala DOS or whatever.)

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Questions before I start work in Sphere.
Reply #8
No, I don't think you can use the WiiMote directly, it is not a standard controller and does not use standard controller protocols. Though I said any controller would work I was saying any standard controller (any 3rd party gamepad, the 360 controller, or PS controller), the WiiMote is it's own strange thing. You need a hacked version of Sphere to use the WiiMote and only Beaker has that hacked version.

That said it is impossible to put his hacked version of sphere onto the Wii since it is not the same thing as SphereSFML or other web-sphere variants. If you want WiiMote support in SphereSFML, I'll try to make it a feature request and add that in. That said you can't put anything onto the Wii or Wii-U blindly, there are certain things one must do. Perhaps through it's web browser it's a possibility but I don't know how limited it is, I don't know if it would run these web variants of Sphere.

For a command prompt you don't need to render your strings of a font to an image. I don't know why you can't just use font.drawText? I'm not entirely sure you understand what rendering to back buffer means... The fonts in Sphere are bitmap fonts so when you say how to render font as an image... well you're really always doing that. I guess you could be a bit more specific as to what you are trying to do? The only reason to render text to an image (ie surface) is to do some hardcore image manipulations on it, and for a command prompt you shouldn't need to do that.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Questions before I start work in Sphere.
Reply #9


1) See http://wiki.spheredev.org/Distributing_a_Sphere_game


How will the Windows distribution thing prevent someone from just re-renaming the files and editing my game?

It won't. The only prerequisite for someone editing your files is by knowing where the files are. Yeah, Sphere is very open when it comes to this, so you'd have to be okay having the code and (non-Sphere format) assets open.

That said, there's the SPK file format, which packages your game into a single file. It's not quite like any standard archive, so you would need a special tool to unpack/extract it (this tool does exist, but people may not know about it). It also has some issues with for example MIDI playback. People can run the SPK by dragging it to the engine.exe (or you make a batch file which does that). I think I'll write the instructions now.


Well that's actually my PixiSphere implementation (which I should work on now since pixi has came along nicely now). But SphereSFML will one day be browser based if I can use JSIL to "embed" it in a browser so to speak.

Sounds awesome. What's preventing you from doing that with SphereSFML at this point?

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: Questions before I start work in Sphere.
Reply #10

Well that's actually my PixiSphere implementation (which I should work on now since pixi has came along nicely now). But SphereSFML will one day be browser based if I can use JSIL to "embed" it in a browser so to speak.

Sounds awesome. What's preventing you from doing that with SphereSFML at this point?


I'm assuming the map engine ;)

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Questions before I start work in Sphere.
Reply #11
@NEO: nope, it's not that bad of a map engine. :)

@DaVince: well... I guess I wanted to finish it, but I could trial JSIL on it... see if it works.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Questions before I start work in Sphere.
Reply #12
Well, map engine or no, personally I'm rather excited about getting so much of Sphere working on the web already, regardless of how far finished the map engine is. But maybe that's just me. Definitely allows people to test it in the wild already, though, which is obviously a plus. :)

  • Mooch
  • [*][*][*]
Re: Questions before I start work in Sphere.
Reply #13

No, I don't think you can use the WiiMote directly, it is not a standard controller and does not use standard controller protocols. Though I said any controller would work I was saying any standard controller (any 3rd party gamepad, the 360 controller, or PS controller), the WiiMote is it's own strange thing. You need a hacked version of Sphere to use the WiiMote and only Beaker has that hacked version.

That said it is impossible to put his hacked version of sphere onto the Wii since it is not the same thing as SphereSFML or other web-sphere variants. If you want WiiMote support in SphereSFML, I'll try to make it a feature request and add that in. That said you can't put anything onto the Wii or Wii-U blindly, there are certain things one must do. Perhaps through it's web browser it's a possibility but I don't know how limited it is, I don't know if it would run these web variants of Sphere.


^__^
http://wiiubrew.org/wiki/Internet_Browser

As it so happens, the Wii U Internet Browser has special Javascript functions to utilize the features of the GamePad as well as Wiimote and Classic Controllers. If you have some Javascript application of any kind that's accessible from a website, you can simply include Wii-specific Javascript commands, and viola -- Wiimote/GamePad usage!

I don't know if including such JS would screw up non-Wii browsing. It shouldn't, Firefox and stuff should probably ignore the Wii commands. As long as you have another way to control things, you should be good.

Though native Wiimote support in Sphere and SphereSFML would be awesome. You could perhaps contact Mr. Carl Kenner, who created GlovePIE, which is capable of utilizing the Wiimote on PCs. He may be willing to share code with you so you wouldn't have to start from scratch.

https://sites.google.com/site/carlkenner/glovepie

For a command prompt you don't need to render your strings of a font to an image. I don't know why you can't just use font.drawText? I'm not entirely sure you understand what rendering to back buffer means... The fonts in Sphere are bitmap fonts so when you say how to render font as an image... well you're really always doing that. I guess you could be a bit more specific as to what you are trying to do? The only reason to render text to an image (ie surface) is to do some hardcore image manipulations on it, and for a command prompt you shouldn't need to do that.


Oh yeah. Plus, Javascript has wicked-awesome string manipulation, so it'd be easier to just use drawText. For some bizarre reason, I was thinking of having a variable that memorizes your keyboard input, and then displays each individual character as an image along the bottom of the screen.

But duh, I can just concatenate strings and use drawText to accomplish the same thing.

I'm not thinking clearly. Also, I'm not a very good programmer in the first place, so there's that too >_>

Quote from: "DaVince"
It won't. The only prerequisite for someone editing your files is by knowing where the files are. Yeah, Sphere is very open when it comes to this, so you'd have to be okay having the code and (non-Sphere format) assets open.

That said, there's the SPK file format, which packages your game into a single file. It's not quite like any standard archive, so you would need a special tool to unpack/extract it (this tool does exist, but people may not know about it). It also has some issues with for example MIDI playback. People can run the SPK by dragging it to the engine.exe (or you make a batch file which does that). I think I'll write the instructions now.


Hmm. See, on the one hand, Sphere being so open is what makes our very small community so great. Nobody ever hides their code or be's stingy with their knowledge. At the same time, however, that very openness prevents Sphere from gaining a wider following -- if anyone can edit your game, you can't have any secrets, and importantly, you can't sell a game you made in Sphere (someone would just copy-paste the code).

Well, anyway, that's pretty much it for my general questions. Thanks, everyone ^_^

I'm a crappy programmer and I have no money 'cause I don't work 'cause of disabilities, but I'll find some way to contribute to the community, one of these days.

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Questions before I start work in Sphere.
Reply #14

Hmm. See, on the one hand, Sphere being so open is what makes our very small community so great. Nobody ever hides their code or be's stingy with their knowledge. At the same time, however, that very openness prevents Sphere from gaining a wider following -- if anyone can edit your game, you can't have any secrets, and importantly, you can't sell a game you made in Sphere (someone would just copy-paste the code).

I'm not so sure about that. You could still sell your games from a legal standpoint. And if you use SPKs, you get a model that's pretty similar to the LOVE game engine for example, which seems to be doing quite all right in popularity. Heck, you could even create encrypted archived data and decrypt it yourself in some JS file or external executable.

But yeah, I do think some more work in this area can really help Sphere. That, and some long-standing usability and cross-platform issues. :)