Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1,472 Excellent


About Rick

  • Rank
    Advanced Member
  • Birthday 12/04/1979

Profile Information

  • Gender
  • Interests
    Family, golf, football, programming, games

Recent Profile Visitors

61,529 profile views
  1. Rick

    Leadwerks 5 beta Update

    Do we have Enter, Collide, Exit collision functions in LE5?
  2. Just a different take on this perhaps use GetEntityInAABB would be a better approach so you don't have to store pointers of other entities within other entities or have access to global lists or anything like that.
  3. Rick

    Help me PLZ !!

    Changing font is a state kind of action. When you change it, it's then set for all drawing of text. So you have to change it, draw your text, then change it back to what it was. What timer are you talking about? You have some timer code somewhere? We'd have to see it.
  4. Rick

    The flat earth

    There is a documentary on Netflix about this. Watch until the end and you'll understand what this flat earth movement is all about. The earth isn't disc shaped.
  5. Rick


    What I would do is create a new map called StartGame.map or something like that. You won't have any 3D stuff in it (maybe you would later if you decide to have the start menu 3D background?). In the map add a pivot and attach a script to it. In this script would be where you draw all this stuff in the PostRender() function of the script if you're using images for the buttons or in the Start() function if you want to use LE's UI. Then when buttons are clicked you load the new map that is your actual game. You can see how to load a new map in Main.lua file but I think you just set a certain variable to the map name and then it'll load it.
  6. So you're using the veg system for positions/rotation only? If you are replacing every tree in the veg system with an instance of a model, that's what you said right? I would think you would lose performance of the veg system then if you did that right as that has billboards and such where your model instances wouldn't or are you doing your own LOD type thing and that's what the distance check is for? I was thinking you were replacing the veg trees to instance models JUST around the player since if possible that would really be all you need to do, but the problem is being able to tab into the veg system to do something like that.
  7. This looks cool but it seems it may not be that efficient? If I'm reading it correctly you're loading the tree model for every vegetation model that exists on startup. Then inside each of those models you're checking the distance to the player to determine if you should do something. Just thinking that's a lot of checks happening per game loop. Could you not go the opposite direction and do AABB check in a range around the player, then loop only through those to make them real models vs veg? Keep that list so the next iteration when you loop again you can tell which ones are no longer in the list and change those back to veg vs model? Seems like you'd loop through a lot less veg overall each iteration. Where are you able to manipulate the veg system to hide specific trees? I didn't think they were accessible that way?
  8. Tessellation should really help to add detail to our games! It seems like I don't see a lot of tessellation in games that I play these days. I wonder why that is because if I recall the tech has been around for 3-5 years already?
  9. The bots are having conversations with each other! After the human race is all dead bots will still be replying to each other on forums and the aliens that find earth will be very confused.
  10. So in the scene graph you have a camera object as a child of your player pivot? If that's the case then from your script that is attached to your player pivot you'd do something like this in the Start() function: self.camera = self.entity:GetChild(0) This assumes you only have 1 child to your player pivot and it's the camera. If you have more than one child I think you can use self.entity:FindChild("camera_name_here") Scripts don't automatically get variables like you're thinking because they are children or parents of things, but there are ways to get them with GetChild(), FindChild(), GetParent() calls. This isn't 100% ideal though. Ideally you'd create a script parameter and drag and drop the camera in the scene graph to that parameter. To do this at the top of this script add: Script.camera = nil --entity Then when you select your player entity in the scene graph you'll see the camera parameter show up. Drag and drop the camera to this slot and now you've made a link between the camera entity and this script camera variable. Now you can use self.camera in your script. You can do this with any entity btw.
  11. If this is your entire script then you can't just do self.camera like that. As the error is saying self.camera is nil. Just curious as to your thinking on why you think it would work as it can help explain why it doesn't better.
  12. Close. You don't load cameras separately, just the models really. So let's say you have 10 different models in your game. In a loop just for clarity: LoadModel1 Update, Progress bar to 10% LoadModel2 Update Progress bar to 20% *repeat until you loaded all models Load Map (this will be fast now because you already loaded the models and when this goes to load those models it'll use the instances in memory vs going to disk). Note that you wouldn't manually set the % like this. You'd want to figure out how many models you need to load per map and calculate the % as you're looping over them all. Note this is a "hack" though. We shouldn't have to do something like this and hopefully Turbo handles this better.
  13. Yue, what gamecreator is saying is that the biggest time to load an entire map is loading all the models that are in the map. The LE map doesn't actually have the mdl files inside it. The map file just has information about what mdl files to load (mostly). In LE if a model is already loaded the next load call on it will just be creating another instance of the model (this means it doesn't have to go to disk to do this. it just looks at the already loaded model in memory and copies it.). Creating instances are fast. So if BEFORE you load your map you manually call load on all the mdl files you need then calling the map load will be faster. Since you're manually calling the mdl files to load you can loop over that process and make the progress bar, then at the end call your map load. Yes, there will be a slightly below still when you load the map but it'll be MUCH smaller and probably not noticeable by the user. So it sort of simulates map loading progress bar. This does have the side effect of needing to manually know which models to load for each map. Ideally one wouldn't load every model in the game if it's not used in a map. This is really why the map file should just be json so we can easily open and manipulate it ourselves. Even add fields to it.
  • Create New...