Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Everything posted by gamecreator

  1. A little more experimentation found the issue: z-sort needs to be checked.
  2. I'm using the below placeholder, a flat textured plane. When it faces right, it's ok but when I rotate it, it gets really dark. The light doesn't change at all. I suspect this is some material or shader issue but I tried a number of things (including using just a non-alpha diffuse material) and nothing seemed to change it. It's the same in the editor but I don't know what the light setup is there. Any idea what causes this? This is the basic light code (there is no map loaded, just another MDL as a level): Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0);
  3. That would make a lot more sense. In that case, I'll throw this link out there:
  4. We already have one. https://www.leadwerks.com/learn?page=Tutorials_Games_First-Person-Shooter_Character-Controllers Did you have specific requests for it?
  5. It will still freeze though when you click New Map. Turns out it's trying to load start.map, which doesn't exist in a blank project. Not a big deal for me but you may want to fix the code at some point.
  6. Could fashion a tool into an improvised spade to loosen a stone in the floor or on the wall which could lead to an existing passageway. Or you could lure a guard to the bars by insulting him and choke him out or knock him out to get his key. Or maybe you could create a lockpick from something.
  7. Not sure. But Josh mentioned that in the thread I linked in my first post.
  8. This won't work because you can blend two of the same animations. But Josh's idea seems pretty good. Of course, manually incrementing the frames and playing sounds isn't too difficult. // Pseudocode newframe = Time::GetSpeed()+oldframe; if(footstepsoundframe>oldframe && footstepsoundframe<=newframe) playsound()
  9. If I understand your question: code that used to be in the App::Start function (where you load and create everything) goes before the while loop and code that used to be in the App::Loop function (while you're running your game) goes in the while statement. That is until you start organizing things in other source/header files.
  10. While I don't develop for the launcher, that tends to happen when you have a workshop item you haven't made public. See if you have that option either in Leadwerks or on the side, further down that page.
  11. Great vid Jorn! Thank you! Can someone confirm or correct that the first two shaders are always model shaders from the Model folder and the last two are always vegetation shaders from the Vegetation folder? In other words, is there any reason you would use a shader from the vegetation folder in the top two or the Model folder in the bottom two? Also, is there any negative consequence to having a material which has vegetation shaders but is also used as a non-vegetation prop (like a very specifically placed rock by a wall)?
  12. In C you can find entities by name so you could do something like world->FindEntity("mynamedcube")->SomeEntityCommand; But it's undocumented so I don't know if it's available in Lua.
  13. And going back to the original problem, with that code included, otf does load and work from data.zip. So this can be closed. Thanks.
  14. Ok. That's new. That wasn't needed before (or I just never saw it back when we were using App.cpp/App.h). Thanks.
  15. It seems like loading from data.zip doesn't work any more but I could also be doing something wrong. Project file: https://www.mediafire.com/?b2at84k3380jqc9 I started a new project, added a new Menu folder under Material and put a tex file there. Everything runs fine from Visual Studio and the exe. But if you Publish it as standalone, the load fails. Here's the test code. #include "Leadwerks.h" using namespace Leadwerks; int main(int argc, const char *argv[]) { Leadwerks::Window* window = Leadwerks::Window::Create(); Context* context = Context::Create(window); World* world = NULL; //Load a texture Texture* texture = NULL; texture = Texture::Load("Materials/Menu/arrowright.tex"); if(texture==NULL) { MessageBoxA(0, "Texture load failed.", "Error", 0); exit(1); } while(true) { if(window->Closed() || window->KeyDown(Key::Escape)) return false; context->SetBlendMode(Blend::Alpha); context->SetColor(0,0,0,0); context->Clear(); //Display the texture on screen context->SetColor(1,1,1,0); context->DrawImage(texture,0,0); context->Sync(); } return 0; } Why would loading it from data.zip fail? (I tried both include and not include unused files.)
  16. Damn. This may be a bigger issue. There are other things that don't load from data.zip file that should, like textures. Investigating...
  17. I wasn't sure it would but yeah, seems to work fine outside of the data file. Not the end of the world for me. I can switch to a different font or just leave the font unpackaged (it's free even for commercial). Just bringing it to your attention. (Again, I hesitate bringing things like this up because I don't want to take your time away from what I consider more important, like the character controller slope jump issue.) But it's funny that Leadwerks does things you don't even know about.
  18. C has an unofficial/undocumented function: camera->SetDebugPhysicsMode(true); Not sure if it's exposed to Lua.
  19. I downloaded a free font with an otf extension. Everything works fine in my project. However, when I try to publish it, the font fails to load from data.zip file. I made sure to add otf to Include Files and I unchecked "Only include used files," just in case. Font is here: http://www.1001fonts.com/seshat-font.html
  20. That's great! It works from the Package. Thank you!
  21. Hello. I tried to download the attachments at the bottom of this blog but got an error. Sorry, there is a problem The page you are trying to access is not available for your account. Error code: 2C171/1
  22. Out of curiosity, I tried to publish the project as Standalone, added the txt extension to include and unchecked "Only include used files." I removed the zip loading code, only looking to read from a txt file inside data.zip, using the last three lines of the above code. The load failed. Tried with a mat file and that failed as well. So it seems FileSystem doesn't work at all with Package or even the Leadwerks data.zip file, which is too bad.
  23. I have a text file in a zip package I'm trying to read. The zip loads successfully and the contents show the txt file is there. However, when I tried to load it with FileSystem::OpenFile("text.txt"), the function fails. But if I put the text file into the folder by itself, the function succeeds (loading it directly, not from the zip file). Does this just mean that FileSystem does not work with Package? I'd love to have zipped text files which provide data to my game (like NPC conversations). I could try to use Package::ExtractFile to do this the long way but I'd really rather not extract files just so I can access them and have them be publicly available, defeating the purpose of password protecting them. In researching a solution for this, I saw that this came up 3 years ago, without a solution. Code, if it helps: Package *package=NULL; package=Leadwerks::Package::Load("text.zip",""); if(package==NULL) printf("Package load failed\n"); else { printf("Package loaded\n"); printf("Number of files: %d\n",package->CountFiles()); cout << package->GetFileName(0) << endl; cout << package->GetFileName(1) << endl; } Stream *stream = FileSystem::OpenFile("text.txt"); if(stream==NULL) printf("open failed\n"); else System::Print(stream->ReadLine());
×
×
  • Create New...