Einlander
Members-
Posts
778 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Einlander
-
Cylinder collision seems to be definitely broken.
Einlander replied to DerRidda's topic in Leadwerks Engine Bug Reports
also if you have a cylinder with weight, and set to prop, and you use the fpsplayer to throw it, it will roll on it's edge. -
If you select swept collision for an object, then select a different object then come back to the object with swept collision, it returns to the unchecked state.
-
The building you see in the images is just a simple convenience store. It has the front store part, A storage/Stock room and the small room is the office. Other buildings will have different looks as long as you build the bsp tree properly. Corridors and hallways are currently just rooms where you simply don't build walls. As for windows and doors, I have yet to get that working. I have to build in a system where it recognizes outer walls and inner walls. If you look closely at the images you will notice that each room has a gap on all sides. This is to allow an outside wall to be created so you can have bricks on the outside and drywall on the inside. doorways would simply be holes in the walls and a door jamb+ door prefab would link the 2 to hide the gaps. So as to not play guessing games with entities, I will have to create yet another subsystem that will place the windows and doors on certain tiles (The buildings are made of tiles), store them in a list and apply them to the internal and external walls. The furniture and other things will follow similar rules, ie: rooms name is "Office", a desk goes in an office, on the desk will be a lamp, etc. I have a system that I created with the walls that will snap the to their cardinal direction (north, south, east, west) without rotation, that can be applied to furniture. The lights are a bit simpler. If I turn off shadows on the directional lights, I go from 20-30 fps up to a solid 60 fps, but turning off shadows isn't ideal. So I have come up with 2 Ideas, when you leave the bounding box of a building, all props inside and maybe the walls will be hidden, All buildings behind the player beyond a certain distance will also be hidden. And to take it further, as the link in this thread shows http://www.leadwerks.com/werkspace/topic/9478-ps4-infamous-game-technical-details/page__hl__infamous , In my game it is not 1 solid world, it is divided into zones. All adjacent zones will be loaded and only displayed when the player is looking in their general direction. When the player moves to a different zone, all zones (x,z) positions get shifted to the old position and the player is warped to the inverse side/side opposite. All this would keep the engine from drawing ridiculous amounts of buildings, and keeps the shadow shading low. Hopefully it will keep the fps at a bearable level. Also I manually enabled my release mode game to run with ATI crossfire (debug runs windowed, and release runs fullscreen 1080p). I had a lot of downtime at work to figure all this and write it down.
-
Random Bablings About the Project I'm Working On The Journey Here Ever since I bought Leadwerks I have been making the same game. It's games objective has morphed many times since. It started out as a stand clone of a survival mode mod for Left 4 Dead 2. The players would be stuck in a secluded area with no way to escape. Zombies would come in waves and the player would be able to fortify their location. As time went on these locations became bigger and bigger. I started to have levels with multiple city blocks where all the houses were enter-able and complete malls with articulated stores. I even have a screenshot on Steam of an apartment complex where each room was open to the player. Eventually I got to a point where I has a rather large open world level. At this point I decided it would be better to remove the overarching plot about being rescued and make it a game about world discovery. Instead of building it by hand I decided all buildings and locations would be dynamic. This is where all the real work began. Starting Small What I'm working on is now a cross between multiple games. I wanted to have the open world of Dayz, the gameplay mechanics of Left 4 Dead 2 with its claustrophobic closeness of a metropolitan city, and the world generation of 7 Days to Die. BUILD ALL THE THINGS!!!! o/ This was almost my first mistake. I almost started creating the world generator, and building generator at the same time. While at work with the composition book with graphing paper I carry for game ideas I figured out exactly how EVERYTHING interacts in the world. Here I decided I would start and finish the building generator. BSP Trees In order to make a building dynamically one would need to tell the computer how to build it. A template of some sort. One that would adapt to the size of the building. I decided the best way to do this is to define the dimensions of a building and section off each room. To do this I decided to use a bsp tree. I am bad at 2 things when it comes to computers, math and linked lists. Guess what, a bsp tree is almost exactly these 2 things. I ether split a room vertically or horizontally, no diagonals as to preserve my sanity. So far you tell the generator the 2d dimensions of the building. Then you tell it what percent of the floor space you want to claim. After you claim it, you name the floor-space. So far I have this accomplished. I can build the floor and set up the walls. Now what I need to do is make it figure out where doors and windows go, aka portals. Another gotcha that will need to be worked around is since the generator uses percentages you cant have a static width hallway, you would need to tell it something like 1% and it would attempt to use the least amount of space unless the building is HUGE. These nodes wont split themselves! Editing In the Editor Not much to say here other than it's hard. It's hard to change something that creates itself. What you see isn't exactly what you get. Results so far: Look at those beautiful rooms. This time with shadows. HUGE GOTCHAS It took me way too long to figure this out. Even though all the prefabs being used are instanced, each building isn't. Even if the building is identical en every way since it's being created and not loaded it's different. Each additional building after a certain number causes a devastating fps drop. I debug my game with vsync on to let me see what people with less capable cards are seeing. This sudden fps drop can cause you to watch the engine redraw the world allowing you to see behind walls. What I have left: Basically EVERYTHING. Player State Inventotry Managment Npc Managment Prop/Entity Management World State Saving, Streaming, and Moving World Generation (streets blocks) Building Generation (building styles, building prop spawning) Entity view state determination (things behind you are not drawn, things inside buildings aren't drawn) Useful Links: http://lua-users.org/wiki/TableSerialization PHP-like print_r This has examples of how to print all the contents of a table regardless of how many items it holds nor how deep it is. I used the PHP-like print_r function. If you store all your settings into a table you can use this to print it to a file and then later directly load it. http://lua-users.org/wiki/CopyTable DeepCopy Somtimes you want to lua to treat tables BY VALUE instead of BY REFRENCE so by using deepcopy you can clone a table and not have the original table change when you change the copied table edit: http://snippets.luacode.org/?p=snippets/Deep_copy_of_a_Lua_Table_2 Alternate version of deepcopy. The above version seems to choke on super complex tables with functions in them. HEED ITS LISCENCE (MIT/X11)
-
And in your app.lua, delete the steamworks:initalize line.
-
Nevermind, the update handles jagged slopes so much better, and i'll just increase the stair step size.
-
I don't have time to test it yet and i'm not near my computer, but can we use the fps controller to jump down stairs?
-
Incorrect shadows on rotated csg's
Einlander replied to Einlander's topic in Leadwerks Engine Bug Reports
So I read that thread. I honestly do not mean to be rude and offensive, but that was the crappiest "solution" to an actual bug. So basically it's telling me that when I create an object with a CSG and attempt to manipulate it in ANY way that the numerous bugs that occur is the engine working as intended. This brings me to a complaint I have made before concerning csg's in Leadwerks. What's the point of even having csg's in the first place if the ultimate solution it to model it in a 3d modeler and import it? If that's the case then almost any engine would do. Not counting the fact that there are so many undocumented commands and features, we now have to contend with the engines working process design. This COMPLETELY AND TOTALLY foobars my game. I have buildings building dynamically generated in game and rotated in place. I can not have a building just appear with no shadows, or misplaced shadows. This is game breaking and needs to be dealt with. I seriously do not mean to be rude. I don't want to even say any of this, but I simply can not believe I read what I read, nor can I allow myself to go any farther making my game while the numerous csg bugs persist. -
In this case you would want to use lua ffi. http://luajit.org/ext_ffi.html it allows you to directly load dlls and their C headers, but odds are you will have alot of work ahead of you.
-
CSG Prefabs loaded by script have no collision.
Einlander replied to Einlander's topic in Leadwerks Engine Bug Reports
I'll post a video of what i'm talking about in a little bit. Link for when the video is finished uploading and processed: -
CSG Prefabs loaded by script have no collision.
Einlander replied to Einlander's topic in Leadwerks Engine Bug Reports
I'm starting to think that this bug is starting to fall under an unintended results category. You do not need to attache a script to the csg in the prefab to get physics to work. you must select EVERY SINGLE CSG in the prefab and set the shape. If you use the csg prefab in the editor, then it works as it should. If you do it manually in code then you must set everything manually beforehand. This has the potential to became tedious. For example, I already have a fully articulated house created with csg's. The entity count is already over 100. Now i have to go back and add a physics property to every csg because there is a possibility that i might have the house spawn dynamically through code. Hopefully this is a bug, if need be I can make a suggestion for all prefabs to have their default editor physics shape/states loaded when called from code. -
Or just verify the integrity of the game files.
-
As the title says, If you make a csg prefab and re-texture it using the drag and drop method it will appear correct in the editor. (NOTE: The warning about changing from and insanced prefab DOES NOT appear). If you change the texture through the appearance tab it will change the texture ingame and show the insance warning dialog
-
I found 3 texturing bugs. Two of them may be related as they deal with how textures are handled once an object is rotated. These all deal with CSG's 1. When copying and pasting prefabs it reverts to the original prefabs original texture 2. Texture lock doesn't work when rotating in perspective view when an object has children. If you start rotating an object while in in perspective view that has objects attached to it, the texture lock only works for the root object. BUT, if you then continue to rotate the object using the top,bottom,etc... views, the texture lock will work. 3. Unpredictable Behavior when manually typing rotations. Manually type in the rotation value and pray your uv still exists. Might be similar to this bug http://www.leadwerks.com/werkspace/topic/10179-triangle-side-of-wedge-ignores-or-mangles-texture-mapping-settings/ Video is still uploading, will appear when done.
- 7 replies
-
- 1
-
- Bug
- Textureing
-
(and 2 more)
Tagged with:
-
I'm trying to make a Level of detail system, and i found that I can not hide children from a parent. I would like to suggest the ability to hide a child Ie: child:Hide() This would hide the child and leave the childs' children with the same properties (i hide a child and it's children is still visible.). Also the ability to hide all of a childs children ie: child:Hide(True). This would hide a child and all it's children, but leave its' parents alone. My experiments with children Attach this to the parent: function Script:Start() self.entity:Hide() rotation = Vec3(0,0,45) print(self.entity:CountChildren()) local child = self.entity:GetChild(0) print(child:CountChildren()) print(child:GetPosition():ToString()) local child1 = child:GetChild(0) print(child1:CountChildren()) print(child1:GetPosition():ToString()) child1:SetRotation(rotation) -- to check if we are actually manipulating the child of a child child1:Hide() -- the rotated csg should diassapear end Results:
-
you can also in your model editor, create your model, then create the physics objects by using simple convex meshes (box,cylinder,etc) See Announcement here: http://www.leadwerks.com/werkspace/blog/1/entry-1203-beta-branch-update-tons-of-art-pipeline-enhancements/
-
I have a bunch of models that I loaded in the Leadwerks editor. Lets use a broken wall with holes in it for an example to avoid the "just a csg" solution. I want to be able to apply a different texture to a single wall, lets say instead of red bricks I want to use cinder blocks. Is there a way to force the editor to load a non instanced model?
-
I've come across this too. You're walking through a game world and all off a sudden you no clip through a wall. Then you find that the wall is the child of something and you need to remake the area.
-
Sadly that's not how steam workshop works. You need the game to use the workshop. Unless Josh comes out with a free leadwerks player for steam that has workshop support.
-
Editor 3d Control Widget no longer roatates.
Einlander replied to Einlander's topic in General Discussion
Just checked, you are correct. -
When clicking on a rotated object or while rotating the object in the view-port, the control widget no longer rotates with it.
-
As a user of a multi-monitor setup, I was amazed at the number of AAA games that simply do not take into account the possibility that their game may be played on one monitor of a multi-monitor system. After rage quitting a gaming session because I kept dropping back to the desktop because my mouse wandered outside the game window, I decided to write some brain-dead simple lua code to trap the mouse in the game without interfering with any code. -- trap mouse start if (self.trapmouse == true) then if (self.window:GetMousePosition().x<0) then self.window:SetMousePosition(0,self.window:GetMousePosition().y) end if (self.window:GetMousePosition().x>self.context:GetWidth()) then self.window:SetMousePosition(self.context:GetWidth(),self.window:GetMousePosition().y) end if (self.window:GetMousePosition().y<0) then self.window:SetMousePosition(self.window:GetMousePosition().x,0) end if (self.window:GetMousePosition().y>self.context:GetHeight()) then self.window:SetMousePosition(self.window:GetMousePosition().x,self.context:GetHeight()) end end -- trap mouse end I placed this in app.lua before the render, but it can be placed anywhere in your code as long as it is placed AFTER any mouse handling routines. The code is inabled by setting self.trapmouse to true.