Jump to content

Wchris

Members
  • Posts

    281
  • Joined

  • Last visited

Posts posted by Wchris

  1. Those models are invisible and don't collide. They won't even get iterated through in the renderer or physics.

    can someone confirm this ?

    i'm pretty sure in 2.4 i could collide with the athmosphere and lights bodies with debugphysics enabled.

  2. You don't have to make any script at all since the spotlight that comes with Leadwerks can do this for you already. :D

    Just drag a spotlight in the scene en go to its properties. There you can choose a material file. Use an image that you want like bars of a window for example.

     

    However if you still want to make it via your own scripts, just let me know. I''ll gladly help you out.

    Hi Aggror,

    i tryed with the editor, but when i set my selector mat file nothing happens, my selector.dds is not projected.

    and if i go back to the light properties later the material property is not kept and empty again.

     

    here's my material and dds selector.zip

     

    and a screenshot

    post-44-074695000 1287249671_thumb.jpg

  3. You don't have to make any script at all since the spotlight that comes with Leadwerks can do this for you already. :)

    Just drag a spotlight in the scene en go to its properties. There you can choose a material file. Use an image that you want like bars of a window for example.

     

    However if you still want to make it via your own scripts, just let me know. I''ll gladly help you out.

    Thank you Aggor, it's a relief to know you'r arround to provide help when we need it.

     

    I have another related question. Maybe there is a way to specify the spotlight should only cast light on specified entities ?

     

    if not, then i'm not sure how to do it. perhaps, disabling all entities and lights i don't want, do a renderlight with only the spotlight and wanted entities, then re-enable everything and let framework render the world ?

  4. this 'projection light' isn't really nessecary any more since the point light supports a material file which can display the dds file you want.

    Thank you, i had no idea how to do this.

    following your suggestion i found an example in the wiki

    TEntity light  = CreatePointLight(15,0);
    MoveEntity   (light,  Vec3(0,5,0) );
    SetShadowSoftness(light,2);
    SetShadowmapSize(light,512);
    
    TMaterial lightMaterial = CreateMaterial();
    SetMaterialTexture(lightMaterial, LoadTexture("abstract::flashlight.dds"));
    PaintEntity(light,lightMaterial);
    

    i'll try it this evening :D

  5. File Name: Projection light

    File Submitter: Aggror

    File Submitted: 27 Dec 2009

    File Updated: 27 Dec 2009

    File Category: Lua Scripts

     

    A simple Spotlight that projects a projection-map.

     

    Usage:

    1. Place files with the other light (not neccesary.)
    2. Use your own dds file for the projector-map.dss.
    3. Drag a projector spotlight on screen.

     

    Click here to download this file

    The link is broken :D

    i put a watch on this topic, just in case you come back

  6. Still searching...

     

    got something working with

    ***********************************************************************
                     Material Generated by ADN 1.1 R3
    
    ***********************************************************************
    texture0="abstract::red.dds"
    clamp0=0,0,0
    color=1.00000000,0.141176477,0.141176477,0.589999974
    blend=1
    depthmask=1
    depthtest=1
    alphatest=1
    overlay=0
    zsort=1
    cullface=1
    castshadows=0
    specular=0.759999990
    bumpscale=3.06999993
    gloss=0.460000008
    shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_bumpmap.frag"
    shadowshader="Abstract::mesh_shadow.vert",""
    

     

    Now it's transparent but visually it's not like the first screenshot

     

    i did not want it to be affected by light or shadow, i just wanted a transparent object that acts like a ghost 3D placeholder and tells the players where to drop his item with the same shape.

     

     

    post-44-005863400 1286523887_thumb.jpg

  7. i have a problem with tranparency

     

    There is a tutorial about transparency, but it's not using framework.

     

    i used ADN to create a red transparent texture for the bouda, but when using it in my project the transparent object is overriden by water and terrain.

     

    ***********************************************************************
                     Material Generated by ADN 1.1 R3
    
    ***********************************************************************
    texture0="abstract::red.dds"
    clamp0=0,0,0
    color=1.00000000,0.141176477,0.141176477,0.589999974
    blend=1
    depthmask=0
    depthtest=0
    alphatest=0
    overlay=0
    zsort=0
    cullface=1
    castshadows=0
    specular=0.759999990
    bumpscale=3.06999993
    gloss=0.460000008
    shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_specular.frag"
    shadowshader="Abstract::mesh_shadow.vert",""
    

     

    I don't understand what's going on. here's a screenshot. Any clue ?

     

    tryed to use the transparency world to load the mesh and material, but same result

     

    Thank you, this is driving me nuts

     

    post-44-041335100 1286499125_thumb.jpg

     

    i hope in LE3 it will be easyer to use transparency without playing with worlds, just telling the transparency ratio et voilà, but LE3 is far away

    redbouda_transparent.zip

  8. if you cannot wait, Gainward GTX 460 1GB.

    i have one with a Q6600 and a 400W power supply. Works great, runs at 33° when idle, very compact and short design, not noisy.

     

    But if you can wait for ATI 6xxx series, i would wait.

  9.  

    Line LEPositionEntity(camera,playerpos,0) causes crashing the engine.

     

    maybe because playerpos is wrong

     

    do LEEntityPosition(player, playerpos, 0) instead of playerpos=LEEntityPosition(player,Vec3(VResult)) and see if it's better

     

    i'll look at your code this weekend, thanks for posting, it's much easyer when code is supplyed

     

    EDIT :

    mmhm - think i am a little lost - because i don´t understand how to get 3 variables into one -> playerpos=LEEntityPosition(player,Vec3(VResult)) and then use them with LEPositionEntity(camera,playerpos,0)

     

    With Purebasic you must learn everything you can about :

    - pointers,

    - procedures and "by reference parameters" and 'By Value" parameters.

    - the difference between a procedure with procedurereturn and without procedurereturn

    - how can a procedure return data without procedurereturn

    - understand the difference between :

    Prototype.i LESomethingh1 ( )

    Prototype LESomethingh2 ( aaaaa.i )

    Prototype LESomethingh3 ( *aaaaa.BYTE)

     

     

    Purebasic is not easy at all, it makes heavy usage of pointers and has no abstraction layer to simplify your programming task.

    So if you don't understand those concepts, you're just playing loto throwing commands hopiing it'll work, and you'll get Access violations every 5 minutes.

     

    vec3 is a procedure with procedurereturn (wich equals a functiion in other languages) so you can say variable = function to get the value from procedurereturn. The Vresult is a dummy variable to store the result of the structure sent back by procedurereturn, this is needed because purebasic has problems with structures and procedurereturn. Vresult is a dummy variable only used in expressions where you want to use the function immediately and not need to keep the result after.

    Is you have a specific variable to store the result and want to keet the value you can use it instead of vresult. like this LEPositionEntity(camera, Vec3(playerpos, playerpos\x, playerpos\y+10.75, playerpos\z),0)

    but you can also write

    playerpos\y=playerpos\y+10.75

    LEPositionEntity(camera, playerpos,0)

    in both case you MUST declare Define playerpos.Tvec3

    because LEPositionEntity second parameter is a POINTER and a pointer can point to anything without type checking. This means it won't complain, but if the type provided is not the one expected it will symply CRASH.

     

    here's your fixed code Camerasample.zip

     

    Sorry, but learning you how to program in purebasic and how to use pointers is far out of scope of this forum. it's not an easy task, and pointers is a difficult concept to understand, nearly impossible in 5 lines of text in a forum.

    Pointers is the main reason of ACCESS VIOLATIONS and this is why modern languages like java totally got rid of pointers. Even Microsoft engineers made plenty of AV (blue screens) with pointers in windows 95, they did not get better at programming with vista or seven, they simply use now modern object languages that do not require pointers.

    So purebasic is a language that requires pointers and very good programming skills (not really what's expected from a basic) and you'll keep comming back here every 3 lines of codes you write with and AV that stops you if you don't masterize pointers.

     

    PS: updated the header generator

  10. [b]      ; *y.playerpos=*y.playerpos+1.75
         ; LEPositionEntity(camery,playerpos)[/b]
    

     

    ok, i'll update the generator to add global before the wrappers

     

    what is *y .playerpos ? why not playerpos\Y ?

    and what is camery ? :P this is what happens with languages that are not strict on variable declarations :lol:

     

    There is an option in purebasic to force variable declarations, maybe you should activate it.

     

    and this is wrong : playerpos=LEEntityPosition(player,Vec3(VResult))

    because the C++ header transforms the engine .dll procedure into a function and the purebasic header currently doesn't

     

    it is declared like this : Prototype LEEntityPosition ( entity.i, *position.TVec3, Globaly.i=0 )

     

    so i don't understand why purebasic accepts your syntax and does not complain he has nothing to assign to playerpos because the prototype is not a function ?????

     

    the current syntax in purebasic is : LEEntityPosition(player, playerpos, 0)

     

    if we find a way to transform procedures that return 1 value into functions, why not. i did it in the pascal header, but i currently don't know how to do it in purebasic. Without this, you'll have to be careful and look at the prototypes when traducing c++ tutorials because syntax may differ (but not allways, because sometimes engine.dll exports functions, there is no rule).

     

    Daamn ! i'm teaching purebasic with a trial version after reading a pdf documentation 10 minutes ;) crazy me !

  11. if i renamed framework to fw - all works fine - water - sky etc. - sorry for this and thx.

    you can call your variable framework

     

    only here LELua_setglobal(Lua, "fw");

     

    "fw" is not a variable, it's leadwerks engine internally predefined name used to link the engine framework to your external variable. So this "fw" within quotes cannot be changed, it must match the name defined in the engine.

  12. But I still wouldn't use it for something like LeadWerks. Some of the way PureBasic handles things is a real pain.

    LOL :P you say that because you don't want to be the teacher that writes purebasic tutorials ;)

     

    I did not use purebasic enought to fully understand if it's a pain or not. Sure the language is a little basic (i like pleonasms :blink:) but if you know only this one and like it, maybe why not.

     

    The biggest disavantage is that you'll get less help from the purebasic community than from the c++ community if you were a beginner. So for beginners who can't find solutions by themselves, C++ is much much much better, i agree.

  13. hehe - womans can break the creative phase :)

     

    @wchris - can u give me an working example code for pb for loading a scene - i tried now many times - but - i don´t see anything - maybe problems again with the cameralayer.

     

    ok here's your sample LoadsceneExample.zip

     

    unzip to a folder and copy engine.dll, shaders.pak, scripts folder, materials folder, models folder from your sdk to this new folder. (this is probably what you forgot)

     

    Please don't ask me for more tutorials, i have not enought time to become a teacher, i prefer to specialize only in the header generator support rather that leadwerks support. :)

    This problem is not related to the header generator and is not specific to purebasic. Other people like Aggor or Macklebee have specialized in providing tutorials, you should read their tutorials because i do too and their work is great. Josh also made tutorials and it's not so difficult to translate them to purebasic, but i won't do it, sorry. Thanks for understanding.

     

    post-44-021110500 1285010973_thumb.jpg

  14. I tried the actual headgen - there is a little problem with the Procedure LE_Engine_Stop(). The Command LEEndRender() Could not be found - i check later why.

    This is easy, i'll just modify the PureBasicLEUnit.txt template and move LE_Engine_Start() and LE_Engine_Stop() after <%%WRAPPERSCODE%%> because LEEndRender.LEEndRender = GetFunction(#Engine_Library, "EndRender") should be declared before the function is called.

    Second - i check your SimpleFWExample - works fine.

    Is it possible that you can give a pb example that loads a map that comes with the LE sdk - or makes an example wirh water - both don´t work at this time for me.

    Ok i'll do that with desert_highway, but you'll have to add the water yourself in the editor because there is no water by default on the maps that come with the sdk.

    A kind of Sandbox Editor with multiuser At the moment i experementing with the engine. The sql code is ready - server with 100 mbit direct connect is ready

    Why not, you'll have the first MMPORG 3D EDITOR then :lol:;)

    Could be great for building a community project.

    If you like my project - your a welcome to help - i buy you a pb version :)

    You're generous, but it still fighting to find time for my own game (i have a new house with plenty of work to do outside, and my wife thinks time spent in front of my computer is wasted) so i would only slow you down.

  15. Sorry - i went for a few days in holiday - so now i am back again.

    Tomorrow i test all and report back to you - when i remember correctly befor my holiday - your example works fine - i test it again and tomorrow i will report you back.

     

    so on....

    Cool :) where were you ? Did you have sun ?

     

    Now you'r back with plenty of energy to write the first Purebasic LE game ! ;)

     

    What kind of game will it be ? do you already have an idea ?

  16. Yes, I fully agree with you!

     

    Maybe you should mail Josh directly if it's really urgent. Now that he is working on LE3 he said that no new feature would be added to LE 2.4 only bugfixes, so if you want him to add things you'll probably have to argue more (especially if you are an indie and not a game studio with a game near completion.)

    It's fully understandable that one person alone will have difficulties to write a new engine while expanding the old one. But sometimes he makes exceptions when he thinks there is no good workaround, like here http://leadwerks.com/werkspace/index.php?/topic/2763-setworldcullrange-new/page__p__25875#entry25875.

    so you can try to ask him, but my personal feeling is that this was an exception. I don't know Josh much, it's just my feeling.

    Damn, if only Josh could do something for Ywa, now that i found someone really motivated in producing a pascal written game, and probably skilled enought to succed, i would be disapointed if this stopped him.

  17. This is a very important update. Outdoor scenes can gain a lot better FPS when these view ranges are used properly. Earlier all outdoor entities basically had to be set to infinite view range, which disabled any kind of programmatic preemptive culling.

    Great to see 2.4 is alive :D

     

    can this solve the problem of trees being stomped down in the lower par of the screen when looking horizontally at high altitude ? (like at 11:04 in flexman video http://www.youtube.com/watch?v=Y6ILqIQDaio the video was great, only removing this visual artifact could make it better)

  18. From my game engine log, it seems I already have LE 2.40.

     

    Leadwerks Engine 2.40
    Initializing Renderer...

     

    PS: Seems like my engine.dll wasn't updated. Results:

     

    - Aside from the fact that the terrain physics aren't debugged anymore (which is a good thing), my problem is still there. Waiting for your reply, thanks :P

    Yes, i know you have 2.4, the physics debugging bug was a 2.4 bug. i just hoped josh fixed something else in latest engine.dll that would explain my 2.4 is working and your's is not :D

     

    my code is exactly the same as you, and it works ... :)

         Phys1 := CreateBodyBox( 1,1,1 );
         Mesh1 := createcube(phys1);
         EntityType( Phys1, 1 );
    
         PositionEntity( Phys1, Vec3( playerposition.X, playerposition.Y+2, playerposition.Z ), 1 );
    
         Phys2 := CreateBodyBox( 1,1,1 );
         Mesh2 := createcube(phys2);
         EntityType( Phys2, 1 );
    
         PositionEntity( Phys2, Vec3( playerposition.X, playerposition.Y+0.5, playerposition.Z ), 1 );
         SetBodyMass( Phys2, 1 );
    
         CreateJointHinge( Phys1, Phys2, Vec3( playerposition.X, playerposition.Y+1, playerposition.Z ), Vec3(1, 0, 0) );
    

     

    now i'm clueless

     

    how many newton.dll and jointlibrary.dll do you find on your system ?

  19. You right - it´s only for me to hide this in the code - no need for the procedure

    He he, Paul is also good in purebasic :D his help is precious. :)

     

    did you try my latest simpleFWexample from post #40 ? do you see a rotating cube ? can you make a screenshot ? Thanks

  20. EDIT: I have no idea what's wrong. Also, there's some clipped code (on the CreateJointHinge line, can you write it, please). Thanks.

    Don't worry we will find out what's wrong. I'm currently at work, i'll come back this evening.

     

    Hey ! an overloaded add operator for Tvec3 is a good idea :D ! Why did i not have this one ? Will do this too ! :)

     

    EDIT :

    Your screenshot tells me your engine is not up to date, all those red lines in physics debugging mode is a bug that activates debugging on terrain. You'll need latest cray supercomputer to get decent fps when debugging physics with this version :P.

     

    please rerun LESDK updater for 2.40 and try again.

  21. Bump.

    Boing ! ;)

     

    what is mCar.GetPos supposed to return ? a Tvec3 ?

    and delphi does not complain when you use the + operator on two Tvec3 ? :blink:

    If you have overloaded the Tvec3 add operator, then maybe the problem is there ?

     

    This is what i get

    post-44-032643500 1283978574_thumb.jpg

  22. not working:

     

    LESetWater(1)

    LESetSSAO(1)

     

    Also i have problems with the LELoadScene command - it loads the scene - i get stats about a lot of polygons - but i only see a black screen?!

     

    thanx

    pb #1: this is probably not a declaration header problem, the declaration for these commands are so simple there is no place left for an error. It is either a new bug introduced in 2.40 (then see with Josh) or more probably a graphics driver issue (what are yours specs and driver version ?).

     

    pb #2: ;) how do you know water does not work in pb #1 if you see only a black screen ? you crash ?

    The black screen is often a camera position problem, but in your case if you have polygons with setstats(2) then maybe it's a light problem ? :blink: i'm not sure. maybe with a zip file of your project and assets i could see something.

     

    Edit : Updated the header generator, please re-download

    - changed the enumeration numbers for dll to a fixed value

    - removed Procedure Init_Enum() not required like Paul said

    - removed static result and added Result parameter to all vec procedures like Paul said

    - removed functions list procedure

    - did some minor tweaks (can't remember)

     

    here is a sample application showing the current use

     

    Please rebuild the headers and compile & run this sample project + post a screenshot

     

    i did nor remove the helper functions, some people may want them (especially curve, you'll need this believe me), anyway it's easy to comment them out after header generation if you don't want them.

     

     

    for the LE api function that are not working, i think you must call Josh to help, but way until you got a working screenshot.

×
×
  • Create New...