Menu
Login
Language
DE EN FR ES IT CZ

Search Result

  • RE: Talk animation occasionally stops when there is a random loop in the scene (possible bug?) [Edit: FIXED]

    Manually preloaded animations need to be manually unloaded. Animations regularly loaded will get added to the cache until they are removed at end of scene or get pushed aside to make space for newer animations, I think.As for character animations: I believe that the standard animations (idle, talk & walk) for your playable character (not sure about npc characters) are stored in the cache indefinitely. If your character has tons of character animations, I don't really think it's a good idea to preload the character as it will store animations from all outfits associated with that character to the cache (according to the action parts page of the wiki manual - I wrote the page, but I think I mostly rewrote in my own words what it said on the old 2d wiki).The case in question in this thread will more likely than not have been lag caused by too many animations on the screen (playing / loading) at the same time. If the system lags then it will still cause slow-down in animations currently on the screen & you will probably experience the mouse cursor moving / jerking slowly across the screen if you try moving it while lag is occurring. All in all it's all down to optimizing your game, to the best of your, or your teams ability, whether that's by scaling down animation sprites, reducing the amount of frames in certain animations, converting images / animations to webp or removing certain non-important animations, images & openGL shader effects entirely, is up to you to figure out what works best for your game. It is after all, all about compromise. Is this specific feature vital to your game? or can it work without it?

    by afrlme, 11 years ago

    15
    0
    afrlme 11 years ago
  • RE: How to quit multiple actions.

    I would replace the animated balance bar thing for a single animation frame & use Lua to plot width of bar to a percentage & then position the marker based on the percentage.Convert all images to webP quality setting 10 if you haven't already done so.Make fisheye effect optional. Lower end machines don't seem to like openGL shader too much. My last laptop had various issues trying to run some test effects I was sent before VS 4 came out.If the window animation is quite large (I mean the image size & file size per frame) then consider removing a few frames if possible. Can always make an animation look smoother with less frames by entering manual delay values for each frame.

    by afrlme, 11 years ago

    22
    0
    afrlme 11 years ago
  • RE: How to quit multiple actions.

    sliding requires less cpu / memory than playing an animation. The fisheye effect for me seems to work, but returns an error to the log constantly. Shader stuff requires a fair bit of memory I think - especially the shaderEffects of which the fisheye effect could be classed under.If I remember correctly, you used some kind of animation or long winded method for setting up the mini-game, no? If I knew how you set it up fully, then maybe I could make some suggestions to make it run a bit smoother. It could just be that your machine isn't powerful enough to run everything on the scene all at once? 2D is a bigger memory hog than 3D, which is why 2D animation artists tend to use significantly less frames than in 3D animations.As for your way border question: no, it's not an issue. I extend way borders outside of the background a lot of the time - so character can walk through doors etc & out of the scene or for hiding character behind an entrance in the next scene & so on.

    by afrlme, 11 years ago

    22
    0
    afrlme 11 years ago
  • RE: Scene Zoom

    Yes, you could use the [url=http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)]shader toolkit[/url] shaderViewport() function to zoom in/out, rotate the screen & various other things with easing options.P.S: you need Visionaire Studio 4.1 onwards to use the current shader toolkit script.

    by afrlme, 11 years ago

    16
    0
    afrlme 11 years ago
  • RE: shader effects help!

    Hi, if you use multiple shaders on objects you need to use multiple ShaderSets:The second call would be:[code]local eff="ripple3"shaderAddEffect(eff)shaderRemoveEffect(eff)shader_effects[eff].num.strength=1bind(eff, "time", field("shader_iTime"))shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, 2)Objects.object5.ShaderSet = 2[/code]Just change the id.

    by SimonS, 11 years ago

    2
    0
    SimonS 11 years ago
  • shader effects help!

    Hi again guys, I want use shader effect in a scene object. If only use one effect to objects works. ok I do this:ActionsAt the beggining of the scene:Execute a script: local eff2="tv2" shaderAddEffect(eff2) shaderRemoveEffect(eff2) shader_effects[eff2].num.strength=1 bind(eff2, "time", field("shader_iTime")) shaderSetOptions({{shader = shader_effects[eff2].num(), comp_dst=5, comp_src=4 }}, 1) Objects.object1.ShaderSet = 1 Objects.object2.ShaderSet = 1 Objects.object3.ShaderSet = 1 Objects.object4.ShaderSet = 1Execute a script: local eff="ripple3" shaderAddEffect(eff) shaderRemoveEffect(eff) shader_effects[eff].num.strength=1 bind(eff, "time", field("shader_iTime")) shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, 1) Objects.object5.ShaderSet = 1Ok, If only put one of the script.work perfect.But if I want two diferent shadereffects in a two diferents objects in the same scene, I cant. Always works only the last shader efecct applied. can you help me? I read wiki but dont get it. Thanks in advance :).

    by yoyan, 11 years ago

    2
    0
    yoyan 11 years ago
  • RE: Fisheye effect

    But is it possible to exclude the balance animation? I guess i can create it as an interface otherwise.And btw the shader is really cool thing :P

    by ke4, 11 years ago

    18
    0
    ke4 11 years ago
  • RE: Fisheye effect

    Aha, i want just weak effect of the fish eye and it seems to work ok.I'm building a scene where the character walks over the ledge.The problem is that it affets inventory as well, but i think someone wrote on the forum about excluding in the shader once.[b]EDIT:[/b]It was actually you :D[code]game.ShaderExclude = eShaderExcludeInterfaces -- excludes text, cursors & interfaces, or...game.ShaderExclude = eShaderExcludeTextsAndCursor -- excludes text & cursors, or...game.ShaderExclude = eShaderExcludeCursor -- excludes cursors.[/code]

    by ke4, 11 years ago

    18
    0
    ke4 11 years ago
  • RE: Fisheye effect

    The shader toolkit is very extensible, I've coded a small test part (include the shader toolkit before running this)[code]shader_effects["fisheye"] = {shader=basic_fsh..[[uniform float amount;void mainImage( out vec4 fragColor, in vec2 fragCoord ){ vec2 p = fragCoord.xy / iResolution.x;//normalized coords with some cheat //(assume 1:1 prop) float prop = iResolution.x / iResolution.y;//screen proroption vec2 m = vec2(0.5, 0.5 / prop);//center coords vec2 d = p - m;//vector from center to current fragment float r = sqrt(dot(d, d)); // distance of pixel from center float power = ( 2.0 * 3.141592 / (2.0 * sqrt(dot(m, m))) ) * (amount - 0.5);//amount of effect float bind;//radius of 1:1 effect if (power > 0.0) bind = sqrt(dot(m, m));//stick to corners else {if (prop //Weird formulas vec2 uv; if (power > 0.0)//fisheye uv = m + normalize(d) * tan(r * power) * bind / tan( bind * power); else if (power uv = m + normalize(d) * atan(r * -power * 10.0) * bind / atan(-power * bind * 10.0); else uv = p;//no effect for power = 1.0 vec3 col = texture2D(iChannel0, vec2(uv.x, uv.y * prop)).xyz;//Second part of cheat //for round effect, not elliptical fragColor = vec4(col, 1.0);}void main(){ vec4 color; mainImage(color, texcoord.xy*iResolution.xy); gl_FragColor = color;}]]}shaderAddEffect("fisheye")shaderEffectParam("fisheye", "amount", 0.45)[/code]I've based this on [url=https://www.shadertoy.com/view/4s2GRR]https://www.shadertoy.com/view/4s2GRR[/url]. You can change the amount on the botton, with 0.5 being no change and 0.0 maximum fisheye and 1.0 being maximum bulge.You can even easily animate that:[code]fisheye_amount = 0.5bind("fisheye", "amount", field("fisheye_amount"))startTween("fisheye_amount", fisheye_amount, 0.44, 1000, easeQuadInOut, true, true)[/code]

    by SimonS, 11 years ago

    18
    0
    SimonS 11 years ago
  • RE: Fisheye effect

    You will need to integrate a glsl shader into the shader toolkit, like this one:https://github.com/ruby-processing/Example-Sketches/blob/master/samples/processing_app/topics/shaders/data/FishEye.glslShouldn't be too difficult to do, have a look at how glow and blur are implemented into the toolkit :)

    by fulviov, 11 years ago

    18
    0
    fulviov 11 years ago