v00d00m4n's Forum Posts

  • 5 posts
  • Link to .capx file (required!):

    dl.dropbox.com/s/4tutb6mjhb40i30/Problem.capx

    Link to effect file used:

    scirra.com/forum/effect-2d-dynamic-lighting_topic59130.html

    Steps to reproduce:

    Export game as Node-webkit wrapper, or wrap exported html manually.

    Observed result:

    Flat texture without any bump mapping.

    Expected result:

    Bumpy and glossy DOOM 3 like texture.

    Browsers affected:

    Chrome: no, works as it should

    Maxthon: no, works as it should

    Firefox: partially - bump mapping works, but flashing during movement of ligth source

    Internet Explorer: this crap does not support WebGL at all

    Node-webkit: no bump at all, just a plain flat picture

    Operating system & service pack:

    Win 7 x64 sp1

    Construct 2 version:

    119

    Extra details:

    Notticed that bump mapping effect that looks and works find in Chrome and Maxthon does not work at all in exported Node-webkit wrapper and instead texture looks just as flat as without bumpmapping.

    Tried to update Constuct 2 bundled version to latest version from site - aint worked.

    Tried to put DX9 43 dlls into Folder - aint worked.

    Tried to put arguments --enable-webgl --ignore-gpu-blacklist to package.json - aint worked.

    (full arg line, if this might help is this:

    • -disable-extensions --disable-plugins --disable-internal-flash --disable-popup-blocking --disable-software-rasterizer --enable-gamepad --enable-html5-camera --allow-file-access-from-files --enable-webgl --ignore-gpu-blacklist

    )

    Tried get.webgl.org however it shows cude and same results as Chrome and Maxthon browsers, so that means WebGL enabled but doesnt work right or not fully featured in Node-webkit.

    Also tried to get WebGL libs from Maxthon and Chrome and replace node-webkit shipped libs with them - aint worked as well.

    Googled a little and found more reports like this, which state that "WebGL looks ugly in node-webkit comparing to Chrome and other browsers".

    ----

    Yes, i used non default effect, but it does work like charm in chrome and Maxthon, so i think problem is not in effect but in NW, and i guess problem like this may happen with other shaders in Node-webkit.

    Also thats not exactly the problem of Construct 2, but since Node-webkit included as official exe wrapper i think you should pay attention to the fact that WebGL does not work well in Node and brakes game effects.

    Probably you should contact creators of NW and solve this problem together or move to another wrapper, maybe back to awesomium or maybe compile your own branch of node-webkit with latest chromium code?

  • well, thanks to your help, at least part of what i want is already done:

    Bump mapping and simple flashlight in darkness, now i only need some real dynamic light with shadows, im pretty sure someone already have the solution and i hope that someone can share it.

    Also while i was messing with Bump mapping, i discovered really frustrating bug with Node-webkit exporter:

    Notticed that bump mapping effect that looks and works fine in Chrome and Maxthon does not work at all in exported Node-webkit wrapper and instead texture looks just as flat as without bumpmapping.

    Tried to update Constuct 2 bundled version to latest version from site - aint worked.

    Tried to put DX9 43 dlls into folder - aint worked.

    Tried to put arguments --enable-webgl --ignore-gpu-blacklist to package.json - aint worked.

    (full arg line, if this might help is this:

    • -disable-extensions --disable-plugins --disable-internal-flash --disable-popup-blocking --disable-software-rasterizer --enable-gamepad --enable-html5-camera --allow-file-access-from-files --enable-webgl --ignore-gpu-blacklist

    )

    Tried get.webgl.org in clearn node-webkit, however it shows cube and same results as Chrome and Maxthon browsers, so that means WebGL enabled but doesnt work right or not fully featured in Node-webkit.

    Also tried to get WebGL libs from Maxthon and Chrome and replace node-webkit shipped libs with them - aint worked as well.

    Googled a little and found more reports like this, which state that "WebGL looks ugly in node-webkit comparing to Chrome and other browsers".

    Is there a way to use older Awesomium wrapper instead of node-webkit, which have broken WebGL support?

    Ah, i think i should create new thread about this issue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, thanks interesting thread, but its only about bump mapping, as i understood that guy never published shader with shadows :-(

    What i need to acomplish is something almos like you can see on this GIF

    <img src="http://fexlabs.com/drops/pixel_shading.gif" border="0" />

    but with dynamic shadows as well and not in top-down view perspective.

    Imagine Another World or Heart of Darkness with lighting like this and you will get idea of how it should look like and what i need.

  • I would like to attach dynamic light source to character (sort of flashlight, but circle-shaped) and several lights, that casts dynamic shadows of all visible sprites on same layer (or few of selected if needed) and interacts with bump maps of all layers (makes them bumpy and glossy according to direction of light, just like in DOOM 3), and i want to make everything else (thats far away of lighting source) darkned.

    The point is - i want to make stealth game with character in complete darkness, and with destructible light sources and some portable light that can be toggled on\off and with smooth fading between lighting and darkness and relatively correct light and shadow distribution.

    If that possible to do? How? Any ready to use shaders out there? Any step by step tutorials where and what should i set in C2 to at least attach light to character\object and darken everything around?

    Please, help me out, im totally new in C2, just learned basic platformed techniques for c2, but i need to move on to more advanced part asap and make this lighting for game, because its a key point of gameplay.

  • I want to create game that can:

    1) Start in fullscreen (and hide cursor, as well as start in specified resolution, instead of using desktop resolution only)

    2) Can switch resolution in-game

    3) Can enumerate list of available system resolutions, instead of

    using hardcoded list

    4) Can store resolution settings in config (ini) or registry and start next time in saved resolution

    5) Can switch to windowed mode and back with standard ALT+WIN (or browser standard F11) or in-game menu item.

    6) Can keep proper aspect ratio in any fullscreen resolution, as well as any windowed mode including user stretched mode (i wish window to autocorrect ver and hor resolution as same time user resizing it, to keep aspect ratio)

    7) Can have at least 3 UI presets for 4:3, 16:9 and 16:10 displays and switch to them automaticaly according to current resolution aspect ratio.

    Or at least fixed 16:9 in every aspect, with no funny glitches.

    8) Can exit fullscreen game with menu item "exit" in addition to Alt+F4 or X button in window.

    9) Can do all of above on every posible exported platform\format (all node-webkit wrappers for linux, osx and windows are minimum i need).

    How can i achive that with Constuct 2? I dont see any in editor options for that!

    A the moment i only managed to launch node-webkit in fullscreen by editing \Construct 2\exporters\html5\node-webkit\package.json and adding

    "fullscreen": true,

    in window section. But it only allows to launch game in same resolution as desktop have now, and it upscales layout by keeping fixed horizontal aspect, vertical aspect meanwhile gets bigger, if im going from wider 16:9 to no so wider 16:10 or 4:3, if i go to anything wider than 16:9, then vertical aspect is fixed, but foreground level element with paralax set to 100 goes beyond layout and appears above black bars, while fixed background covers only 16:9 area.

    As for rest - im almost out of ideas!

    Im thinking about using javascript window.close() as function for exit button or using this github.com/rogerwang/node-webkit/wiki/Window for closing, changing resolution, switching to windowed and fullscreen, but i have no idea where in Construct 2 i should put these js functions to be called whenever button pressed in game.

    Well, im thinking about ugly hack - manually editing html file after export and adding some overlay above game with exit button that call these JS functions, but thats a lot of extra work and really ugly, comparing to native in-game expirience.

    Also i would like to auto pause game on unfocused or minimized window or during using, but yet have no idea how to make it in Constuct 2.

    Can anyone please give some tips, share portions of code from your games that would do this, or maybe Scirra guys can add these features to their TO-DO list (and with high priority, because its one of the must have features that Constuct 2 really needs ASAP) so that in near features that would be built-in and can be done easy way?

    P.S. - I can do most of that in flash with some projectors like Zinc with no problem, but here its a real problem!

  • 5 posts