Jump to content

Paul Thomas

Members
  • Posts

    339
  • Joined

  • Last visited

Everything posted by Paul Thomas

  1. I have, the setscriptobject() is being called and is passing the object to Lua. In Lua "fw" isn't nil but methods like "fw.main.camera" don't work. I had first tried using my own framework which is several weeks worth of programming to use different types of effects, cloud system, weather system, etc., so I was attempting to salvage my last framework. I ended up with the same problem, Lua couldn't use the "fw" global correctly. So then I tried using the new framework and ended up with the same problem. It only seems to work successfully using the "normal" way of using framework. Worse case scenario I'll reprogram my whole framework/engine/client for this but it isn't ideal. It's a lot of reprogramming simply because I can't pass the framework object correctly to Lua. I'm hoping I'm just missing something.
  2. I'm probably missing something obvious but I've tried multiple things. Even if I got this done correctly I would have to expand the "commands.bmx" portion for any additional methods I create. This is honestly becoming less ideal for programs that are going the more custom route when it comes to framework. Either it is very lenient and I'm missing something, or it isn't. Lua is really fun so I'm desperately trying to get this to work. Not to mention Lua could make multiple things easier for the project instead of hard-coding every single aspect of the project.
  3. I changed it to a global just to test but no, it doesn't work, and with the setup like this is, it technically is global to all other programs/files. I can use RM in every included file and so forth. Thanks for the suggestion though.
  4. Was going to say that but was thinking maybe something changed in 2.3. Was about to test multiple terrains but now I don't need to.
  5. I had spent hours converting my project from 2.27/2.28 to 2.3. One of the important portions of the project move to me was the render classes, which was basically a full customized version of the 2.27 framewerk. I was able to get everything running as it should except of course the Lua scripts. "fw" was never nil but things like "fw.renderer" failed. I then decided to just grab the newest framework from the 2.3 folders, get Lua working properly, and then I can rewrite the framework for my project needs (cloud/weather system, custom post-processing effects, etc.). That didn't go very well because of how the project is overall structured. I can't understand why either and that is the point of this post. The normal way is to do the following: import "framework.bmx" global fw:tframework = tframework.create() setscriptobject("fw", fw) fw.main.world would work, fw.renderer would work, and so forth. However, since my project is structured a certain way, doing it this way would destroy the organization, so my first attempt (and I will be skipping all my other two+ hours of other attempts) was the following (with some explanation of my projects structure for clarity): '//-- main.bmx/main.exe global E:engine = new engine E.initialize() while not E.S.Quit() E.update() E.draw() wend E.unload() End '//-- engine.bmx include "database/manager.bmx" include "debug/manager.bmx" include "content/manager.bmx" '//-- etc include "render/manager.bmx" '//-- etc type engine field DB:databasemanager = new databasemanager field DM:debugmanager = new debugmanager field CM:contentmanager = new contentmanager '//-- etc field RM:tframework = new tframework ' -- tried multiple variations and naming '//-- etc method initialize() DB.initialize() DM.initialize() CM.initialize() '//-- etc RM.initialize() ' -- does the same as tframework.create() does endmethod endtype RM.main.world works fine, RM.renderer works fine, but this will completely fail: setscriptobject("fw", RM) Having Lua give error about "fw.renderer" or "fw.transparency.world" and so forth, even though RM.renderer and RM.transparency.world work just fine in bmax. Not really sure what I'm missing. Anyone know who has tried the same thing? Anyone know why my version doesn't exactly work correctly?
  6. Yeah, started to think about that. However, I just wanted the scale for the dimensional information. I wanted to make arrows around a model/object which will represent x/y/z and figured I'd use the scale to position the arrows correctly. I started using aabb for this, so for it's working ok. At the moment I'm not sure how everything will react when the object is rotated.
  7. Paul Thomas

    Scale

    How does one get the scale of a model? EntityScale just returns 1, 1, 1. Using GetEntityAABB isn't accurate enough and I doubt I should use that to get the scale of a model.
  8. Paul Thomas

    3dsm

    What is the scale to use in 3DSM? Having a hard time exporting to LE with correct scales/dimensions. Anyone know the correct scales and so forth for export?
  9. Yeah man, LE is a great engine, I was hooked on it since I got my license.
  10. I decided to try and tackle this for the hell of it. I think just about every game I play has a console and thought it would be interesting to replicate this. Of course, initially easier thought than done. My main concern is doing it the most efficient way. First I attempted to just use drawtext() to a buffer and display the buffer whenever I hit the tilde key. However, it just doesn't work out that way. Some consoles have scroll-bars and others you use the page up and down keys to view text that is hidden. So, this is my objective, to use page up and down to display more of the text. I can't seem to achieve this. Once I've drawn the text to the buffer I'm not sure what to do to show different portions of the buffer. For testing I just did "Hello World #" for about twenty lines. The first five display on a height of 100. Anyone know how to display different portions of the buffer? Using a buffer to draw text onto with a height of 100 may just cut it off, so I've tried drawing to a buffer to the full window height, and when drawing the buffer it just makes the whole thing unreadable. The answer to that question would be great regardless of whether that's the most efficient way of doing an in-game console or not, just because it would be helpful information for the future. My next question is, what would be the most efficient way of doing an in-game console? The method I'm attempting wouldn't be too bad once I've figured it out since I'd only have to draw the text onto the buffer whenever text is updated. The keyboard to text also wouldn't be too bad I guess. Any suggestions?
  11. May also be a good idea to use a type of entity for each world that will tell your scene manager what the default original position is for each scene. This way you can accurately place the player in those locations. Really depends on what you plan with the multiple scenes but I would do what Marley suggested but changing the controller position to the new "entity_playerstart" location in the new scene once it's loaded.
  12. Very awesome editor Von04, thanks for providing this.
  13. Welcome to LE, Kevin. Nice artwork. Looking forward to seeing what you come up with.
  14. Paul Thomas

    3D chat

    Dead download link for me.
  15. Start it up Lumooja; $200 per hour (Isn't that what Torque asks for?)
  16. There is a search feature on this forum. I'm not sure if you've been pointed to the original forum: http://forum.leadwerks.com which also has a search feature and is much older than this forum; so there is a lot more information there. There are even several posts about people asking about source over at the other forum. I think sometimes the lack of responses could also be because some questions were asked so many times. I can't even count how many times Macklebee or Marleys Ghost wrote: "Did you add mass to the character controller?" Sometimes replying to the same question that has been asked so many times just gets ignored. However, since this is a great community, questions will eventually get answered even if the answer was given several times. You're also looking at a community a little wrong. You're acting like a customer who demands immediate responses to your questions. Instead, I suggest acting more like a customer in a community of customers. Talk to people, get to know people, befriend people; message friends, ask friends questions, and so forth. I ask Macklebee questions all the time just to see if he may happen to know the answer and I'm sure by now he wouldn't mind smacking me around a bit Anyways. Check out the old forums if searching comes up with nothing here. Use http://www.leadwerks.com/wiki frequently. One of your questions earlier was about the mouse wheel. Wiki -> Input -> Mouse -> MouseZ() = "Returns the mouse's current Z position. This is the delta value of the mouse wheel."
  17. Created a server on it if you wanted to try it Rekindled.
  18. Fill in just "Client Name," and click "Join Game" there will be a list of servers. Connect to that one. Looks like you made one or something (saw it in the list).
  19. I don't have Lua (2.3), but a lot of it seems to just be copying BMax, so wouldn't just: object.mat = nil Work as freeing it from memory?
×
×
  • Create New...