Jump to content

Aily

Members
  • Posts

    465
  • Joined

  • Last visited

Posts posted by Aily

  1. How about types(classes) in Fortran?

    Can you show example like this:

     

    type node
    field a
    end type
    
    type node_child extends node
    field b
    end type
    
    local nc:node_child=new node_child
    nc.a=1
    nc.b=2
    

  2. One my friend say me to compare squares, not distances, because SQR is heavy command. So

     

    dist1#=(v1.x-v2.x) * (v1.x-v2.x) + (v1.y-v2.y) * (v1.y-v2.y) + (v1.z-v2.z) * (v1.z-v2.z)

    dist2#=(v1.x-v3.x) * (v1.x-v3.x) + (v1.y-v3.y) * (v1.y-v3.y) + (v1.z-v3.z) * (v1.z-v3.z)

     

    if dist1<dist2 ....

     

    Without SQR calcilations :)

     

    P.S. Cool glasses Alien :)

  3. 1. The best way to make house - is make it as single mesh with one flattered texture. - very fast to render.

    2. Some slowly - multimaterial, when all different material meshes attached to one mesh.

    3. Very slow - is group all house walls\flor.

     

    I see that Leadwerks not lost speed on render meshes, more important is culling i thinking.

     

    if you will be gather house by walls\flor in editor, at render it must be frustum culled many times. And if you will have many such houses, each frustum cull for each separate mesh..... And you incrase totel count of rendered objects in scene.

     

    I thinking such things in most of engines. 3DRipper DX is good way to se how ready game rendering it resources. For example, Prince Of Persia Prodigy - don't cull beside camera objects, all scenes created by models (not terrain), and it showing 300 000 - 400 000 triangles per frame with ~1000 meshes

  4. Hi everyone,

     

    I want to do the following:

    define a quad with custom commands (using le-commands like createmesh, createsurface, addvetrex, addtriangle etc)

    I want this quad to look like a glass..

    I have to be able to set its alpha value (its transparency) dynamically during run-time

     

    How can I do this?

     

    I have already looked in the traqnsparency tutorial.

    I do not want to render refractions, a refraction shader is overkill in my case, since the glass is very thin (windshield of a car)

    (the material files are not existing anyway, which was a serious disappointment for me by the way).

     

    I just need to draw the glass.

    and later I want to apply a normal map to the glass surface.

     

     

    You need to assign material with blend=alpha, and then control it color by EntityColor mesh,vec4(1,1,1,alpha), and render transparent meshes in second pass after lighting.

    If you don't want to use refractions, why you need normalmap then? For cubemap reflections?

  5. When i'm run any game, or Leadwerks application i hear some high frequency noise in my speekers. Interesting, in Winamp or any video there no any noise, just only iin games.

     

    Did anybody have such trouble? Ar someone know how to fix it?

  6. First part is good, random point in square. But not raycast, better to use bullet body.

     

    set Pivot(dummy) target object on picked position

     

    b=Createsphere(.1)

     

    positionentity b,entityposition(player) ( or enemy :) )

    pointentity b,target

    setbodygravitymode b,0

    setbodymass b,1

    septcollision b,1 ' important

    setbodyforce b,vec3(0,0,1000)

     

    setentitycollisioncallback b,on_bullet_hit,ENTITYCALLBACK_COLLISION

     

    First time i maked as you say, but then i was need to write separate code for enemy shots. In this issue enemy can shot just like player (you need just position it target to player) and respawn bullet.

     

    In my gameplay demo (with spaceship) bullets maked same.

     

    So you can control bullet size!

    Your fire from weapon will be respawn before respawned particles from hitted body.

     

    You can simple create ricochet with it ;)

     

    Im using raycasting only for enemy finding player ;)

  7. This is getting a lot more complicated than I thought it would be. Here's the original swf file. I think this has to be modified. :)

     

    Yours works, but it plays the sound when the page loads, instead of when a message is received.

    beep.rar

  8. Hello. I'm trying to change a model (that means both mesh/physbody) for an entity and keep its properties intact (like velocity, keys, position, angles, color,etc). I've browsed the wiki to find a function suitable for me. I'm not sure about Set/GetEntityUserData. The wiki doesn't seem to say much. Anyone care to help me with a detailed explanation on how these 2 functions work. More over, how can I solve my SetModel function problem? Help is much appreciated.

     

    You forget to say on what programming language?

     

    In BMax:

     

    
    Type MyData
       field x,y,z
    end type
    
    c=createcube()
    
    md:MyData=new MyData
    md.x=1
    md.y=2
    md.z=3
    
    setentityuserdata c,md
    
    ' and now we can get data:
    
    md=MyData(getentityuserdata(c))
    
    print md.x
    print md.y
    print md.z
    
    

  9. nice Aily... this is very similar to the one you did on the old forum...

    Yes, i just port it into new version, saw here somewhere that people need it.

    any suggestion on how to apply it to only a specific model instead of as a post process effect? Something like that would be extremely useful for creating a highlight/glow around a model.

    I will think about it :D

     

    But glow is works!

    post-260-017310400 1287287488_thumb.jpg

  10. index.php?app=downloads&module=display&section=screenshot&id=174

    File Name: Cartoon shaders

    File Submitter: Aily

    File Submitted: 17 Oct 2010

    File Updated: 17 Oct 2010

    File Category: Tools and Utilities

     

    Just replace your shaders.pak with it, and your game became cartoon render style.

     

    It's not affect FPS much. Just detect edge in postfilter.frag and multiply pixel by 0.1, and downsampling attenuation of directional light (for point and spot there is bad idea to do this, looks not so good).

     

    Click here to download this file

  11. Well I expect that the AppTime is calculated only once per update and then cached and it should return the same result per frame, so I think it's the same as performance.

     

    Also for the second question I say that it's the same as performance since you're not doing any operations on the Vec3 except the initialization with default values.

     

    At the end it's just matter of taste, I'd prefer to instantiate a variable in both cases just because if tomorrow I have to change their value it should be done on a single line and not 3+

    Thanks man ;)

  12. In all examples all values are multiply by appspeed() function. So what is faster to calculation:

     

    this:

    
    repeat
    
       turnentity cube1,vec3(0,1*appspeed(),0)
       turnentity cube2,vec3(0,2*appspeed(),0)
       turnentity cube3,vec3(0,3*appspeed(),0)
    
    forever
    
    

     

    or this:

    
    repeat
    
       spd#=appspeed()
    
       turnentity cube1,vec3(0,1*spd,0)
       turnentity cube2,vec3(0,2*spd,0)
       turnentity cube3,vec3(0,3*spd,0)
    
    forever
    
    

     

    ?

     

    And that's one, what is better (faster) to using vector constructors:

     

    this:

    
    repeat
    
       turnentity cube,vec3(0,1,0)
    
    forever
    
    

     

    or this:

    
    global turn_vec:tvec3=vec3(0,1,0)
    
    repeat
    
       turnentity cube,turn_vec
    
    forever
    
    

     

    ?

  13. Do you mean that you will not be using framework? I haven't seen anbybody doing that. Every single lua test you run inside the editor doesn't require you to make a framework object, which means that a framework object is already being created when the editor is first started.

     

    But perhaps Josh can give you a better answer on this.

     

    I see you know LUA well (see your examples).

     

    No, i will use framework, but want self render to it.

     

    I saw LUA files, where calling "Flip", as i understand, in LUA, user can repalace one method with enover. And think that is possible to turn off standart render and make it my own.

×
×
  • Create New...