Jump to content

gamecreator

Members
  • Posts

    4,937
  • Joined

  • Last visited

Everything posted by gamecreator

  1. Does this mean that we won't have to worry about euler/quaternion any more? SetRotation and GetRotation will just work, without having to deal with conversions?
  2. A lot of it is above my head too (since I don't know shaders) but it seems like he uses black as a transparent value (that's why the value of red is 0), anything else as drawable. So your mask could look something like this:
  3. He mentions a "masked circle" in his second post. I suspect that's the answer, that mask.tex is the circle mask for the mini map. If you look at the shader code, you see this: if (mask.r > 0.0) { fragData0 = drawcolor * texture(texture1, (vTexCoords0 * zoom) + UV - zoom * 0.5); } else { discard; } which looks like it discards (doesn't draw) pixels that have a red value of 0, if I understand it right.
  4. Check out the font commands here: https://www.leadwerks.com/learn?page=API-Reference_Object_Asset_Font There's one called GetTextWidth.
  5. It depends on your video card, how much you have on your map and your settings. Leadwerks has a separate vegetation tool which uses billboards for vegetation in the distance. You also have a few settings you can specify, like how far you can see things, to optimize. I'd suggest creating a map and littering it with vegetation and playing with the settings to test it yourself.
  6. The cylinder shape is used when you use CharacterPhysics as the physics mode so you can use the automatic pathing for characters. You can check out the SetInput documentation for sample code (as macklebee also linked above). Unfortunately you can't change cylinder shape or size for character navigation but it should work fine for smaller or larger characters. Remember that the player won't be able to see the collision details and they won't notice small size differences. On the other hand, if your game has giants or mice that need to get in small spaces or something, Leadwerks pathing won't be for you.
  7. There is a final update estimated to be released in about 3 months which will include, among other things, the return of proper vehicles (and, hopefully, accompanying thorough documentation).
  8. Whoa! I didn't know you could do that! Very cool and thank you for sharing the code.
  9. You mean if they start a new program while they're running your game? You probably don't want to assume that that's a hack. They could be opening a music program, notepad to take notes, a browser, anything. Plus they could run the hack even before they start your program. Not sure what a nil ping has to do with hacks. A hack wouldn't prevent the program from sending and receiving packets (unless maybe you're talking about lag switching).
  10. No. Clients typically can't hack servers directly. If you have your own server (your computer or one you rent) then setting up a proper authoritative server (https://www.gabrielgambetta.com/client-server-game-architecture.html) will allow you to handle the vast majority of hacks. This includes positions, items, stats, XP, etc. Auto-aim bots are a bit tricky because they're often smarter than just instantly snapping to an enemy. I've also seen a hack that highlighted enemies behind walls, which doesn't need any interaction with the server so it's mostly a fool-proof cheat (you could check the computer for any hack programs running but that's probably beyond how far you want to go).
  11. Thanks. Ah, makes sense.
  12. Great start but this is a little confusing to me. Some questions: What does GetSize return? Is it the number of pixels across and down on the given monitor (the monitor's resolution)? What does GetPosition return? What are the XY coordinates on a monitor? Or, how does the display have a position? How would you make a full screen window over two or more displays of your choice?
  13. Welcome to the forums. Unfortunately this was asked before and the answer is that you can't because Leadwerks has a custom vegetation system. You would have to place models manually but I don't know how slow that would be.
  14. I wonder if the functions could be reset. That way you could have a simple day variable in addition to the above and could run programs "forever." But also not hard to write your own time function for this, if you know how the function wraps.
  15. This is mostly just a curiosity question. Time::Millisecs() and Time::GetCurrent() both return milliseconds as long, which has a maximum value of 2,147,483,647 (LONG_MAX). This equates to almost 25 days, if my math is correct. What happens when these functions max out? Do they next go to 0, do they wrap to -2,147,483,648 (LONG_MIN) or something else? I'm sure this won't affect most people here but it could be relevant for a server that's up 24/7 (I have no plans for this myself).
  16. This is very sweet. Curious if we'll get oceans back and possibly rivers but I know you're not there yet. Edit: come to think of it, do you think it would be easier to implement with your new renderer and Vulkan?
  17. I love the engine being ready to use with any number of helpful libraries. The ones I use most are Steam and of course the zip library (through Leadwerks) which lets you access data/pak/zip files. That said, I think Steam would be easy to incorporate separately, if necessary. I am planning on using GameAnalytics more heavily but I'm not confident that I could incorporate this easily myself (it also relies on libcurl, I believe). And again, back on the other side of the coin, if there was a step-by-step incorporation tutorial for Leadwerks, I think that would do.
  18. Poor Mr. Tiddles. That cat's been missing so long, the missing poster got a concert poster put over it. ? Good environment. Looks like the apartment hallways could use some plants or benches or something to mix things up. You might already have this planned.
  19. Nice. Good job and thank you for sharing the solution for anyone else that might come across this problem.
  20. I was working with vegetation just now and I'm not sure if this is related to the above but I accidentally recreated it with the following: 1. Create a terrain and add a grass texture just as diffuse (not sure if second part is required) 2. Add default tree as cluster 3. Set view range to about 32 - this seems more prominent with a lower amount
  21. It's a bit weird to stand in front of trees that are permanently partially dithered in, until you move again. It would be nice if Leadwerks (or, likely, Turbo) could take this one step further and fade vegetation in or out completely, even if you're standing still, depending on the distance. In other words, if you walk up to a tree and stop, and it would have been half dithered with the current method, it would finish fading in completely.
  22. Dang. Thanks for looking. So I guess the workaround would be to put everything you want to carry over between maps (like players), into all maps, hidden somewhere. Thankfully it looks like it doesn't delete loaded textures and fonts so I can keep them for my custom GUI.
  23. How is this supposed to look? I have the following code and it's not working. #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 = World::Create(); Model* model = Model::Box(); model->SetColor(0.0, 0.0, 1.0); Camera* camera = Camera::Create(); camera->Move(0, 0, -3); Map::Load("Maps/map1.map"); while (true) { if(window->Closed() || window->KeyDown(Key::Escape)) break; // Clear old map, load new one if(window->KeyHit(Key::L)) { System::GCSuspend(); model->AddRef(); camera->AddRef(); world->Clear(); model->Release(); camera->Release(); Map::Load("Maps/map2.map"); // camera = Camera::Create(); // camera->Move(0, 0, -3); System::GCResume(); } Time::Update(); world->Update(); world->Render(); context->Sync(); } } I've printed out the GetRefCount() at all points. It's 1 before AddRef(), 2 after then 0 right after Clear(), even before Release(). In case I misunderstood, I also tried to move the Releases after GCResume but that didn't work either.
  24. There are at least three possibilities: 1. The model's feet were not placed in the world's origin before being exported 2. The model's physics shape doesn't match the model 3. Your ground collision box/mesh may be higher than the ground You can test for these by trying to put the model into another scene. I'd create a simple terrain and try it there. You can also go to View, Show Physics in the editor to see your physics shapes.
  25. Right, or just hit S again to stop it. It's an old problem and super low priority, just wanted to report it.
×
×
  • Create New...