Author Topic: Distributing Question  (Read 204 times)

Offline East

  • Newbie
  • *
  • Posts: 12
    • View Profile
Distributing Question
« on: May 29, 2017, 04:25:13 pm »
Hey guys!

I feel kinda silly asking this, but I'm just so used to Sphere 1.5 that everything in miniSphere is a struggle for me. So here's the thing:

I'm used to just copying my game's folder into Sphere's (1.5) folder, renaming it "startup", deleting, renaming some stuff and it's pretty much good to go. What's the protocol now with miniSphere for this? I searched the forums for a good hour and didn't find anything, and I can't seem to find the solution myself.


Offline Fat Cerberus

  • miniSphere Developer
  • Global Moderator
  • Kitty-Eating Cow
  • *****
  • Posts: 2228
  • *MUNCH*
    • View Profile
Re: Distributing Question
« Reply #1 on: May 29, 2017, 04:33:33 pm »
Your method should still work, as long as you distribute minisphere.exe and NOT spherun.exe (the latter is for developers and this doesn't honor startup games).  It's actually easier than Sphere 1.5 because you don't need any extra DLLs, just the system folder.
miniSphere 4.5.11 - Cell compiler - SSJ debugger
Forum Thread | GitHub Repo

Offline East

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Distributing Question
« Reply #2 on: May 29, 2017, 04:45:19 pm »
Thanks! It works.

Seems kinda obvious - I did try this but it was after I changed the directory structure from the old 1.5 layout into the new layout, and didn't really know what to do next - I then copied the whole game directory into miniSphere, and so the engine didn't recognize it. I should have only copied the "dist" folder and renamed it "startup" (I think... right? That's what I tried now and it works).

Offline Fat Cerberus

  • miniSphere Developer
  • Global Moderator
  • Kitty-Eating Cow
  • *****
  • Posts: 2228
  • *MUNCH*
    • View Profile
Re: Distributing Question
« Reply #3 on: May 29, 2017, 08:44:57 pm »
Yep, "dist" is everything you need when distributing your game (hence the name).
miniSphere 4.5.11 - Cell compiler - SSJ debugger
Forum Thread | GitHub Repo

Offline DaVince

  • Used Sphere for, like, half my life
  • Administrator
  • Hero Poster
  • *****
  • Posts: 824
    • View Profile
    • Vincent Beers portfolio
Re: Distributing Question
« Reply #4 on: May 30, 2017, 02:21:18 pm »
What also works is packaging it into an spk file and putting that file right alongside minisphere.exe. The engine will just run that instead.

And another way to make it work is to just have the one game in the games/ folder and no other games. That'll just automatically run the only game available.

Offline East

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Distributing Question
« Reply #5 on: May 31, 2017, 03:41:17 pm »
If I run it into an SPK, and I have a save folder that my game uses to write its save files, will it save files into the SPK or will it create a seperate folder? I wanted to check this myself but creating the SPK takes a really long time, gonna have to keep it overnight.  :)

Offline DaVince

  • Used Sphere for, like, half my life
  • Administrator
  • Hero Poster
  • *****
  • Posts: 824
    • View Profile
    • Vincent Beers portfolio
Re: Distributing Question
« Reply #6 on: May 31, 2017, 06:31:04 pm »
It keeps saves of everything in %USER%\AppData\MiniSphere\GameName, if I'm not mistaken... or at least, something similar on it. (I run Linux, but Fat Cerberus can tell you for sure!)

Offline Fat Cerberus

  • miniSphere Developer
  • Global Moderator
  • Kitty-Eating Cow
  • *****
  • Posts: 2228
  • *MUNCH*
    • View Profile
Re: Distributing Question
« Reply #7 on: May 31, 2017, 11:02:05 pm »
If you're using the Sphere v2 API, you specify save files explicitly as ~/path/to/filename, so they don't get saved in the game directory anyway (and trying to do that is a sandbox violation).  For Sphere v1 API functions, which need to be 1.x-compatible, any writes to the SPK are virtualized to a subdirectory of <mydocs>/miniSphere/.spkCache.  The virtualization process is transparent to game code which acts just as if you actually saved the file to the SPK.
miniSphere 4.5.11 - Cell compiler - SSJ debugger
Forum Thread | GitHub Repo