Skip to main content
↑
↓
Spherical forums
Community for the
Sphere game engine
New?
Contact Us
to register an account!
1 Hour
1 Day
1 Week
1 Month
Forever
Community
Help
Search
Recent Posts
Log in
Contact Us
News
Spherical
Facebook
-
Twitter
-
Discord chat
New?
Contact us
to register an account!
User-Made
Libraries
Library Support
[scenario] Upgrading from version <= 2
1
Print
Topic: [scenario] Upgrading from version <= 2
(Read 5189 times)
previous topic
-
next topic
0 Members and 1 Guest are viewing this topic.
N E O
Hero Poster
Posts: 585
Making it happen!
Logged
Administrator
Senior Administrator
[scenario] Upgrading from version <= 2
July 03, 2013, 03:44:20 pm
I've long extolled the virtues of using Scenario for scriptable cutscenes and use a modified version of it in my
NShoot demo
Artyxx
. The main modifications were mostly to hook it up to the various wrappers and such I use in its code and the version I modified is either a later v1 or an early v2; the mod refers to it as NQueue for those who are so inclined to look for it in the source and also adds the ability to load command presets from slightly broken JSON files (the breaker is the addition of function objects that vanilla JSON doesn't support).
Updating the code to a more recent version of Scenario:
1. Are there any major breaking changes I should be aware of between the old version and 3.6?
2. Should I hold off on updating until the eventual v4 or will there be more breaking changes?
I would still be modifying it to fit NShoot and be able to load preset files, but otherwise I'd keep it pretty much intact (I may have to rework the render/update loop depending).
Fat Cerberus
Big Chungus
Posts: 2,774
*MUNCH*
Logged
Global Moderator
Sphere Developer
Re: [scenario] Upgrading from version <= 2
Reply #1
–
July 03, 2013, 07:01:29 pm
The biggest breaking changes going from 2.x to 3.6 is going to be: 1) The fact that Scenario no longer runs its own update/render loop, meaning you have to add it in your update/render scripts, and 2) It no longer detaches and reattaches the input automatically, nor will changes to the camera or screen fades be automatically reverted (fades now persist after a cutscene, so if you forget to fade in you'll leave the player with nothing to look at). On the plus side, it no longer requires the map engine to be running, so if you want to use the functionality outside of the map engine or even use Scenario with a custom map engine, you can.
The rest is mostly just cosmetic stuff, like renaming methods and scenelets, that kind of thing. Breaks API compatibility, but doesn't change the functionality much, if at all.
As for 4.0, going from 3.6 to that shouldn't be too big a hurdle. I'm going to try to maintain as much compatibility as possible, the only real breaking change I can see will be the addition of a finish() callback for scenelets, which is called after the scenelet stops executing (i.e. when update() returns false). Oh, and you'll also be able to use 'this' to store data for a scenelet instance, instead of the clunky 'state' argument. Other than that, it'll just be additions, specifically the ability to set in-scene variables to do conditional execution (loops and branching). The uses of looping are obvious, and the main thing I envision for branching being used for is in-scene menus, e.g. dialogue trees and the like.
Last Edit
: July 03, 2013, 07:06:00 pm by Lord English
neoSphere 5.9.2
-
neoSphere
engine -
Cell
compiler -
SSj
debugger
forum thread
|
on GitHub
Fat Cerberus
Big Chungus
Posts: 2,774
*MUNCH*
Logged
Global Moderator
Sphere Developer
Re: [scenario] Upgrading from version <= 2
Reply #2
–
July 05, 2013, 11:46:18 pm
@NEO: I just released Scenario 3.7 with the new conditional and looping features, you should check it out. It includes a major breaking change (no 'state' argument, scenelets use 'this' for state), so I figured it was better to get this out now than later so I can concentrate on the bigger changes I want to make in 4.0.
Edit:
Now at 3.7.2 after several embarrassing hotfixes.
Last Edit
: July 06, 2013, 01:42:47 am by Lord English
neoSphere 5.9.2
-
neoSphere
engine -
Cell
compiler -
SSj
debugger
forum thread
|
on GitHub
1
Print
User-Made
Libraries
Library Support
[scenario] Upgrading from version <= 2