Experimental Greenworks plugin

Discussion and feedback on Construct 2

Post » Mon Oct 20, 2014 7:38 pm

Hi folks,

If you're after Steam integration with NW.js good news: I've got Greenworks working within a C2 plugin. Here are the downloads (these require C2 r185+, newer NW.js versions require r217+):

Greenworks plugin releases

Greenworks 0.3 alpha - for node-webkit 0.10.x
https://dl.dropboxusercontent.com/u/15217362/greenworks.c2addon

Greenworks 0.4 - for node-webkit 0.11.x
Changes in this update:

- [ADD] 'Is overlay enabled' condition, 'Activate overlay' action
- [CHANGE] Updated to Greenworks-0.4.0 with support for node-webkit 0.11.x; now supports 64-bit OSX and Windows builds
- [CHANGE] New icon
- [FIX] Made 'On achievement success/error' triggers - they previously were not marked as such so probably did not work

https://dl.dropboxusercontent.com/u/15217362/greenworks-0.4.0.c2addon

Greenworks 0.13.0 - for NW.js 0.13+ (updated February 1st 2016)
Changes in this update:

- [ADD] Support for NW.js 0.13+ for win32 and win64 only (note Mac and Linux support is not expected to work in this release).
- [ADD] 'On overlay activated' / 'On overlay deactivated' triggers
- [ADD] GameLanguage and UILanguage expressions

https://dl.dropboxusercontent.com/u/15217362/greenworks-0.13.0.c2addon

Greenworks for NW.js 0.14.7 (2nd August 2016)
Uses the following versions:
NW.js: 0.14.7
Steamworks SDK: 1.37
Note: this version only supports 64-bit platforms (Windows, Mac and Linux 64-bit) - there is no support for 32-bit Windows or Linux.

Download: https://dl.dropboxusercontent.com/u/15217362/greenworks-0.14.7.c2addon

Greenworks for NW.js 0.15 (2nd August 2016)
Uses the following versions:
NW.js: 0.15
Steamworks SDK: 1.36 (note not the latest version)

Download: https://dl.dropboxusercontent.com/u/15217362/greenworks-0.15.0.c2addon

Greenworks for NW.js 0.19.4 (20th January 2017)
Uses the following versions:
NW.js: 0.19.4
Steamworks SDK: 1.38a

Note: this release requires adding extra DLL/library files - see updated instructions below.

Download: https://dl.dropboxusercontent.com/u/15217362/greenworks-0.19.4.c2addon

Support notes
Note if Steam is unavailable or something has gone wrong "is available" will be false, so check it's true before using Steam features. There should be a message in the dev tools console if something went wrong (use the 'Show dev tools' action in the NW.js plugin to check).

Greenworks also doesn't work in preview mode yet, sorry!

Changes after export to get Greenworks working
To get it working you need to make some changes after exporting as NW.js. Note Greenworks does not currently work in preview mode ("is available" will be false).

1a. Add the Steamworks SDK library to package.nw
Package.nw is just a zip file with a different extension. You can open it either by renaming it to .zip, adding a file, then renaming it back to .nw (Windows must be set to show file extensions). Alternatively you can associate the .nw file extension with a program that can open zips like WinRAR and just drag-and-drop extra files in.

Download the Steamworks SDK from the Steam partner site. From the redistributable_bin folder, copy the appropriate file for the platform. For example add steam_api.dll to package.nw for the win32 build, steam_api64.dll for the win64 build, etc.

Note you must match the Steamworks SDK version listed with the Greenworks version! You may have to download an old version of the Steamworks SDK to make sure it's compatible.

1b. Add sdkencryptedappticket library
As of Greenworks for NW.js 0.19.4, you need to add another library file. This can be found in public\steam\lib in the Steamworks SDK. You need to copy this to package.nw in the same way you did for steam_api.dll. For example for the win64 version, copy public\steam\lib\win64\sdkencryptedappticket64.dll to package.nw.

2. Make sure the executable filename is nw.exe
For some reason it doesn't work if the executable file has a different name. So make sure the main executable filename is exactly nw.exe. You can always use a shortcut to hide the real name of the executable.

3. Create a text file named steam_appid.txt in the same folder as nw.exe
The steam_appid.txt file should contain nothing but your app ID on Steam. If you don't have one yet, for testing you can use Construct 2's app ID of 227240. You must also have Construct 2 installed on your copy of Steam. It can be the free edition, and it works fine side-by-side with a non-Steam install. (If the app ID is not valid and installed, Greenworks won't work.) Also make sure the file has an ANSI/ASCII encoding in your text editor, otherwise it may put a UTF-8 BOM at the start of the file.

4. Make sure Steam is running and you are logged in to Steam
Greenworks requires Steam to be running in the background with a logged in user to work.

5. Start the app and check Greenworks features work.

Remember: you must match all the versions of Greenworks, NW.js, and the Steamworks SDK. If anything goes wrong use the 'Show dev tools' action to check the browser console.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Mon Oct 20, 2014 7:42 pm

Ohhhh shiny! :)
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Mon Oct 20, 2014 8:00 pm

Wow, nice! I was considering posting a game up on Greenlight and knew that having Steam features would go a long way towards getting approved, so thanks for this tool.

-Mike
Image
MIKE ASCHENBRENNER | RCMADIAX
Twitter/Instagram/Vine: @RCMADIAX
B
35
S
7
G
4
Posts: 186
Reputation: 4,574

Post » Mon Oct 20, 2014 8:26 pm

This is awesome, @Ashley! Getting it ready for testing right now!! Will report back to this thread.
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Mon Oct 20, 2014 8:51 pm

awesome, very eager to try this out
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Mon Oct 20, 2014 9:20 pm

Slow clap, two thumbs up, etc. This is awesome.
Image
B
96
S
36
G
17
Posts: 351
Reputation: 15,903

Post » Mon Oct 20, 2014 9:38 pm

Wow, this is awesome! Thanks for putting work into Greenworks, Ashley!
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,826

Post » Mon Oct 20, 2014 10:23 pm

Image

Penelope is set to be released on Steam mid-january... you just saved my dev life!!!

RIGHT ON TIME !!! <3 <3 <3
Image | @AurelRegard on twitter
B
19
S
6
G
1
Posts: 307
Reputation: 2,500

Post » Mon Oct 20, 2014 10:32 pm

@Ashley - this is incredible. I can confirm it works. I got the achievement on the mac version, about to reset my achievements for my steam user and test again on the windows version now. VERY VERY VERY VERY VERY COOL and infinite thank you from me. I've been dreaming of this since i was first in greenlight in January :) So amped the day is here.

Image

Came up with the notification box and everything. <3

Thank you again :)
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Mon Oct 20, 2014 10:43 pm

Working great from Windows as well! Amazing work!!!

Image
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 29 guests