User Tag List

Results 1 to 7 of 7

Thread: Custom levels in flash games.

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom levels in flash games.

    Is there any realistic way to load custom levels into a flash game, without slowing the application to a crawl?

    I was testing if it was possible to load custom levels into my game, I developed a way that allowed me to create levels on the fly in-game, with a simple scripting language I made, that reads the script using the string parser object.

    Well it worked as I expected, except that the time it took to create all the objects, backrounds, etc. for a large level was too long, for the engine to be of any practical use. Even creating backdrops, by pasting the same object into the frame, takes a lot of time when I try to run application in flash format.

    The project I had in mind was to make a game with a level editor, with the capability to submit and load levels from a server. But it seems to be an unrealistic project at the moment, unless I make the editor very limited.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Custom levels in flash games.

    Sounds like you need to optimize your code a lot better. I tried to make a level editor (but didn't finish because I got distracted with things) and it didn't seem to have any slowdown. Of course I didn't generate a GIANT level, but it really shouldn't be the loading backdrops and actives slowing you down.

    http://rickyrombo.co.nr/out/Climb%20Crush.html if you want to test.

    It really shouldn't need a custom scripting language either. I just used the INI to store the location of objects and loaded them. I didn't even need the string parser object (but I did need the String tokenizer, mind).

    If your game is really slow you're probably running a lot of fastloops or a really long one or something to do with fastloops. In my editor, I only have one fastloop.

    Hopefully this helps!

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Custom levels in flash games.

    But it is the creation of actives that slows the engine down, mind you I'm talking about creating several thousand objects with a fastloop at the start of the frame. Creating backdrops (by the thousands.) by using the same active object, causes simililar slowdown in the flash version.

    So I'm just trying to do too much, in too little time for the application to be able to handle it. There is not much optimatization that can be done on 3 events either.

    One way I could handle this is, if I used the array object to store the level, and create the objects when I need them. That is when the player comes close enough to the object spawn point. But it sounds like so much work.

    It is not the code that is slow, its just that the create object event isn't fast enough to be used this way I guess.

    I hope there is alternate way im just not aware of, that I can use.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Custom levels in flash games.

    You mean like knytt stories?

    I think it'd be better if you ran 100 fastloops at a time and after each one you let the frame redraw and udated a progress bar for the user to see that is was loading.
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Custom levels in flash games.

    Haven't tried Knytt Stories, so I don't know how it works in that game. I simply want to load a user created level into the game.

    Yeah running 100 fastloops and then letting the screen redraw is a possibility. Won't help with the long load time, but at least the player knows that the game hasn't crashed.

    So there isn't a way to generate a level, by using input from a external source that isn't as slow?

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Custom levels in flash games.

    There is! Your levels are just too big.
    Working as fast as I can on Fusion 3

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Custom levels in flash games.

    Well it is a random generated level made for the sole purpouse of testing the engines limit, of course it's too big. I take it as that theres no faster way of creating a load of objects at once.

    Well thanks anyway, I guess I just have to employ other tricks to ensure that the game runs smoothly at all times then, if I ever need levels that big that is.

Similar Threads

  1. Custom made highscore in flash?
    By Outcast in forum SWF/Flash Export Module Version 2.0
    Replies: 7
    Last Post: 18th May 2013, 02:09 PM
  2. Loading custom animation frames in flash runtime.
    By Sejez in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 2nd March 2012, 11:48 AM
  3. Are Mmf Flash games slower then native Flash?
    By Outcast in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 23rd October 2011, 02:31 PM
  4. custom hand pointer in flash
    By willow in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 6th April 2011, 11:23 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
  •