-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
Why doesn't the model have a box physics shape on it when I open it in the model viewer? What did you do different with the prefab to get that shape?
-
Oh, this one is very nice. I didn't realize how to call entity script functions. I've been calling global functions all the time. This is very handy! Ty. Now if only we could pin stuff like this
-
In a way it does open up the doors for more advanced features, but I agree it's hard to figure out how to make that clear in a few words.
-
Change that boolean property to true and try it. http://www.leadwerks.com/werkspace/page/api-reference/_/camera/camerapick-r199
-
I think the idea could be applied to anything. When I hollowed csg to make a building and carved a door out they were all separate. Having them together would be nice.
-
I'm thinking when carve happens LE should make a hierarchy of the remaining pieces automatically for us. I have to imagine keeping the pieces together is what ppl want more than not.
-
Ah. KeyHit() strikes again.
-
Are you in beta?
-
If I do the following it doesn't play the sound: if window:KeyHit(Key.Space) then self.cellphone:Play() end If I use any other key it works: if window:KeyHit(Key.Tab) then self.cellphone:Play() end In the docs it says it should be Space http://www.leadwerks.com/werkspace/page/api-reference/_/key/ What am I missing?
-
omg mind blown! I didn't even know that option existed. This changes everything
-
That blue axis line never changes for me as I rotate it around. What am I missing?
-
It would be nice if we could tell what direction pivots are facing.
-
Don't do that, as Aggror says, just do it on the top level.
-
Veteran programmers, and veterans of Leadwerks
Rick replied to spacepunchgaming's topic in General Discussion
I don't have the time to do full lessons but in case you are wondering I do 1 on 1 training for $10/hr. Just hit me up on PM if interested. I tailor my sessions to the person's needs which I think helps more than straight videos. -
Did you recompile the visual studio project?
-
Ah, you just said "crash" and "no crash" so I thought you were meaning while the game was running. Sorry.
-
Are you loading anything only in code where that thing isn't in the map in any way? I think that's probably the most common thing that I recall. I don't believe, could be wrong, the logic goes through all the code to see what gets loaded but only includes what is in the map files themselves.
-
You can have more than 1 map by doing File->New. Then you can load these maps at any time. Loading a map though will cause a pause as it's reading from disk and any read from disk will cause a pause. I plan on making a huge open world and I was wondering to optimize as much as I can LE really doesn't handle this all that well honestly (depending on what you mean by huge). Josh tends to steer people away from the idea of huge open worlds saying it's not realistic for 1 person/small team to do (possibly some truth in that). You can do this but it more requires you to code a system to handle such a thing. The various ways I can think of doing this would be: 1) Just try and brute force it. Make the largest terrain and just populate everything in 1 map. You might run into performance issues with this method but in terms of effort on your part it's the easiest but of course if you can't get the performance for the user then it's worthless. 2) You can't use Map:Load() on another thread as it loads entities into the world and that all has to happen on the same thread LE runs on. I haven't heard anyone do this successfully. So instead if you store entity information yourself instead of using LE's map system then you may be able to load that information on another thread and pass it to the main thread to load the actual models. LE uses an instancing system so loading a model/texture that's already loaded just makes another instance and is basically instant and won't cause a pause in the game. This would obviously take more effort on your behave. 3) You could use networking on the same machine (some games do this). Basically when your game starts it starts a "server" application as well that basically stays hidden. This "server" app is sort of acting like another thread where it reads information about the map and then sends network messages to your main game to act on. This would require a different map storage than just the plain LE map format (I guess you could use the LE map itself if you knew how to read it (it's binary)). This would obviously take more effort on your behave. I really do wish LE used something like a SQLITE DB to store it's map information. Having it in text format and able to run sql on it would be handy in various ways. All of this depends on how many entities you really plan on having. If the current veg system works for you (ie you don't need to chop trees down or anything like that) and you plan on having lower entity count "areas" (not many massive towns) then #1 should be OK, but like you said it may have a higher 1 time loading time. The thing to remember is that LE won't load an asset in another thread so in the other systems you'd still have to load 1 of each unique model/texture at the start to precache it anyway. If you load a new model/texture during run-time there will be a pause in the game.
- 1 reply
-
- 1
-
This is what paypal is supposed to be. I use it for most all online purchases because of this, but I know not everyone does that.
-
That's what I'm wondering about though. I mean if it's in the editor then it gets the exposure to LE users. I never look at the workshop in steam. I do it from the editors interface which at that point I don't really care where it's coming from/stored. The question is does having steam house the workshop items give people a more fussy feeling about LE than if it had it's own storage place for things and you added/edited/put up for sale from the LE editor?
-
I would assume Steam is the infra that's holding the items and managing the sale itself. Josh could skip Steam and do his own thing but then he'd have to manage the storage of items and sales transactions himself, which he could do with a little more work. That way we would get more of the profits since Steam wouldn't need it's cut. I have to imagine there is a shopping cart that you can control vial web api calls that can be integrated into the LE editor just the same as the workshop would be.
-
https://db.tt/TefSRu0H There was another topic about this recently so I thought I'd share what I had when we were working on the Dead Anyway game as it may help others in the future. Awesomium is a library that let's you use html/css/javascript for your game UI. http://www.awesomium.com/ This example provides a system where you can call javascript functions from lua and lua functions from javascript (some C++ code acts as the middle man but it's generic and you won't have to touch it) in a generic fashion. All you have to do is define the functions and their parameters and then call a SendMessage() function passing in the string value of the function to call in the other language and a csv string of the arguments. So if I wanted Lua to call a Javascript function I'd define my Javascript function in my html page: // called when the craft button is clicked on the html page $("#craft").click(function(){ app.sendMessage("Craft", "rope, 2") }); Then on the Lua side you just define the Craft function: function Craft(item, qty) end If I wanted to go the other way, I'd make the call from Lua: SendUIMessage("Craft", 'Axe, 1') and on the javascript side I'd define the function: function Craft(item, qty){ } This only has mouse input integration. I haven't figured out keyboard integration yet. If you want to play around with the example the html page is in the UI folder and you can define your lua functions that get called from javascript in the Scripts/UICallbacks.lua file. You can alter the html file however you want and the lua files however you want to see the results. Shouldn't be any need to alter the C++ VS project. If you want to make changes to the VS project then download Awesomium and you should be good to go. A variable for the path gets created for you and that's what's used in the VS projects for the include and lib path so it should just work once you download it and install it.
-
Yes, ideally the code would be better structured so you could just do that check at the top of a function and if nil return from the function. However, the AI code is fairly messy. I was playing with Behavior Trees (found a lua lib and made it work with LE and extended it a little) and found that although building the tree can be complicated, it really helps break AI processes down into much more manageable code. I might share this at some point if I find time as I think it could be useful for people. Without a UI to build the tree it can seem complicated though as it's a big lua table with nested lua tables and that can get complicated to follow, but it's less spaghetti code and more config than the current AI example.
-
Had an idea on how to make a generic messaging system back and forth between lua and javascript back in the Dead Anyway days (doing both ways). Don't have much free time this week but I think the idea would work. This would allow you to have 1 C++ function and never have to touch it again (as it would act as a generic interface between lua and javascript) and then just define functions in javascript and lua and send messages to call those functions. Would make for a slick and easy way to get functions called between the 2 so you can have 2 way communication very easily and dynamically.
-
Yeah, I noticed that dead link too What would be nice is to have a generic C++ interface that allows communication from Lua to Javascript and back without having to add/edit any C++ code once it's in place. That way one could add this little C++ code, compile their exe, and never have to mess with it again and now they just do things in Lua and Javascript to hook up communications. I think this can be done.