Skip to main content

News

Topic: miniSphere 5.2b3 (stable 5.1.3) (Read 287209 times) previous topic - next topic

Re: miniSphere 5.0.1
Reply #2175
Alright, that's good (for me at least). I wasn't sure if it was something I was doing wrong, because I'm rewriting my old robotfindskitten port, and I was worried that it might be bogging it down.

  • scojin
  • [*]
Re: miniSphere 5.0.1
Reply #2176
I recently updated from 4.5 to 5.0.1 so I already know I'm going to run into a heap of issues with the project I'm working on. I got the cellscript working and have a successful build, but I'm getting errors in my main script when importing my own modules.
I'm sure there is a lot of nuance and order that is over my head, so is there an example demo that I could view? I've looked at the getting started tutorial and it helped a little bit, but I've got a small rat's nest that's gotta be sorted through.

Any tips on updating projects from the older version of minisphere? Any recommended reading would be great, too!
Thanks!

  • Rhuan
  • [*][*][*][*]
Re: miniSphere 5.0.1
Reply #2177
I recently updated from 4.5 to 5.0.1 so I already know I'm going to run into a heap of issues with the project I'm working on. I got the cellscript working and have a successful build, but I'm getting errors in my main script when importing my own modules.
I'm sure there is a lot of nuance and order that is over my head, so is there an example demo that I could view? I've looked at the getting started tutorial and it helped a little bit, but I've got a small rat's nest that's gotta be sorted through.

Any tips on updating projects from the older version of minisphere? Any recommended reading would be great, too!
Thanks!
This should probably be a topic in support rather than engine dev but :P

The getting started tutorial is horribly out of date right now... :(

One important change if moving from 4.x to 5.x is to get rid of uses of transpile() in your cell script - scripts should just be install()'ed with 5.x.

Also if using the import operator scripts need the extension ".mjs" rather than ".js".

Here's a link to a simple example project in miniSphere 5.0, very early demo of my remake of Kefka's Revenue (mostly just showing off the map engine I've made):
https://www.dropbox.com/s/x5sfkcad3jjhk91/KRdemo.zip?dl=0

If you need more specific help saying what error messages you're getting exactly and posting some of your code would make it easier.

If the problems are just with import then maybe read the MDN article on it: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
The common places I expect people to go wrong with it are:
a) get the file path wrong (import expects relative paths)
b) confuse default exports with other named exports
c) try and use static import syntax in a dynamic way
d) not use the .mjs extension that miniSphere requires
  • Last Edit: November 20, 2017, 02:32:57 pm by Rhuan

  • scojin
  • [*]
Re: miniSphere 5.0.1
Reply #2178
Okay, thanks for the help.
Issues were file extensions(.js to .mjs) and getting rid of the tutorial changes.
I'll start a new thread if I have anymore questions.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 5.0.1
Reply #2179
a) get the file path wrong (import expects relative paths)

Not entirely accurate - you can use a full path so long as it has a SphereFS prefix, e.g. @/bin/awesome.mjs.
miniSphere 5.2b3 (stable: 5.1.3) - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan

Re: miniSphere 5.0.1
Reply #2180
I've been busy with IRL things so I haven't gotten a chance to work on it yet, but I was thinking about how I'm going to implement a mobile specific API, and I wanted to get your opinion on it before I start. Hopefully it will be compatible with both Android and iOS, but I don't have a macOS computer and don't feel like jumping through hoops.

Code: [Select]
`MobileDevice` Object
----------------------

MobileDevice.Default [read-only]

 Gets the device running miniSphere. This will likely only exist on mobile builds

MobileDevice.Platform [read-only]

 Can be 'android' or 'ios'

MobileDevice#activateTiltSensor()

 Activates the device's tilt sensor. If it is not activated, calling
 MobileDevice#getTilt() will return null

MobileDevice#deactivateTiltSensor()

 Deactivates the device's tilt sensor

MobileDevice#getTilt()

 Returns an object with x, y, and z float values representing the device's angle

MobileDevice#activateAccelerometer()

 Activates the device's accelerometer. If it is not activated, calling
 MobileDevice#getAcceleration() will return null

MobileDevice#deactivateAccelerometer()

 Deactivates the device's accelerometer

MobileDevice#getAcceleration()

 Returns an object with x, y, and z float values representing the device's
 current acceleration

MobileDevice#deactivateAllSensors()

 Deactivates all currently activated sensors

MobileDevice#getTouchCoordinates()

 Returns an array of objects with x and y coordinates for the current number
 of touches. If the screen isn't being touched, it will return a 0-length array.

Thoughts?

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: miniSphere 5.0.1
Reply #2181
Looks pretty good to me, and generic enough to Just Work on both platforms.

Re: miniSphere 5.0.1
Reply #2182
That was the idea. Also, I may or may not have brought this up before, but most games developed for desktop miniSphere won't be compatible with mobile miniSphere and vice versa without some heavy modification.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 5.0.1
Reply #2183
I think the engine needs moar eaty pigz
miniSphere 5.2b3 (stable: 5.1.3) - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 5.1.0
Reply #2184
miniSphere 5.1.0 is out just in time for Christmas!  Not as many new features in this release as I originally planned, but I wanted to get a release out as it's been almost two months since 5.0.1. and I've done several important bug fixes since then.

Sphere API level is now 2.

Merry Christmas! :christmas_tree:
miniSphere 5.2b3 (stable: 5.1.3) - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: miniSphere 5.1.0
Reply #2185
Merry Christmas! What you've done with Sphere in the last year is truly astonishing! Great work!!
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

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: miniSphere 5.1.0
Reply #2186
So, I download a fresh, clean copy of MiniSphere 5.1.0 and I run a new, default game in the editor and I get a reference error. It says 'screen' is not defined.

I'm thinking of maybe creating games again, hahaha. I have a Raspberry Pi and I'd love to see if maybe it's possible to have Sphere games run on it someday.
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

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 5.1.0
Reply #2187
That's odd, because 5.1.0 was supposed to fix that:
https://github.com/fatcerberus/minisphere/commit/51de201d53df8e4dc82afc6cff9f969f0a298890

So yeah, change any instances of "screen" to "Surface.Screen".
miniSphere 5.2b3 (stable: 5.1.3) - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: miniSphere 5.1.0
Reply #2188
I actually just fixed that with Surface.Screen. I installed the engine and editor with the installer and I indeed see 5.1.0 in the about config.

Anyways, I'm going to try and see what I can do with the new API. Things are much different. Better, but different so, I'll have to learn a few things.
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

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • miniSphere Developer
Re: miniSphere 5.1.0
Reply #2189
Protip: The Sphere 1.x API is still available, and for the most part can be freely mixed with v2 API code.
miniSphere 5.2b3 (stable: 5.1.3) - Cell compiler - SSj debugger - thread | on GitHub
For the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan