Search Result

  • RE: Flashlight around the character circle style

    This is the same thing.How we make shader follow char. I think I made it but there is any tutorial for shaderLamp?I think it's basically the same thing as the script you shared except instead of 2 different lights you will be using 1 light. Does that script you shared work ok? I'm pretty sure I recall Simon mentioning that shader binding method had changed at some point.If Simon doesn't see & reply to this post sometime over the next few days then I'll ask him on Skype - if I remember.

    by afrlme, 8 years ago

    12
    0
    afrlme 8 years ago
  • RE: Flashlight around the character circle style

    This is the same thing.How we make shader follow char. I think I made it but there is any tutorial for shaderLamp?

    by nikos papa, 8 years ago

    12
    0
    nikos papa 8 years ago
  • Flashlight around the character circle style

    shaderActivateLighting(2)shaderLamp(0, 0, {900,500,1}, {0,900,10}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)shaderLamp(1, 1, {1000,50,1}, {0,0,1}, {0.01,0.0,0.00001}, {0,0,0}, {1,1,1}, 1)bind("light1", "lights[0].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), 1))bind("light1", "lights[0].targetpos", point(inverty(cursor), 10))bind("light1", "lights[1].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), factor(dist(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200})), cursor), 10)))I saw this code which have both of them. How can I make it only show the curcle without hovering on character?Also if possible exlpain me how we make shader follow character.

    by nikos papa, 8 years ago

    12
    0
    nikos papa 8 years ago
  • RE: water reflections

    Check out this thread: http://www.visionaire-studio.net/forum/thread/shader-question-solved-/ don't ask me how to edit the openGL shader script though as I have no clue.If you are just wanting basic reflections & don't need to show character reflections then you could create them as regular animations. Technically you could create character animations too by creating an npc character & have it follow around & mirror your characters animations, but it would probably require a fair bit of work on your end to get it looking & working exactly as you want.

    by afrlme, 8 years ago

    2
    0
    afrlme 8 years ago
  • RE: lua - swapping assets for night mode

    I see @ARFLme! Is there some GLshader (I'm not even sure what shaders can do or cannot do) that can be applied on Scene objects (not the whole scene) and allow the particular scene object to be blended with the underlying layers in a manner other than opacity? eg. multiply blending, additive, substract,divide etc?Simon is the best one to ask about the shaders. He's the one that implemented it into the source code & wrote the shader toolkit script which is available on the script index page of the wiki.To my knowledge only some of the premade shader effects can be applied to scene objects though it's possible if you have enough savvy (I don't) to write your own shader functions & effects to apply to the scene / scene objects, etc.You could actually create an image the size of your scene which contains the background & all of the static objects that can't be manipulated/picked up. Other than that I don't know... I still think best approach would be 2 scenes. Getting the position of all your characters on current scene & teleporting them to same position on the new scene is pretty straightforward.

    by afrlme, 8 years ago

    13
    0
    afrlme 8 years ago
  • RE: lua - swapping assets for night mode

    Yeah, you could have tinted screen a color & set the strength with the openGL shader or apply lighting (spotlights) in any color you like, but neither of those options would add shadows or anything as it's still a 2D game. Useful if you want to darken a room & give your character a flashlight or the scene shifts between dark & light due to it being a dark room with some flashing/pulsing fluorescent lights or emergency lighting.

    by afrlme, 8 years ago

    13
    0
    afrlme 8 years ago
  • RE: lua - swapping assets for night mode

    Is it possible to work with color filters to darken a room?Maybe with the openGL shader to tint the screen a specific hue? Or you could use openGL lighting... Or overlay some semi-transparent dark images over the scene - also a possibility.

    by afrlme, 8 years ago

    13
    0
    afrlme 8 years ago
  • RE: Scrolling following character as soon as he walks

    Yes, adjusting the bounding boxes seems to be the best solution.For the info: I tried your solution with "-10px" but no success, still the same effect going left.I'll look also in the Shader Toolkit, but will probably need some time to understand it well..Thanks again for your help !You don't have to use the game.WindowResolution values. game.WindowResolution is returning the width/height of the default game resolution you specified for your game in the game properties section of the editor, so game.WindowResolution.x / 2 is default resolution width shared by 2 (half width). You could simply type something like this instead if you prefer...[code]game.GameHorizontalScrollDistance = 3oo -- 300 pixels from edge of screen (x-axis)game.GameVerticalScrollDistance = 200 -- 200 pixels from edge of screen (y-axis)[/code]... here we've told it to only scroll vertically if the character position reaches 200 pixels from the top or bottom of the current viewport (current camera position on the scene) or 300 pixels from the left or right hand side of the viewport.

    by afrlme, 8 years ago

    5
    0
    afrlme 8 years ago
  • RE: Scrolling following character as soon as he walks

    Yes, adjusting the bounding boxes seems to be the best solution.For the info: I tried your solution with "-10px" but no success, still the same effect going left.I'll look also in the Shader Toolkit, but will probably need some time to understand it well..Thanks again for your help !

    by chris, 8 years ago

    5
    0
    chris 8 years ago
  • RE: Scrolling following character as soon as he walks

    No sorry. It's not something I bother doing. I prefer to let the character walk into the bounding boxes. Instead of having it centered exactly on the character you could adjust the width / height of the bounding boxes instead so that it's not exactly on the character...Actually wait... just thought of something... maybe it's because the values are the same & are causing conflict.Try...[code]game.GameHorizontalScrollDistance = (game.WindowResolution.x / 2) - 10game.GameVerticalScrollDistance = (game.WindowResolution.y / 2) - 10[/code]It's not quite centered on the screen now. 10px offset now.Alternatively you could try using the openGL [url=https://wiki.visionaire-tracker.net/wiki/Shader_(CMS)]shader toolkit[/url] & the [url=https://wiki.visionaire-tracker.net/wiki/ShaderFollowCharacter_(CMS)]shaderFollowCharacter()[/url] function. It acts kind of similar, but you can specify easing for it.

    by afrlme, 8 years ago

    5
    0
    afrlme 8 years ago