Halfgeek's Forum Posts

  • Danwood

    I think I understand the problem here, since On Created is fired for your layout from a load, because its a transition from a different layout, so the objects you have already loaded up fire the event again.

    Basically its firing once too many since the original On Created event has run its course already, then you save the game with whatever changes you call in your On Created event.. loading fires it again one more time and there's clashes with the already set changes.

    You could fix this by placing your On Created triggers under a global var "IsLoaded=0" or something, basically you want to tell the game to only fire those On Created triggers IF it was not recently loaded state.

    I have a similar thing with my game, launching syncs all the data, saves the game, then the layout transitions into space after a second or two. But loading from that state means the player isn't in the port, but end up in space after being in the port for 1-2 seconds, because the save-state takes into account the current event chain, so if there's wait triggers, it will process after a load. Basically you just need to design the save/load to take into account the quirks of the system.

    Or do a fully custom file write/read save system. It avoids all of those issues and it will work like a normal layout transition, triggering On Start of Layout again (which save/load does not). Depending on the scope of the game, it may be a solution. Else just work with the system and fix the clashes.

    Edit: Some more testing with my custom save/load using NWJs file write/read, and it all works 100%. Thanks Ashley for the prompt update, very much appreciated!

  • After r218 + NW.js update, exported game works (no black screen), but the other issues are still there: i can't load any game after i save, both in preview and exported, in preview it lists several IID bugs, while in exported it just freezes looping the ambience sound.

    I tried to remove NW.js object and all its references, still nothing.

    Also, when i use the refresh action (from Browser object) it pops up a bug in preview.

    Lastly, when i right click on an in-game object (only in some situations), it opens a small browser windows with some option like inspect object, refresh etc.

    I'll make a more detailed report soon. Really hope to be able to use the new version with my massive project

    Do you use sound save-state? In the audio plugin there's an option for it. I do not use it.

    I also don't do anything fancy with events for save/load. Just load "01" and it does it, changing the layout automatically.

    I got my NWJs alpha 6 from the link in the first post.

    I've been testing with r218, with NWjs plugin and it works fine. LocalStorage works, save/load works. No right click bugs.

    In the export package-win.json I don't have any extra args besides "--in-process-gpu".

  • Err, guys...

    Has anybody get this error?

    It doesn't work with the NW plugin/object from C2.

    If you've removed it to test, there may be some left over code that references it..

  • > AlexFrancois

    > I've got thousands of images (lost track of count). So if thats the issue, mine will show it. Its nearly 12AM and I am coding a keybind UI atm so I'll test it on the MAC tomorrow.

    >

    Ah cool, I look forward to your results!

    Tested it on my Mac Air 2014, it fails to load, stuck at the C2 loading logo/bar. That's a bummer.

    Basically we have no functional option for MAC with bigger C2 games. For smaller games, I know NW 0.10.5 works.

  • Yes it's fixed in Alpha 6.

    Been testing all day, Alpha 6 is excellent.

    We just need an update to C2's NW plugin to be compatible with 0.13 Alpha 6 and all will be good.

  • AlexFrancois

    I've got thousands of images (lost track of count). So if thats the issue, mine will show it. Its nearly 12AM and I am coding a keybind UI atm so I'll test it on the MAC tomorrow.

  • Good that NW.js works again.

    > But, still we cannot export using NW.Js plugin object, same blank screen bug on startup. So we cannot use custom save/load systems, having to go with C2's default Save/Load.

    >

    >

    But unfortunately, I really need to use the NW.js plugin object for the Sandbox mode in my game, in order to load and save files in a Windows dialog UI. Any alternatives?

    That will just have to wait for Ashley to get around to fixing because its a C2 plugin incompatibility issue.

    Once its fixed, I can switch back to using the custom save system as well as text file modding access, it's pretty handy having those file access for sure.

  • Great job on the testing! Any idea how 0.13 fares with the red loading bar issue on mac and linux?

    Oh man I am really excited because this is potentially the first time that C2 for Desktop won't be plagued by nasty issues... the Holy Grail, it's nearly there, very close now.

    I can't test Linux, no experience with it at all.

    I'll test MAC tomorrow on my Mac Air.

    This NW build is really aggressive with memory cleaning, on layout change, within ~10 seconds it will call garbage collector and free up assets not present on the layout. It's nice to see memory usage drop back down.

    There is a small quirk, it seems to ignore the sound fx preload option as well as the Audio -> Preload event. But that's a very minor issues that can be easily fixed with a function call (to events to play some Sounds at -200 decibels, to "load" those sounds into memory) On Start of Layout.

    I also do function calls to "preload" sprites and explosions with lots of frames along with the sounds, and it's so good to witness a massive fleet battle between many AI factions running 100% fluid smooth. It's a thing of beauty now.

    I have many large ships including big capitals duking it out and hundreds of fighters swarming around dog-fighting, and it's zero jank, performance is outstanding.

  • Ashley

    megatronx

    Colludium

    MelVin

    Tinimations

    Danwood

    MadSpy

    Okay, some good news!!

    Just tested the NW.Js 0.13 Alpha6 (latest live build today on github).

    The cache/temporary session folder storage seems to be FIXED!

    It's a set folder under:

    C:\Users\bob2\AppData\Local\StarNomad2\User Data\Default\IndexedDB

    In my game, its folder is: chrome-extension_ihbilmccnkojgdhdikkoikjihbfjeecf_0.indexeddb.leveldb

    And it persists through game exit and relaunch.

    It IS compatible with C2's Save/Load system! Hurrah!

    But, still we cannot export using NW.Js plugin object, same blank screen bug on startup. So we cannot use custom save/load systems, having to go with C2's default Save/Load.

    I spent a day making & testing a custom file save using NW.Js read/write, also making it possible to add mod support for the game via text files... but now the default Save/Load is working fine.

    Also, Full-screen works fine. I use the Browser object to request & exit full-screen.

    Going to proceed to test LocalStorage plugin see if that works too.

    Basically if it does, then Alpha 6 is good to go and GreenWorks can be updated! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    EDIT: LocalStorage WORKS.

    The triggers Exist, Missing etc works fine, retrieving data works.

    0.13.alpha 6 is now operational! GreenWorks Steam plugin update time?! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Alpha 6 Download: http://dl.nwjs.io/live-build/11-23-2015 ... .0-alpha6/

    Just extract it over your NWForC2 folders, win32/64 etc.

  • Please allow a few weeks for bug reports to be investigated, as the guidelines describe.

    Thanks. Perhaps prioritize the easiest bug for you guys to fix since it's C2-related:

    The NW.Js C2 object is not compatible with r217 + NW 0.13.Alpha 5 NW export (blank screen on startup of .exe).

    Fixing this would enable us to use the NW.Js object file read/write to work with our custom save system.

  • Yep, that's more normal.

  • Ashley

    Any official input on these bugs? Are they something you guys can fix on your end or do we have to wait for the next iteration of Chromium and therefore, the next NW.Js built on that new Chromium?

  • Possible, if you're talented enough. There's a few good isometric RPGs being made, check them out in the sub-forum.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • "do you think it would be folly to continue?"

    See how the 0.13 alpha turns out first.

  • NW.js is the current wrapper for Desktop. It's based on Google Chromium, which is also the wrapper for Android.

    It is currently barely functional for PC only. Let me explain, its because of serious bugs in Chromium that lead to stutter in all the versions of NW.js except for 0.10.5, which is really old. So NW 0.11 and 0.12 are no-go due to stutter.

    However, 0.10.5 (& 0.11 and 0.12) also has a nasty memory leak, so if you make bigger games, it will also stutter after a short play session (mine start to stutter ~1 hr into playing), eventually becoming unplayable. If the game is smaller, this memory leak takes longer to kick in, but it's there, ever-present.

    This problem is due to Google messing up Chromium and taking a long time to fix it combined with NW.js's development cycle. We C2 users, especially those making bigger games, are shafted.

    There's good news, the current alpha of NW 0.13 has resolved both the stutter and memory leak issue.

    But there's also bad news, it's broken, can't save/load, treating saved data as temporary session browser data. It's also incompatible with the NW.js plugin from C2.

    Once the issues in the 0.13 alpha is fixed, hopefully NW 0.13 will prove to be stable on both PC & MAC. Linux is a mess.