fanadventures.net

Header
English
 
Forum overview > flashlight
  • flashlight

    by jetsetwilly · Wednesday, 24. December 2014, 16:33 h ~ 3 years ago
    how to do a flashlight
    jetsetwilly
  • by SimonS · Wednesday, 24. December 2014, 16:59 h ~ 3 years ago
    SimonS
  • by jetsetwilly · Tuesday, 30. December 2014, 06:59 h ~ 3 years ago
    thank you but its too hard to understand..... i don't touch the script lua . i need video tutorials but there is nothing for visionaire studio , i come back to adventure studio theres is more tutorials and help
    jetsetwilly
  • by brut69 · Tuesday, 30. December 2014, 16:25 h ~ 3 years ago
    V.Studio requires atleast some basic understanding of Lua to do the good things and a good understanding of Lua to do the awesome things.
    If you are hoping to do a game without any programming knowledge , you are gonna have a bad time.
    brut69
  • by marvel · Tuesday, 30. December 2014, 16:47 h ~ 3 years ago
    Actually, I don't think so.

    I created "Zak McKracken between time and space" without a single line of LUA. And even most of the popular daedalic adventures like "The whispered World" didn't use LUA.

    But very "special" solutions, like a flashlight, would need LUA/shaders, that's right.
    marvel
  • by AFRLme · Tuesday, 30. December 2014, 17:22 h ~ 3 years ago
    Well you can sort of do a flashlight without shaders, by using semi-transparent images, but it's not very efficient.

    I believe with the GUI Simon is working on that it might be possible for him to implement various action part/module preset versions with parameters for some of the shader stuff. But only time will tell about that.
    AFRLme
  • by jetsetwilly · Tuesday, 30. December 2014, 19:26 h ~ 3 years ago
    in fact i don(t want to make a complex game with 3 d and and light effets, i like old school games. but i just need a siple flash light like the scene in maniac mansion, maybe the solution with the half transparent can do the trick, can you explain me how to do that? maybe a black layer overwrite the room and use a light sprite as a mask? thank you for helping me.
    jetsetwilly
  • by AFRLme · Tuesday, 30. December 2014, 20:02 h ~ 3 years ago
    VS has no support for masks or overlays. The only way to do that would be with the shader.

    The idea behind the image method would be to create a black/semi-transparent black image with a circle cut into it & you set the image as the current mouse cursor. Problem with that is that the image size can be quite large which could make your game lag considerably.

    I'm sure Simon would give you a simple example of how to create a spotlight fixed to mouse cursor if you asked him. It could even be pretty much plug & play.
    AFRLme
  • by marvel · Tuesday, 30. December 2014, 20:25 h ~ 3 years ago
    Well, actually it's not much of a problem to create and use a mask in Visionaire Studio. Just use a big black image with a hole in it as a mouse cursor. Then you have a classical flashlight. smile
    marvel
  • by marvel · Tuesday, 30. December 2014, 20:27 h ~ 3 years ago
    Oh... this is what Lee already wrote grin Yes, thats a working solution.
    marvel
  • by SimonS · Tuesday, 30. December 2014, 20:31 h ~ 3 years ago
    Step-by-step:

    1) Load this script: http://wiki.visionaire-tracker.net/images/a/a5/Shader_toolkit_0.8.9.lua

    (is linked btw on this site: http://wiki.visionaire-tracker.net/wiki/Shader_%28CMS%29)

    2) open with an texteditor
    3) copy everything
    4) in your Visionaire project go to scripts (last symbol left side)
    5) add a script with the plus
    6) paste
    7) add another script
    8) paste this:

    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)))

    1
    2
    3
    4
    5
    6
    7
    8
    9

    9) save & run

    requires the newest 4.1 editor and player.
    Is a very basic sample.
    If want to turn it off, you can use the action execute script, and paste shaderDeactivateLighting() there.
    The settings can be tweaked a little, but it's just a basic flash light.
    SimonS
  • New post