I FINALLY got Greenworks working in my test project. It spent the past day trying to figure out why the code wasn't working (the require() call needed to be nw.require() to work with NW.js or something), and once that worked I spent a few hours trying to figure out why it always returned false on my Mac but True on my windows machine. Turns out you need the steam client running, which auto starts on my virtual... doh!
But the good news is, combined with the HTML5 APIs we can hook into, I can actually create some real steam achievements based on scene changes (stage 1 complete, game complete, etc). It's not much, but it's something.
i got achievements working using Greenworks. Right now you can really only trigger achievements on scene changes, the rest of the HTML5 APIs don't really lend themselves properly. In the screenshot below you can see me triggering an achievement in the game, and it popping up in the top right.
@jonmulcahy Awesome and ground breaking stuff! I actually managed to make a windows build too a few weeks back, but no sound was playing in my game, otherwise, it was working really well.
Another interesting thing, I did alternate builds for android using the html5 files, there appears to be the potential to implement google play services as well as ad services not available through the normal GS android export. {Performance is different as well.}
@Franto said: @jonmulcahy Awesome and ground breaking stuff! I actually managed to make a windows build too a few weeks back, but no sound was playing in my game, otherwise, it was working really well.
Thanks!
I had the no sound issue too, and I managed to fix it, this was my post about it the other day:
Audio issues have to do with the HTML5 generation. During publishing .ogg and .m4a versions of all your audio files are generated (which is bad for storage but not much else), but the assets.js file in your game folder has references to both files for each sound entry.
M4A audio files require a copy of ffmpegsumo.dll, which isn't really legal to distribute outside of it's source code.
To get this to work, I took the generated HTML5 project and removed the .m4a references from the assets.js file under game\default. For the original m4a music files, I switched those to .ogg and made sure the file sizes matched. I then rebuilt using Web2Executable and sounds fired up right on que.
For anyone following along, one of the issues I've found with building this as a mac app, is that cmd-q does not quit the application. I've found this page https://github.com/nwjs/nw.js/issues/2462 with some directions on getting around it. I will try it out in the morning.
another thing, partly so I don't forget, but also for others:
when testing your achievements, it's important to be able to reset them. I found a bit of code here on how to do that, works great. I just have it called when the app first loads.: https://github.com/greenheartgames/greenworks/issues/27
I can't remember if I've ever seen a game that didn't have a proper quit button. All the more important when targeting steam if you want to get full gamepad compliance. Until now GS did not have a behavior to actually quit the game, but thanks to the built in HTML5 APIs, I've figured out how to do it.
With those APIs we can do some basic things. I'm using the change scene API. Through the API you can tell when a scene has changed, and it will return back the name of the scene as a string. What I ended up doing was create a scene called 'quit' and a button that changes to that scene. On the HTML5 side of things when a scene change is triggered and the scenename == quit, it runs some code to quit the executable. It works great on the mac, building a windows .exe now
I was going over the HTML5 API hooks we have available, and I noticed that the tweet sheet behavior just passes the message into the function. So I think we can use that to actually trigger any sort of behavior we want by using the message as an input string.
Today I'm going to test using this method to trigger some in-scene Steam achievements. If it works, you could theoretically use this method to do anything.
using tweetsheet to trigger custom HTML5 actions works. You could, in theory assuming that a reward video had some sort way to report back if the button was pressed, do something like this:
in GS
tweetSheet: showVideo
in your index.html:
when tweetSheet message is showVideo, pause the game using the HTML5 API and show the video. When the video button is pressed, unpause the game.
got it working! Uploaded a build to steam, and downloaded it and played it using my test account. There are some performance issues on windows, but I see it in the non-steam build too, so it's something else. Works great on mac.
@jonmulcahy said:
got it working! Uploaded a build to steam, and downloaded it and played it using my test account. There are some performance issues on windows, but I see it in the non-steam build too, so it's something else. Works great on mac.
thanks everyone! I'm glad you like the progress reports. Not too much done today. I've spent the morning polishing up the game. I did run into so strangeness with the HTML5 build, some images were not showing up, but they did show up in preview. Turns out HTML5 images are case sensitive, but GS is not. Quick fix later and all is normal.
Well I ended up fixing the issue I saw last week, had to roll back to version 3.0.1 and redo a few things, but all's well. Yesterday I was going through and doing some last minute graphic upgrades and bug fixes. This morning I generated a Linux64, Win32, Win64, and Mac64 builds. When I get off the train I am going to package all of them up on steam and attempt a manual install using the steam client (which I've already done a few times on Windows)
I also have to put together a real website for the game. I bought http://www.alongwayho.me, so gotta put something up there.
it goes without saying, every time you think you are done you find something else to fix. Just noticed that 10 of the in game screenshots for the later levels were from the old version, gotta update them!
Comments
From my HTML5 game I've successfully created a working .app for OS X, .exe for Windows... next up Linux!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
YES!!!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Enjoying reading your progress mate keep it up hey we're all behind you
@Braydon_SFX @jay2dx thanks!
got my steam store page approved today!
http://store.steampowered.com/app/461030?beta=0
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Awesome!
@BazookaTime thanks!
I FINALLY got Greenworks working in my test project. It spent the past day trying to figure out why the code wasn't working (the require() call needed to be nw.require() to work with NW.js or something), and once that worked I spent a few hours trying to figure out why it always returned false on my Mac but True on my windows machine. Turns out you need the steam client running, which auto starts on my virtual... doh!
But the good news is, combined with the HTML5 APIs we can hook into, I can actually create some real steam achievements based on scene changes (stage 1 complete, game complete, etc). It's not much, but it's something.
Next up is actually coding that stuff to work.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
i got achievements working using Greenworks. Right now you can really only trigger achievements on scene changes, the rest of the HTML5 APIs don't really lend themselves properly. In the screenshot below you can see me triggering an achievement in the game, and it popping up in the top right.
very exciting!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy Awesome and ground breaking stuff! I actually managed to make a windows build too a few weeks back, but no sound was playing in my game, otherwise, it was working really well.
http://forums.gamesalad.com/discussion/91529/native-desktop-app-pc-standalone-exe-of-a-gs-game-works#latest
Another interesting thing, I did alternate builds for android using the html5 files, there appears to be the potential to implement google play services as well as ad services not available through the normal GS android export. {Performance is different as well.}
http://forums.gamesalad.com/discussion/91535/you-can-use-html5-files-to-create-android-iphone-apps#latest
There's the option to make iOS exports with the html5 file as well, but I haven't really tried it out myself.
Thanks!
I had the no sound issue too, and I managed to fix it, this was my post about it the other day:
Audio issues have to do with the HTML5 generation. During publishing .ogg and .m4a versions of all your audio files are generated (which is bad for storage but not much else), but the assets.js file in your game folder has references to both files for each sound entry.
M4A audio files require a copy of ffmpegsumo.dll, which isn't really legal to distribute outside of it's source code.
To get this to work, I took the generated HTML5 project and removed the .m4a references from the assets.js file under game\default. For the original m4a music files, I switched those to .ogg and made sure the file sizes matched. I then rebuilt using Web2Executable and sounds fired up right on que.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Great to see all this progress, sir!
QS =D
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
@quantumsheep thanks!!
For anyone following along, one of the issues I've found with building this as a mac app, is that cmd-q does not quit the application. I've found this page https://github.com/nwjs/nw.js/issues/2462 with some directions on getting around it. I will try it out in the morning.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
another thing, partly so I don't forget, but also for others:
when testing your achievements, it's important to be able to reset them. I found a bit of code here on how to do that, works great. I just have it called when the app first loads.: https://github.com/greenheartgames/greenworks/issues/27
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
another week, another problem solved.
I can't remember if I've ever seen a game that didn't have a proper quit button. All the more important when targeting steam if you want to get full gamepad compliance. Until now GS did not have a behavior to actually quit the game, but thanks to the built in HTML5 APIs, I've figured out how to do it.
With those APIs we can do some basic things. I'm using the change scene API. Through the API you can tell when a scene has changed, and it will return back the name of the scene as a string. What I ended up doing was create a scene called 'quit' and a button that changes to that scene. On the HTML5 side of things when a scene change is triggered and the scenename == quit, it runs some code to quit the executable. It works great on the mac, building a windows .exe now
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
and the quit button works great on windows as well... gonna try linux later today
here it is in action
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I love seeing the updates on this!
@BazookaTime thanks!
I was going over the HTML5 API hooks we have available, and I noticed that the tweet sheet behavior just passes the message into the function. So I think we can use that to actually trigger any sort of behavior we want by using the message as an input string.
Today I'm going to test using this method to trigger some in-scene Steam achievements. If it works, you could theoretically use this method to do anything.
If you like what I'm doing here, show me some love and vote for my Nuimo hack
http://forums.gamesalad.com/discussion/91911/i-need-your-votes#latest
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
using tweetsheet to trigger custom HTML5 actions works. You could, in theory assuming that a reward video had some sort way to report back if the button was pressed, do something like this:
in GS
tweetSheet: showVideo
in your index.html:
when tweetSheet message is showVideo, pause the game using the HTML5 API and show the video. When the video button is pressed, unpause the game.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
attempting to get my first build into Steam today using Steampipe. It looks pretty easy, we shall see
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
uploading my first build now... the process is easy but there are many configuration steps.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
got it working! Uploaded a build to steam, and downloaded it and played it using my test account. There are some performance issues on windows, but I see it in the non-steam build too, so it's something else. Works great on mac.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy awesome ! congratulations , you'v been working hard with it, wish you the best
Cool! Good job
Great accomplishment @jonmulcahy ! Congrats and the updates are great.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
thanks everyone! I'm glad you like the progress reports. Not too much done today. I've spent the morning polishing up the game. I did run into so strangeness with the HTML5 build, some images were not showing up, but they did show up in preview. Turns out HTML5 images are case sensitive, but GS is not. Quick fix later and all is normal.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
+1 Exactly
Check out my games on the App Store!
Wordgraphy / Polycolor / 20 Seconds / Minimal Maze
thanks!
somewhere between build 3.0.1 and 3.0.2 i messed things up and the game won't change scenes anymore.... oops!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Well I ended up fixing the issue I saw last week, had to roll back to version 3.0.1 and redo a few things, but all's well. Yesterday I was going through and doing some last minute graphic upgrades and bug fixes. This morning I generated a Linux64, Win32, Win64, and Mac64 builds. When I get off the train I am going to package all of them up on steam and attempt a manual install using the steam client (which I've already done a few times on Windows)
I also have to put together a real website for the game. I bought http://www.alongwayho.me, so gotta put something up there.
So close now!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
it goes without saying, every time you think you are done you find something else to fix. Just noticed that 10 of the in game screenshots for the later levels were from the old version, gotta update them!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
ran into a few more bugs this morning, but i think i actually have a viable release here. Steam testing begins!
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left