User Tag List

Results 1 to 3 of 3

Thread: Manual activation/deactivation of object instances

  1. #1
    No Products Registered

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

    Manual activation/deactivation of object instances

    Here's a problem i know i'm going to run into: a game i'm working on is pretty much completely going to be externalized (images, sounds, lua scripts, essentially everything). to make programming in this manner less annoying, i'm using only a couple of active objects that represent everything in the game.

    now there's (as far as i know), no way to manually activate/deactivate object instances during runtime (i'd also think there'd need to be a "Manual" option in the "Inactivate" dropdown box). this is a pretty large problem since i'd like to be able to control HOW they are supposed to be deactivated; some need to always stay activated, some need to be deactivated if they quit moving, and others need to be deactivated if offscreen

    i'm not entirely sure if deactivated objects are ignored during the main loop, but if they are, this could take a lot of strain off of both MMF and the lua object (there could possibly be a few hundred non-background objects in the level, all of which are controlled through lua)

    any plans of adding this feature? i'm sure i'm not the only person who needs it... in fact, this could help supplement HWA's overall speed increase

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Manual activation/deactivation of object instances

    thats my exact tactic when making games!

    What I would do if I was you would be to keep your object scripts and level (etc.) scripts external just like you said but use MMF2 to as a rendering engine.

    If you have a load of lua tables (a = {}) say, one for all the tiles, one for all the objects, one for all the scripts that should be run when player collides with spike etc, you can use MMF2 to render only certain parts of the level at a time. This way you can have pretty much limitless level sizes at a very low memory/cpu cost.

    This method is extremely useful for adventure games and the like, but if you've got the usual "how the hell do I check for object collision 500 pixels offscreen when the objects don't exist?!" problem then my solution is again to store all variables in lua and check collisions that way. If you don't want to go the whole way like this then you can still test for object collisions with "virtual" tiles stored in lua for example.

    This kinda gets hard when you start to create rtf games

    As far as rendering goes, experiment with the min() and max() values to determine what the screen should display as these prove very handy in cutting down "is x > 0 & < 800" conditions.

    If you want more help on the whole external game stuff id be happy to help!!

    As far as the question you actually asked (!), no don't think so

  3. #3
    No Products Registered

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

    Re: Manual activation/deactivation of object instances

    i did originally have the idea of loading the level in pieces (mainly since it could be as large as a 120 x 120 grid of 16 x 16 tiles), but the problem of handling collisions of nonexistent objects was making me think twice about that

    i keep this in mind though, nover though of trying it this way

Similar Threads

  1. [Suggestion] Object Activation Tolerance
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 24th August 2012, 08:25 PM
  2. Group Activation/Deactivation question
    By Fanotherpg in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd April 2012, 02:28 AM
  3. Object order problem with multiple instances of the same object
    By tom79 in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 1st November 2011, 06:38 PM
  4. RC Final Bug - Q6A Deactivation problem
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 11th July 2011, 11:45 AM
  5. RC #3 Bug - Cannot Draw on Deactivation
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 15
    Last Post: 5th July 2011, 05:52 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
  •