Jump to content

Brutile

Members
  • Posts

    314
  • Joined

  • Last visited

Everything posted by Brutile

  1. I'm getting some bad shadows happening in my game at the moment. If I only have 1 light in the scene, it's fine, but when I add a second, this happens where they overlap. Is this a common problem?
  2. It seems to have resolved the issue. Restarted a few times just to make sure, and it is working ok.
  3. I'll let you know if its working when I get home from work.
  4. My Leadwerks isn't working at the moment, so I can't test any code. I can only give you pseudo code. You basically want to make the camera work like in the FPS example, but then move its position backwards in local space. Basically, what you already have there, but add something like: self.entity:SetPosition(self.pivot:GetPosition() + Vec3(0, 0, -10)) I'm assuming pivot is where the player is?
  5. After doing some level design in the editor, it became quite clear that the texture assigning part was very unnecessarily slow. I'm not just slapping a texture on entire boxes, I'm using the caulk material to optimize for performance, then applying the texture on only visible faces. Having to click on each face, then clicking 'apply texture' is hindering my workflow. And the shortcut (Ctrl + P) is definitely not any better. I'd rather not have to take my hand off the mouse to do things. Something I would like to see is shortcut/keyboard customization to ease this problem. But I also thought of a feature which could help even more: A texture painting mode, where it acts like the face selection mode, except when you click, it applies it instantly, rather than having to highlight each one, then apply it. What would make this even better would be a click and hold painting feature that applied the texture to faces as long as your mouse is held down. This would speed up level creation by a huge amount, and would be so much less tedious.
  6. No fix yet, mines still not working. I've even tried to opt out of the beta, but it still isn't loading
  7. I haven't worked with the terrain yet, so I don't know its features, but you could probably paint an invisible material over the cellar entrance, then disable the terrain collision when you enter the building, then re-enable them when you leave.
  8. The distributorOfPain variable is used in the monster AI script so it would chase who ever inflicted it damage. I'm assuming it is left the same in the player script, so that its open to change. E.g. If someone introduced multiplayer, where a second player could inflict damage to the first, if the Hurt function is expecting one argument (just damage), but gets two, it will give errors. As for the Take Damage function, I believe it is there for those who want a different behaviour. It calls an output from the node editor so you can link it to something else.
  9. There was an update just a minute ago, now Leadwerks doesn't load. It shows the splash screen, but nothing happening in the status bar at the bottom and it just stays there Edit: It just mysteriously started working again Edit: Now it's not working again
  10. Couldn't have said it better myself. I think that the marketplace should focus more on static props, textures, audio and script/shaders
  11. I agree with you on this, but more the fact that you can't edit them to add your own animations if you need them. There's no way a 3d artist could add animations for absolutely every action possible.
  12. Here is my progress so far. I will be trying to use all custom made assets to develop my skills in all areas. I have created three textures so far (floor tiles, wall tiles, concrete) and a custom player script. It's not gonna be your typical winter themed game. The general idea of the game is that there is a massive winter storm happening and you have taken shelter in an underground bunker. As for gameplay, I'm not quite sure. Happy to hear suggestions. I hope this was the right thread to post this. Let me know if its not.
  13. I would quite like to see a tutorial on decals.
  14. No, the game is running as far as I know, but I don't have any moving parts, so I can't really tell. And yes, it's the same problem as in that post, which makes mine a bit redundant. I tried searching for it, but found nothing. I guess the search engine is just not doing its job Is there any way I can delete this post?
  15. I think I'm having the same problem. I haven't tried using the character prefab, but it sounds like it is related. I'm guessing that "Camera 2" is the first object in your scene? For me it says it failed to load the texture for whatever object is first in the scene. I think something is wrong with the blank template (I'm assuming that's what you used). I'd suggest to try using the FPS template for now and make a new scene using that.
  16. When I load the FPS template project, everything works fine, but when I load up the blank project, add a camera and/or a box and load the game, I get this error: Failed to load texture "D:/My Leadwerks Projects/2016/Test/Directional Light" It always directs to the first object in the scene. In this case it was "Directional Light"
  17. I've taken a break from game development for a while, but this tournament has inspired me to get back into it. I just wanted to ask; can you submit games made with the C++ version of Leadwerks? I know there were issues where you couldn't upload them to the game launcher, but are they still ok for this tournament?
  18. Collider(86 faces): 8ms Collider(135 faces): 14ms Collider(146 faces): 15ms Collider(31 facecs): 3ms Collider(107 faces): 10ms Collider(142 faces): 14ms Collider(70 faces): 8ms Those are some times to generate colliders. It ranges from around 3ms to 20ms. The time taken to generate the mesh ranges from 0ms to 1ms. Chunks are 16x16x16
  19. You would need add another surface to the mesh and apply the material to it.
  20. I'd recommend using the default terrain generator. It is a lot easier to setup, but I'm guessing you may want holes and such. This is the add vertex function from the docs: AddVertex(const Vec3& position, const Vec3& normal=Vec3(0), const Vec2& texcoords0=Vec2(0), const Vec2& texcoords1=Vec2(0), const Vec4& color=Vec4(1)) You want something like: surface:AddVertex(Vec3(TerrainWidth*self.TerrainSquareSize,0,TerrainDepth*self.TerrainSquareSize), Vec3(0,1,0), Vec2(TerrainWidth / TerrainSize, TerrainDepth / TerrainSize)) The uvs are just a texture mapping for that vertex between 0 and 1 on the x and y, but I'm guessing you know that... maybe So if you did the xcoord/terrainSize that would get all points between 0 and 1. and the same for the ycoord
  21. I've implemented a voxel engine in Leadwerks, and I can say that it can be done, but I've found that the time it takes to generate the collision is quite long. I've had a lot better luck in Unity. From what I've found, Leadwerks is faster to generate the mesh, but Unity is faster in the collision, but not that much slower in gerenating the mesh, so Unity is a better option IMO for a voxel engine. Hope this helps
  22. Spawning script: In Start: enemyModel = Model:Load("Models/Characters/Crawler/crawler.mdl") enemyModel:Hide() Spawn Code: local enemy = Pivot:Create() enemy:SetScript("Scripts/Objects/AI/Enemy.lua") enemy.script.player = self.player enemy:SetPosition(Vec3(math.random(-1000, 1000), 1000, math.random(-1000,1000)), true) local pick = PickInfo() local p = enemy:GetPosition() --places enemy above the terrain if self.world:Pick(p, Vec3(0, 0, 0), pick, 0.0, true) then pick.position = pick.position + pick.normal enemy:SetPosition(pick.position) end Enemy Script: In Start: --makes an instance of the enemy model in the spawning script self.playerModel = enemyModel:Instance() self.playerModel:SetParent(self.entity) self.playerModel:SetPosition(Vec3(0)) self.playerModel:SetRotation(0, 180, 0) self.playerModel:SetScale(1.5, 1.5, 1.5) self.playerModel:Show() self.entity:SetMass(10) self.entity:SetPhysicsMode(Entity.CharacterPhysics) self.entity:SetCollisionType(Collision.Character) self.entity:SetPickMode(0) Let me know if there is anything else you want to see.
  23. My game so far consists of enemies spawning at random locations on a terrain. After testing half a dozen times, I've found that the game would consistently crash/stop responding after spawning exactly 130 enemies. I've also found that around the 80 mark, some enemies will be invincible. I've done all that I can to prevent memory leaks and after monitoring the memory usage, everything seems in order, but it still crashes after 130 enemies have spawned. Note that there are not 130 enemies alive at the same time, only 20 are allowed to be alive at once, and when they die, their entities and resources are released. Is this likely a fault with my code or is there something in the engine that is causing this?
  24. Is there a way to use bit shifting in lua? i.e. 1<<8 to get 256
  25. In the future, you should give away things like 3d models and game assets. That would be a lot more motivational.
×
×
  • Create New...