User Tag List

Page 13 of 43 FirstFirst ... 3 11 12 13 14 15 23 ... LastLast
Results 121 to 130 of 426

Thread: XLua extention beta

  1. #121
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Very good piece of advice astro! I've been using a system that pretty much prevents the game ever calling imported objects just in a logical manner, but in things like buffer overflows its crashes, or if it ever got desynced by an object getting deleted but not removed. So I will definitely implement that deleteobject code just as a failsafe!

  2. #122
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    There was some debate about this a few pages back actually about what happens to destroyed objects, and it was suggested that the headerObject struct might be maintained, but apparently it's not. That would also mean that the LPRO_IsDestroyed function in rSDK is also not correct either.

    Right now I don't know of any good way to tell whether an object is still alive or not, so you have to be a bit more paternalistic in your object management if you want to safely use the Object functions. Of course xyzzy's suggestion would solve a lot of problems, too bad it doesn't exist right now.

    Thanks for pointing it out anyway though.

  3. #123
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    crap. I had actually ALREADY done exactly that in my code O_o
    nevermind!

    sigh I havent programmed a thing in like half a year, i'm getting rusty

  4. #124
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Quote Originally Posted by Retriever2
    There was some debate about this a few pages back actually about what happens to destroyed objects, and it was suggested that the headerObject struct might be maintained, but apparently it's not. That would also mean that the LPRO_IsDestroyed function in rSDK is also not correct either.

    Right now I don't know of any good way to tell whether an object is still alive or not, so you have to be a bit more paternalistic in your object management if you want to safely use the Object functions. Of course xyzzy's suggestion would solve a lot of problems, too bad it doesn't exist right now.

    Thanks for pointing it out anyway though.
    The headerobject struct is maintained until the end of the current tick, it's still valid in your extension's HandleRunObject function, so you can use that to weed out dead objects you've got pointers to.

    Alternatively store Fixed Values instead of LPROs, because those can be checked for validity on use without crashing if the object is gone.

  5. #125
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    yeah I've noticed that dead objects will keep around until the end of the current tick, it really makes it a pain in the arse for some "in-mmf" code that would require an object to be deleted INSTANTLY from the game, which afaik is impossible. Back when I made gridquest in TGF1, I wanted to have a frame changing code that would let me destroy all active objects, than rebuild the frame in the new level. But if I did that, I'd exceed the max objects limit (of only 256) because the deleted objects took a frame to resolve, so I had to have it delete everything 1 frame and rebuild it the next.

    Wish there was an "instantly" flag for the destroy function in MMF2, but who knows what kind of trouble that could cause

  6. #126
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    You seem know a lot more about the internal object management than me. I guess I misunderstood some of the earlier stuff. I'll look into something that sweeps out the junk.

  7. #127
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Quote Originally Posted by Pixelthief
    yeah I've noticed that dead objects will keep around until the end of the current tick, it really makes it a pain in the arse for some "in-mmf" code that would require an object to be deleted INSTANTLY from the game, which afaik is impossible. Back when I made gridquest in TGF1, I wanted to have a frame changing code that would let me destroy all active objects, than rebuild the frame in the new level. But if I did that, I'd exceed the max objects limit (of only 256) because the deleted objects took a frame to resolve, so I had to have it delete everything 1 frame and rebuild it the next.

    Wish there was an "instantly" flag for the destroy function in MMF2, but who knows what kind of trouble that could cause
    yeah i'm pretty much doing the same "wait until all the objects are finished updating before actually deleting them" in my game

    i dunno it just sounds like a bad idea to nuke stuff out of a table while you're in the process of iterating through it; of course it might not even have any bad effects for all i know, but whatever

  8. #128
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    http://hocuspocus.taloncrossing.com/rii/xlua-dist.zip

    I think this update will handle deleted objects safely..er. I was still encountering invalid LPROs even in the HandleRunObject event each loop, so I'm trying to compare the headerObject address to the oblOffset like in the Fixed2LPRO function, but hell if I know if that's completely safe.

    Also added an mmf.Object.Destroy function, and the optionally-defined mmf.DestroyCallback function. Also fixed some issues with the debugger info.

  9. #129
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Aug 2006
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Thanks, this is a great extension. Im just wondering on the basic usage.mfa example for the paint draw is it possible to set the draw rate up for a smoother line?

    Setting the mmf frame rate up really high didn't make much difference so im guessing it uses it's own rate? I couldn't find the command in help to adjust the rate however but i haven't used the lua coding much so this might be simple and be done with a different method than rate.

    Maybe LUA and OpenGL should get a sub forum section each as im sure there lots of stuff they can both do and there could be coding tutorials and examples etc. I actually think that would be great just like there should be a dedicated HWA shader/effect coding and extension dev areas which will hopefully happen at some point.

  10. #130
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: XLua extention beta

    Framerate does affect it but there seems to be an upper bound. Clearly this isn't the right way to go about doing a paint program, but nonetheless I like how it demonstrates some Lua usage.

Page 13 of 43 FirstFirst ... 3 11 12 13 14 15 23 ... LastLast

Similar Threads

  1. XLua
    By Retriever2 in forum Released Extensions
    Replies: 6
    Last Post: 13th August 2017, 07:42 PM
  2. Extention error with exe
    By Jinxtengu in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th October 2012, 03:47 AM
  3. SPC extention question
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 20th November 2009, 03:25 PM
  4. Lua+ or xLua?
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th October 2009, 10:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •