Experimental Greenworks plugin

Discussion and feedback on Construct 2

Post » Wed Feb 24, 2016 6:31 pm

TheRealDannyyy wrote:
Sethmaster wrote:I am adding to his statement with the fact that you can simply use the official save and load functionality for your own custom save files. Without much hassle.

How?
Pretty easy.

For saving, as indicated in the manual, on saving complete, save a copy of the save json into your own custom file that you created for this purpose. Remember to use a marker so you can identify if the json is a new one or will it replace an existing one in that file.

When loading, just parse through the file and load the correct json using the load from json function which is provided officially by Scirra.
There you go, easy as it can be. And you can have full cloud support with your own custom files.

The built-in savestates are an awesome alternative for more "simple" games were saving certain global variables doesn't matter that much.
However, if you have a game were you want to save variables only, I prefer using webstorage (my modified version with encryption inside), I just recently changed to local storage because it is technically save from any way of manipulation. (To be honest, waiting for localstorage to do its work is still annoying and I consider to go back to my old webstorage saving method in future.)

So to sum it all up, if I would make a custom saving system to a file, do I have to encrypt the variables saved into the file?
I appreciate all kinds of links to existing separate file saving methods, sorry that I went off-topic here!
(I know that the most of the users who subbed to this topic only want to know news about greenworks and not things like this. :roll: )


I don't get the snide remark about simple games since my game is far from simple but let's not pursue that any further, for courtesy sake.

Now, since you already have the required saving information in variables, it is a simple matter of reading the previous information in a custom file into a string variable and then parse it to see which of the new information will replace which or be added as new. After all the computation is done, simply write the variable containing all the saving info into the same custom file (e.g. settings.ini).

If you want to add some encryption to the mix, simply do it inside the game event sheets for decrypting after reading the file and encrpyting just before writing the data into the file as just another part of the computation.

This is not hard at all, just very tedious.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Wed Feb 24, 2016 11:17 pm

Sethmaster wrote:
TheRealDannyyy wrote:...
So to sum it all up, if I would make a custom saving system to a file, do I have to encrypt the variables saved into the file?
I appreciate all kinds of links to existing separate file saving methods, sorry that I went off-topic here!
(I know that the most of the users who subbed to this topic only want to know news about greenworks and not things like this. :roll: )


I don't get the snide remark about simple games since my game is far from simple but let's not pursue that any further, for courtesy sake.

Now, since you already have the required saving information in variables, it is a simple matter of reading the previous information in a custom file into a string variable and then parse it to see which of the new information will replace which or be added as new. After all the computation is done, simply write the variable containing all the saving info into the same custom file (e.g. settings.ini).

If you want to add some encryption to the mix, simply do it inside the game event sheets for decrypting after reading the file and encrpyting just before writing the data into the file as just another part of the computation.

This is not hard at all, just very tedious.


The thing is, I don't want systems like my current webstorage one were it has a fixed path, I want a system that does all the work for me.
The "webstorage+" plugin my friend made is good and works fine, but still has a lot of events I have to deal with.
(Similar to the local storage plugin were you have to wait until it has done its work.)
I want a system that is easy to use, customizable and that is safe from any kind of manipulation. (Something like you told me with ini files.)

I know that you probably think "just deal with it", I get that if you do but I'm more the type of guy that wants to
focus on visuals and create maps + gameart instead of working a lot with the eventing system.
I have some years of experience and know how the most of the stuff works but I guess there will always be better and more simple ways to create something like this.


Sethmaster wrote:I don't get the snide remark about simple games since my game is far from simple but let's not pursue that any further, for courtesy sake.

I mean like, I want to set e.g. audio, graphics and other gameplay settings and reset all the positions, behaviors, events completly when loading a save.
For me the savestates look like something for either huge games where it is almost impossible to save each variable into a file or more "simple" games like platformers were you want to load directly into the last spot you were in.
My game has an online mission based system, so you can kinda see why full-state saving is not the best solution for that.

Could you maybe include the links to the plugins or tutorials for the systems you recommend me to use? :)
ImageImageImage
B
69
S
24
G
78
Posts: 694
Reputation: 45,328

Post » Mon Feb 29, 2016 12:10 pm

Ok to get this thread back on topic again... :P

Great news! The new version of Greenworks is released (Greenworks v0.5.2 for NW.js v0.13.0-beta7)
https://github.com/greenheartgames/gree ... /tag/0.5.2

@Ashley ... just in case you didn't saw it already
B
73
S
30
G
7
Posts: 86
Reputation: 7,653

Post » Mon Feb 29, 2016 12:31 pm

Great stuff - I plan on getting stuck into this soon :)
B
45
S
9
G
2
Posts: 142
Reputation: 4,199

Post » Mon Feb 29, 2016 1:17 pm

EpicPixel wrote:Great news! The new version of Greenworks is released (Greenworks v0.5.2 for NW.js v0.13.0-beta7)
https://github.com/greenheartgames/gree ... /tag/0.5.2

Good to know about this. Thanks. :)
B
137
S
33
G
17
Posts: 1,560
Reputation: 20,797

Post » Mon Feb 29, 2016 2:29 pm

Good news! The latest official Greenworks release works with NW.js 0.13.0-beta7 (which is now available at scirra.com/nwjs). However for some reason they didn't include the 32-bit builds of Greenworks! The 64-bit build works. The last hurdle now is just to get ahold of those 32-bit versions, then we can ship Greenworks in C2 itself.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095

Post » Mon Feb 29, 2016 2:50 pm

greenworks-win32.node with official greenworks source sdk136 nw13beta7, if you want @Ashley
Image Image
B
26
S
15
G
142
Posts: 881
Reputation: 74,060

Post » Mon Feb 29, 2016 3:17 pm

Niceone, keep it up! :)
Don't get me wrong on this but I'm waiting for a stable and bugfree state of NW.js for months now!
I think the plugin is already quite stable but NW.js should really step up and get to an end soon. :|

@Ashley are there any news on the official C2 adaption of the plugin with possible extras, automatic NW.js + Steam export maybe?
(I know that we are waiting for the 32bit version.)


EpicPixel wrote:Ok to get this thread back on topic again...

Yeah sorry about that again, I'll make a seperate topic for questions like that in future. :oops:
ImageImageImage
B
69
S
24
G
78
Posts: 694
Reputation: 45,328

Post » Mon Feb 29, 2016 5:50 pm

Ashley wrote:Good news! The latest official Greenworks release works with NW.js 0.13.0-beta7 (which is now available at scirra.com/nwjs). However for some reason they didn't include the 32-bit builds of Greenworks! The 64-bit build works. The last hurdle now is just to get ahold of those 32-bit versions, then we can ship Greenworks in C2 itself.


Any news on the overlay issue? Is this fixed in the new greenworks release?
Website Twitter Indie Developer
B
20
S
6
G
4
Posts: 206
Reputation: 2,954

Post » Mon Feb 29, 2016 6:08 pm

condolent wrote:Any news on the overlay issue? Is this fixed in the new greenworks release?

This thread is enormous now and I'm not really clear on what the problem/status of that is. I think it would be best for everyone to file a report in the Bugs forum where we can focus on that (as well as any other issues). Although the Greenworks plugin is still experimental it should ship with C2 pretty soon so I don't see why not to start treating it like an official feature already.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: WesleyDeveloper9 and 3 guests