Jump to content

Wchris

Members
  • Posts

    281
  • Joined

  • Last visited

Everything posted by Wchris

  1. you have a purebasic licence too ?
  2. ah, cool ! i declare variables without knowing i do ssao ? nope didn't try this lately, was working in 2.32. do you still have a back screen ? ssao shader is perhaps confused by a full black screen i'll try can i remove the macros from the header ? they are not needed anymore if i do your LExxx.LExxxl = GetFunction(#Engine_Library, "xxx")
  3. Ok i think understood, will replace Protected result by Static Result Thanks (sorry, i'm a bit slow) I have a problem with LEKeyHit(KEY_ESCAPE) does not work. Don't know why yet Here's my curent code if you want to try Edit : OK got it ! i forgot the # in LEKeyHit(#KEY_ESCAPE) The compiler does not complain, he just ignores it ! This behaviour can lead easily to hidden bugs. Is there a way to force him to complain ?
  4. you must retrieve the handle of the camera the framework created for you and position it in pascal it would be something like : Camera := GetLayerCamera(GetFrameworkLayer(0)); PositionEntity(Camera, Vec3(0, 0, -2)); you must also call EndRender at the end of your program (i dont know if freeframework does the EndRender) or ati cards owner will have a surprise .
  5. Framework does plenty of cool stuff (mainly postfilters effects) and uses Set.. commands to activate the features like SetStats, SetBloom, etc ... The drawtext does not work because the 3D scene is drawn by Renderframework on top of it. Main Leadwerks loop is always like this 1) get inputs and move 3D objects 2) update the entity positions in the world 3) render the world 4) draw additionnal 2D on top 5) flip background buffer at this point you could use loadscene before the loop and load one of your sbx file you made with the editor, it should display like in the editor if the camera is well positionned. unless you are very skilled, always use framework commands instead of world commands because framework already uses world commands for you, and you would simply end up rewriting framework and would not benefit from changes or new fetures Josh may add to the framework.
  6. your code does still not use UpdateFramework; RenderFramework; so you create the framework but you don't use it UpdateFramework; RenderFramework; call updateworld and renderworld internaly
  7. i don't understand . do you have a sample for this ? (sorry i'm nearly a newbie if pb ) try removing your createworld, updateworld, renderworld commands and replace them by UpdateFramework; RenderFramework; i'm at work now, can't try myself until this evening
  8. The only différence with my code is that you create a world, wich is not necessary when using framework. maybe i crash because eof my trial version, or because it's an old 4.31 ? hmm ... i forgot the bracket () with LEGetLuaState ... maybe it's the problem ? will try this evening LERegisterAbstractPath("C:\Program Files\Leadwerks Engine SDK"); LESetAppTitle("SimpleFWexample") If LEGraphics(640,480)>0 fw = LECreateFramework() If fw>0 Lua = LEGetLuaState LElua_pushobject(Lua, @fw); LElua_setglobal(Lua, "fw"); LElua_pop(Lua, 1);
  9. Interresting. Do you have a little sample of code for this ?
  10. i like this. it could give you some part of the opensource strenght. The capacity to federate people skills.
  11. You speak very wisely. i agree completely. But maybe in the future something could be done to integrate as a standard the work some very skilled people did in the blogs (i think Chris Paulson IK and recast is fantastic). This could perhaps be done with lower costs and benefit everybody if documented and with official support. (just an idea or a wish, don't think you have to, i just suggest )
  12. Ok i think i reached my purebasic limits and need some help the stripped out purebasic sample attached crashes when Lua_pushobject command tries to access the fw memory address (read error at address 12). I don't know what's wrong with my PB pointer and i need help from purebasic programmers source code SimpleFWExample.zip
  13. Sorry if i'm slow, i'm learning purebasic this code generated by the header generator is probably wrong Prototype.TFramework LECreateFramework ( ) should be Prototype.i LECreateFramework ( ) because TFramework=.i is missing at the end of the template PureBasicTypes.txt you don't need the générated macros ? PS and this damn trial version say i'm allowed to 800 lines, and finally won't let me have more then about 600
  14. Hi Smateja, Your post is a bit long and truncated in the end. Could you remove the code and add it in an attached zip file ? it'll be easyer to read (forum has scrolling problems with big texts). Thanks I'll go at work and this evening i'll try to see if i can convert the delphi/freepascal SimpleFWsample i have posted in the download section to purebasic. I have only the trial version of purebasic (limited to 800 lines of code) but if i extract from the header all unused procedures i may succed in compiling. There was an old thread here http://leadwerks.com/werkspace/index.php?/topic/955-any-headers/page__p__8619__hl__purebasic__fromsearch__1#entry8619 where Paul successfully succeeded in running a minimal LE application with purebasic. But he didn't plan to use PB himself so i decided we would wait until a true PB users asks for it and return to our own game. Now that you're here i think we can resume PS: (please don't tell me you changed your mind and want to use C++, because it would disapoint me and i would stop again )
  15. additionnaly to what Ywa suggested, i would also recpmmend to allways use Ansistring datatype instead of string (http://www.codexterity.com/delphistrings.htm) There is also a project option parameter called "huge stings" i would recommend to check. Leadwerks is not compatible with delphi short strings (like string[25]) or unicode strings (delphi 2009 and 2010 defaults to unicode), only long strings like ansistring (or PansiChar pointers) are compatible. (Many Thanks to Lumooja who added const_str to the C++ headers, because Ansistring is only compatible in read only mode.) It's really great to be able to use AnsiString instead of PansiChar. and Welcome
  16. Wchris

    River Editor

    Woaw ! F A N T A S T I C ! it's abolutely perfect, everybody will want this ! You could even sell it.
  17. So you managed to install, compile and run the demo ? Fantastic ! I like people like you that do not give up. and i'm very happy you like it. Remember it's still an early alpha version and many things are subject to change. But you can use the code if you want, no problem.
  18. Hi, Well, it's a totally incomplete (and perhaps buggy) alpha version, but i reached a milestone where i can show what can be done. install the LEDCLVCL.lpk package and rebuild Lazarus, you should get this new toolbar now open your own scene and add a pivot named info_playerstart somewhere (if you forget this the sample will refer to something that does not exist and crash). Here is the sample code that will search for this object position in your scene. now open the sample project LECL1.lpr, you should see this select the SCENE1 component and modify the scene name property to use your own scene select the MESH1 component and modify the mesh name to one of your own assets. comipile and run, click button1, you should be able to fly around with the camera. This is not much, but look at the code now everything is coded inside events ! Many things are missiing, and of course in an alpha version everything is subject to change. I plan to add collision events and raycast events ... and many others things. The camera object could be expanded to have a property allowing to choose between 1st person, 3person, isometric ... If you succeed in running the demo, don't expect good support if you start coding you're game with this alpha. I have not much free time, so evrything will move on very slowly. Also, i don't own delphi, so i won't do a Delphi version. But everybody is welcome if you fiind the idea is good to expand it or convert to delphi. have fun PS: i use this pascaltypes.txt file with ansistring to generate the leadwerks header PascalTypes.txt LECL Alpha 0.1.zip LECL1.zip
  19. Thank you mack, it works now after replacer render by draw.
  20. I confirm, got the same problem here with 2.4, the soldier moves but the animations don't play. But the code is really interresting, thank you for sharing masterxilo, i'll try to learn something
  21. OUCH ! if it costs $1000 no feature will make me upgrade ! LOL i'll run away ! Maybe Josh's Streamed terrain will be powerfull enought to achieve "space to planet" flight ? That would be cool
  22. Wchris

    Codewerks

    hmm .... i'm not sure i understand everything ? When you say "entity.SetPosition(x,y,z)" do you mean the LE3 DLL will export complete C++ classes with their methods instead of simple procedures and functions ? because if yes, i fear we will enter in such a problem like described here http://stackoverflow.com/questions/2266417/delphi-calling-a-function-from-a-vc-dll-that-exports-a-interface-class (see jeroen comment there, it's just one sample, there are many others discussions about dll+classes compatibility problems like this on internet) but basically it shows that classes require the DLL en EXE to be compiled by the same compiler to have the same object model and memory management (or use COM wich is windows only). or maybe this C++ example http://www.codeproject.com/KB/cpp/howto_export_cpp_classes.aspx ? is this what Lazlo means ? EDIT: after reading this thread http://coding.derkeiler.com/Archive/Delphi/comp.lang.pascal.delphi.misc/2006-04/msg00253.html i have the strange feeling i'll quickly run into Lazlo's problem too. .LIB seems compiler dépendant while DLL is more open and compatible.
  23. Cool i'll have to update the SimpleFXexample to add the EnRender for Ati cards. Have fun
  24. Hi Ywa, as promised i'm back. I little late because my wife used the computer to watch TV movies she missed on a TVreplay website. Well i think i nailed it. Simply add the EndRender command when you exit the main loop and before ending the program. This explains also why the C++ version did not have this problem. It's because they load the engine.dll dynamically and use initialize/terminate methods. C++ terminate method calls enrender before unloading the DLL, while pascal links the DLL statically and does no EndRender so you have to do it yourself. We were just lucky nvidia drivers do not complain about it. We could also change and load the dll dynamically in pascal ... but it's not really worth it, who want's to unload the engine dll during a game ? It also seems to solve the empty engine.log problem, maybe the log is buffered when the engine is in ati mode ? i don't know. But i get an engine.log after endrender. Hope it helps
  25. The only difference between your header and mine is String vs AnsiString. You must be carefull with this because default string type is not compatible with C++ Pchar, you must either specify AnsiString or set the compiler to translate them to AnsiString for you like this Sorry i'll be out for two days because my wife prepared something for my birthday, so i'll not have much more time to investigate until tuesday. I just hope i'll be more helpfull on tuesday.
×
×
  • Create New...