Jump to content

tipforeveryone

Members
  • Content Count

    362
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. The line Player player2; is useless for this example. should it be removed ? https://www.leadwerks.com/learn?page=Tutorials_CPP_Classes
  2. More here, I think it should be "monster" in the second red rectangle https://www.leadwerks.com/learn?page=Tutorials_CPP_Classes
  3. Hi, I post this here instead of Discord, suggested Josh. https://www.leadwerks.com/learn?page=Tutorials_CPP_Operators and https://www.leadwerks.com/learn?page=Tutorials_CPP_Loops
  4. Hi @Marcousik Would you mind replacing 2 videos in your signature section with 2 youtube link instead ? Somehow it is harder to find information, when your signature is to big and getting others''s attention. Thanks
  5. Learning C++ for the first time just for game dev in Leadwerks, the more I know about C++, the more I feel I can control Leadwerks.

    1. gamecreator

      gamecreator

      It is nice to be able to do a little more  It's a tricky tradeoff though: there are some helpful undocumented functions but they don't always work (like world->SetSize()).

  6. Is there any simple explaination why using C++ to make game in Leadwerks can help performance better than lua? (Explain like I am five) :D

    1. Josh

      Josh

      Your bottleneck is likely to be the graphics on the CPU or the GPU, in which case the language your game code is written in doesn't make a big difference. However, Lua involves GC pauses while C++ does not, and C++ runs much faster overall.

      In Turbo your game logic has its own thread, which makes it okay to use Lua with VR even, and even GC pauses won't slow down the renderer.

    2. Slastraf

      Slastraf

      Quote

      Every C instruction corresponds to a very few assembler instructions. You are essentially writing higher level machine code, so you have control over almost everything the processor does. Many other compiled languages, such as C++, have a lot of simple looking instructions that can turn into much more code than you think it does (virtual functions, copy constructors, etc..) And interpreted languages like Java or Ruby have another layer of instructions that you never see - the Virtual Machine or Interpreter.

      https://www.quora.com/Why-are-C-and-C++-faster-than-other-programming-languages

    3. tipforeveryone

      tipforeveryone

      Thank you guys, I understood
      I am learning C++ hard :)

    4. Show next comments  9 more
  7. Finally, the solution is verysimple, just move the gun model far away from camera then adjust its FOV or Zoom, muhaallalala
  8. Yes that function WithManyCalculation have many thing inside thanks
  9. I am optimizing my game's frame per sec and wonder which way of code has better performance function Script:WithManyCalculation() --A ton of code end function Script:UpdateWorld() self:WithManyCalculation() end and function Script:Start() self.time = Time:GetCurrent() end function Script:WithManyCalculation() --A ton of code end function Script:UpdateWorld() if Time:GetCurrent() - self.time > 60 then self:WithManyCalculation() self.time = TIme:GetCurrent() end end
  10. This is a good idea but not perfect, in somecases, the scope model has detail when look from outside but some of its faces still visible inside Thanks for your suggestion. I will try it In old COD4, they really make an ACOG scope which player can see inside of it And then in Modern Warfare 2 or 3 when not in aiming mode, this ACOG look so strange, so what is the real technique
  11. hmmm... I mean that scope looks like it was projected on screen only visible part of it. I will do some research
  12. I guess there is something to do with scope model itself, but no suggestion, seems only that scope has orthor view
  13. Yeah I will try to make one, but I wonder how did they do in game like Irsurgency sandstorm and many FPS game outthere
  14. Lol this is my blog, mate. I want to improve some frame per second by not using another camera to render to texture.
  15. This is from Irsurgency Sandstorm And this is mine How can I make my scope model look Orthographic Projection like that
  16. Draw() and UpdateWorld() behaviors are the same when I put some code inside them. "Script:Draw(): This is called the first time an object is rendered during a scene render." It sounds the same as UpdateWorld() to me. Is scene rendered each frame ?
  17. After reading document page here (https://www.leadwerks.com/learn?page=Tutorials_Lua-Scripting_Introduction-to-Lua) I still can't figure out those functions usage. Can anyone explain more clear ?
  18. Do you have example code of making thing in Joint Fraction section in Lua ?
  19. sometimes I need to put pivot into some small object models but their icons are too big, is it posible to make these icons (camera, pivot, particles etc) keep their size at the same while zoom in and zoom out in editor ? Look at this mess I have
  20. I wonder how the performance is in 2 ways of using variables in lua. Which one is better when there are many of pivots which can be attached script, each script has its own "self." variables Method 1: Use table for everything Script.table = {} --create masster table of scripts function Script:Start() table.category1 = {} table.category1.variable_1 = somevalue table.category1.variable_2 = somevalue ... table.category1.variable_n = somevalue table.category2 = {} table.category2.variable_1 = somevalue table.category2.variable_2 = somevalue ... table.category2.variable_n = somevalue end Method 2: Use Script.variable only Script.valuable_1 = something Script.valuable_2 = something function Script:Start() self.valuable_3 = something self.valuable_4 = something ... self.valuable_n = something end
  21. Thanks macklebee, your explaination is clear as daylight ! so detail. Finally I did it, It took time to understand math in English ^^
  22. Ragdollized !! Old method, new style. I wish I can do this in Turbo. Watch this !

     

    1. Josh

      Josh

      Oh man, that headshot. :D

    2. Lethal Raptor Games
  23. My very first Akeytsu and Leadwerks Animation hand shake

     

  24. I remember first few months of using Leadwerks, I can implement a ragdoll in character bone system (using Joints). I love ragdoll physics when shooting some humanoid target, I guess I will use the same technique to my current game. ragdoll is possible for current bone system (each bone is an entity) but how about Turbo ? Does that mean "NO HOPE" for ragdoll physic for new system.
  25. Josh... I need your new bones/skeleton/animation (for Turbo) as soon as posible, because my game's FPS drops like hell when I put this bunch of soldiers into my scene, I need 30+ characters in one scene (include enemies and allies) and LE4 can not handle that number of characters, so sad :(

    1. Show previous comments  7 more
    2. gamecreator

      gamecreator

      Quote

      entities that are onscreen

      Is this checked with GetCulled(NULL) or is there a better way to do that?

    3. Josh

      Josh

      @gamecreator you should pass the camera to that function but yeah

    4. tipforeveryone

      tipforeveryone

      After removing all of character's finger bones, I have gained a big amount of FPS, there are 20 bones each character now (instead of 49). It is ok with 30 character in a small scene but in larger scene with more entities, 10 characters still even make FPS lower than 30.

       

    5. Show next comments  9 more
×
×
  • Create New...