Jump to content

thehankinator

Members
  • Posts

    436
  • Joined

  • Last visited

Posts posted by thehankinator

  1. Maybe the problem is with texture lock? Since I can't get the prefab to work I've been holding Ctrl and move to create an another instance of the door but every time I do this I get weird results like the screen shot below. I tried to copy the door on the left to the position on the right. Every time the texture is super stretched. If I select the surface and hit the "fit" button the texture fits the surface but the texture is now backwards and the editor says that the scale is 0.0x1.0 which makes no sense to me. Am I doing something wrong here?

     

    Map: https://drive.google.com/file/d/0B8AlYY49_v2bNVVySFE0NS1Ncnc/view?usp=sharing

     

    S21CDY0.png

    Qz9dQDq.png

  2. I've created 2 prefabs, both have the same problem. When I place the prefab everything looks fine but the first time (and the first time only) I move the prefab the texture gets shifted. I have Texture Lock ON. This makes prefabs near useless if I have to keep adjusting the textures every time. I am using the stable Leadwerks.

     

    You will need to install the Scifi dirty textures from the workshop.

    Prefabs: https://drive.google.com/file/d/0B8AlYY49_v2bRVVGbFN2Y1U3UzQ/view?usp=sharing

     

    When I place the prefab:

    eVW4SUi.png

     

    After I've moved the prefab any distance at all:

    a7VeERP.png

  3. Your biggest bottleneck is probably the giant spotlights. Their AABBs probably enclose the entire map.

     

    In fact, all your spotlights have a very wide cone which makes them very big, which means at any given time you have a lot of lights being drawn onscreen.

     

    I would be looking carefully at the shadow polys.

    Can you tell us what size spotlight (and other light types if applicable) is reasonable or what size is in danger of significantly impacting performance?

    • Upvote 1
  4. Thanks thehankinator, now I can show the timer on the screen :)

    But I am having a hard time to reset the stopwatch.

     

    Tried force MS = 0 using a If, but when the if is no more true the timer resumes and keeps going up.

     

    Maybe I need some beer :P

    Beer helps but to to reset the timer just reinitialize StartTime with Time:GetCurrent()

    • Upvote 1
  5. As often as this comes up, there really should be an official tutorial from Josh on this with every optimization under the sun, including editor and code settings. Right now there are just a bunch of threads with individual suggestions, some more helpful than others.

    God yes, I've been struggling to get my (simple)game to run well on my laptop's 7670m.

  6. Hello guys!

     

    I am working on a hud stopwatch timer thing for my game, but looks like I can't use os.date("%X",0) from Lua since I guess you can't upload games with sandbox Lua off to the game launcher :/

     

    Having a little trouble to format my Time:GetSpeed()/100 to something like MM:SS:MI

     

    Thanks in advance smile.png

     

    Time:GetCurrent() is in MS. I'd do it something like below. StartTime would need to be initialized to whatever time the timer starts with Time:GetCurrent()

     

    local MS = Time:GetCurrent() - StartTime
    
    local Minutes = math.floor(MS  / 60000)
    MS = MS - Minutes * 60000
    
    local Seconds = math.floor(MS / 1000)
    MS = MS - Seconds * 1000
    
    local TimeStamp = Minutes..":"..Seconds..":"..MS
    

    • Upvote 1
  7. I'd see a new driver update and install it with a pain in my heart. The heavy weight of despair would sap any hope that would allow there to be light in such a dark place. The walls of my office echo with the sound of my tears of updates past.

     

    But Today, today all that **** changes! Drinks all around!

     

    Driver version 16.7.3

     

    g7LAMqY.png

    • Upvote 3
  8. The codeblocks project file is usually located in Projects/Linux/something.cbp

     

    The only supported Linux distro is Ubuntu 14.04 LTS 64-bit so your results may vary with Mint (or anything else).

    • Upvote 1
  9. This is a common thing people ask about. To directly link an entity into your script you could do it by adding the following line of code to the top of your ball script.

     

    Script.cube = nil --Entity "Cube"
    

     

    With this code you can go into the editor and select your ball entity, then go to the script tab, there should now be a box labeled "Cube", drag the cube from the Scene tab into this box. Now within your script you could do something like

    local distance = self.entity:GetDistance(self.cube)
    

     

    There are many other ways to do this and without knowing more about what you are trying to accomplish, another method might be better.

    • Upvote 2
  10. You said Windows, but I think you mean Linux. Typically that message happens when you try to link a library with the wrong architecture(x86 vs x86_64). It will keep searching for one that matches. If it successfully built I'd guess it did find a match.

  11. Why? CMake just sets up projects, it doesn't compile anything. Just link the Leadwerks dll's and you should be all set.

     

    http://stackoverflow.com/questions/17225121/how-to-use-external-dlls-in-cmake-project

    What I meant by that was providing a cmake file to build the Leadwerks static library to allow development with different compilers on Windows would require the source (doubt that'll happen).

     

    Anyone could make a cmake file for building a Leadwerks application but on Windows it's gotta use the MSVC compiler.

  12. Speaking about compilers I have came across about several examples how to start new C++ project with LE (but have not tried it myself yet). And the thing is that LE provides ready made project (VS or CodeBlocks). But the point is I guess all logic is still in Leadwerks lib and dll files. So there is no difference actually which compiler developer will use (I might be wrong, correct me if I am). Then it is good Idea to think about CMake project which can be configured under any platform and for all popular compilers. It this case you will have to provide only Cmake project directory. And you will not have to generate all this directories in Project directory like Linux, Windows, MacOS, etc.

    To provide a cmake project Josh would have to provide the Leadwerks source code, I don't think he wants to do that.

  13. What use does GCC on Windows serve? I seriously want to know what you think.

    I'm sure other people have other reasons to use mingw over MSVC but for me, in my experience, mingw provides the path of least resistance to build open source libraries on Windows. For a given library there is a better chance that the library will provide a makefile(or some other mechanism to build) for gcc than a MSVC project file. cmake has really improved the situation but isn't always available. Like nick.ace, I use both, I think they are both great (nothing touches the MSVC IDE). I can see why you wouldn't bother with mingw and I don't disagree but there is something to be said for tool consistency between platforms.

×
×
  • Create New...