Jump to content

Wchris

Members
  • Posts

    281
  • Joined

  • Last visited

Everything posted by Wchris

  1. 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 ?
  2. 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
  3. Realtime texture updates, animated textures and background loading ! That's sweet ! I like it (but i'm not on facebook) can this texture updates be used to make decals ?
  4. nice tutorial, i have a question, why assign bones to a building ? a building is not animated, what's the use of bones ?
  5. The link is broken 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.
  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 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. 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 : 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
  9. ok, i'll update the generator to add global before the wrappers what is *y .playerpos ? why not playerpos\Y ? and what is camery ? this is what happens with languages that are not strict on variable declarations 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 !
  10. 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.
  11. LOL 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 ) 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.
  12. 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.
  13. 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. 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. Why not, you'll have the first MMPORG 3D EDITOR then Could be great for building a community project. 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.
  14. 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 ?
  15. 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.
  16. Great to see 2.4 is alive 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)
  17. Hi Kratest, your provide no source code, so it's difficult for me to understand what's wrong. what version of delphi do you use ? have you tryed this example http://leadwerks.com/werkspace/index.php?/files/file/87-simple-frawewerk-lua-sample/ if not, can you try it (with the complete header) and tell me if it works with the header you generated ?
  18. 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 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. He he, Paul is also good in purebasic 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. 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 ! 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 . please rerun LESDK updater for 2.40 and try again.
  21. Boing ! what is mCar.GetPos supposed to return ? a Tvec3 ? and delphi does not complain when you use the + operator on two Tvec3 ? If you have overloaded the Tvec3 add operator, then maybe the problem is there ? This is what i get
  22. 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 ? 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.
  23. i don't know, but i'll try your code, looks funny to play with joints
  24. #Engine_library without a number worked in smateja header and in the simpleFWexample in my post 24. something must be missing now. for the Init_Engine_Enum() usage, i think i'll let smateja answer I don't like this, a function like vec3 is used 50 times in a main loop that loops 300 times per second... if you don't free the memory will be full in no time. I think i'll add 1 more parameter to all vecx procedures to return the result. This way the structure will be created outside of the procedure (because you have to provide it) and it solves the problem.
  25. i don't know how to copy the value, how would you code this ? copying the value may lead to memory leaks, the copied value will never be freed ? no ? I have packaged a new header generator version including static variables and smateja modifications, you can redownload and try it. i tryed to use XIncludeFile("Leadwerks.pb") but when i do this i get and error [compiler] line 83 Constant not found #Engine_library i don't understand why any help ?
×
×
  • Create New...