User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 30

Thread: Optimization Tips?

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    Madison, WI, USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Optimization Tips?

    I'm nearly done with my Star Control/Space Wars homage... I got the 3-level zoom working with my 3 different-sized sprites for ships and dynamically changing between those to simulate zoom. The problem I have, though, is when the ships are that large on the screen and anything else is going on overlapping/overlaying anything, it slows to a crawl.

    I'm running at 800x600 with a 3200x2400 virtual size. The ships are about 250x128 when at the largest. What I'd like to know, is, what's causing the slowdown?

    The "Add" ink effect on the projectiles and explosions? Translucency? Runtime rotation of my ships? Fine collision detection? Or do all of the above just get really bad when dealing with very large sprites?

    I'm not using any custom plugins or doing anything fancy with viewports or lenses or other rendering effects. Just basic sprites.

    Any tips?

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Madison, WI, USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Optimization Tips?

    I'm nearly done with my Star Control/Space Wars homage... I got the 3-level zoom working with my 3 different-sized sprites for ships and dynamically changing between those to simulate zoom. The problem I have, though, is when the ships are that large on the screen and anything else is going on overlapping/overlaying anything, it slows to a crawl.

    I'm running at 800x600 with a 3200x2400 virtual size. The ships are about 250x128 when at the largest. What I'd like to know, is, what's causing the slowdown?

    The "Add" ink effect on the projectiles and explosions? Translucency? Runtime rotation of my ships? Fine collision detection? Or do all of the above just get really bad when dealing with very large sprites?

    I'm not using any custom plugins or doing anything fancy with viewports or lenses or other rendering effects. Just basic sprites.

    Any tips?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    koobare's Avatar
    Join Date
    Jun 2006
    Location
    Poland
    Posts
    393
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Optimization Tips?

    I guess that all of the features mentioned above can slow it down a bit... But I think that the most troublesome thing could be Your zoom, Michael.

    I'm no programmer (playing with graphics all my life, I never had the time to play with code <img src="/center/images/graemlins/smile.gif" alt="" />), nor do I know too much about MMF2 yet, but I guess that there's not a big difference between displaying a 80x80 image when compared to a 200x150 one... But MMF2 seems to choke a bit if You resize couple of those images fluently on runtime. At least: I think that it can choke. <img src="/center/images/graemlins/smile.gif" alt="" />

    I may be wrong (and - most probably - am <img src="/center/images/graemlins/smile.gif" alt="" />), but I'd suggest this: try to create three versions of Your app, one without the zoom, the second one without any ink effects, and the third one with a bit smaller sprites (since You've got the app ready, stripping it to three different versions shouldn't be that much of a problem) - and just use MMF2's debugger to see how they're doing. I guess that this isn't too much of an answer to Your questions, but I'd try that if I were You. <img src="/center/images/graemlins/smile.gif" alt="" />

    P.S. Will You post any screens from Your project? <img src="/center/images/graemlins/smile.gif" alt="" /> I was a huge fan of Star Control 3. Never saw the earlier games from the series, though. <img src="/center/images/graemlins/wink.gif" alt="" /> Not easy to find.

    P.S.2. Since we're at it, and I've just glimpsed over Your signature... I liked Hexen 2 a lot too (and was even playing it at the same time as Star Control 3. Ahh, golden years. <img src="/center/images/graemlins/smile.gif" alt="" />). Especially those spiders. And the level where You had to catapult Yourself over the wall. <img src="/center/images/graemlins/laugh.gif" alt="" />

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    koobare's Avatar
    Join Date
    Jun 2006
    Location
    Poland
    Posts
    393
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Optimization Tips?

    I guess that all of the features mentioned above can slow it down a bit... But I think that the most troublesome thing could be Your zoom, Michael.

    I'm no programmer (playing with graphics all my life, I never had the time to play with code <img src="/center/images/graemlins/smile.gif" alt="" />), nor do I know too much about MMF2 yet, but I guess that there's not a big difference between displaying a 80x80 image when compared to a 200x150 one... But MMF2 seems to choke a bit if You resize couple of those images fluently on runtime. At least: I think that it can choke. <img src="/center/images/graemlins/smile.gif" alt="" />

    I may be wrong (and - most probably - am <img src="/center/images/graemlins/smile.gif" alt="" />), but I'd suggest this: try to create three versions of Your app, one without the zoom, the second one without any ink effects, and the third one with a bit smaller sprites (since You've got the app ready, stripping it to three different versions shouldn't be that much of a problem) - and just use MMF2's debugger to see how they're doing. I guess that this isn't too much of an answer to Your questions, but I'd try that if I were You. <img src="/center/images/graemlins/smile.gif" alt="" />

    P.S. Will You post any screens from Your project? <img src="/center/images/graemlins/smile.gif" alt="" /> I was a huge fan of Star Control 3. Never saw the earlier games from the series, though. <img src="/center/images/graemlins/wink.gif" alt="" /> Not easy to find.

    P.S.2. Since we're at it, and I've just glimpsed over Your signature... I liked Hexen 2 a lot too (and was even playing it at the same time as Star Control 3. Ahh, golden years. <img src="/center/images/graemlins/smile.gif" alt="" />). Especially those spiders. And the level where You had to catapult Yourself over the wall. <img src="/center/images/graemlins/laugh.gif" alt="" />

  5. #5
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Optimization Tips?

    []The "Add" ink effect on the projectiles and explosions? Translucency? Runtime rotation of my ships? Fine collision detection? Or do all of the above just get really bad when dealing with very large sprites?[/]

    Add/Subtract/Fade ink effects are slow if you have selected the DirectX+VRAM option in the display mode property of the application. If it's selected, unselected it. If it's not selected, then maybe the problem comes from the rotation of your ships (if they are rotating continuously, as the new image is calculated only when the angle changes). Fine collision detection is quite fast.

    Yves.

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Optimization Tips?

    []The "Add" ink effect on the projectiles and explosions? Translucency? Runtime rotation of my ships? Fine collision detection? Or do all of the above just get really bad when dealing with very large sprites?[/]

    Add/Subtract/Fade ink effects are slow if you have selected the DirectX+VRAM option in the display mode property of the application. If it's selected, unselected it. If it's not selected, then maybe the problem comes from the rotation of your ships (if they are rotating continuously, as the new image is calculated only when the angle changes). Fine collision detection is quite fast.

    Yves.

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Location
    Madison, WI, USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Optimization Tips?

    [][]The "Add" ink effect on the projectiles and explosions? Translucency? Runtime rotation of my ships? Fine collision detection? Or do all of the above just get really bad when dealing with very large sprites?[/]

    Add/Subtract/Fade ink effects are slow if you have selected the DirectX+VRAM option in the display mode property of the application. If it's selected, unselected it. If it's not selected, then maybe the problem comes from the rotation of your ships (if they are rotating continuously, as the new image is calculated only when the angle changes). Fine collision detection is quite fast.

    Yves. [/]

    Interesting, I'll try that, then!

    I think maybe I'll try actually generating the 32 angles of my ships rather than doing the runtime rotation. It's easy to try, at least (though I don't get slowdown when the ships are just on-screen rotating, I don't think - it's when all the projectiles start flying and overlaying stuff).

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Location
    Madison, WI, USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Optimization Tips?

    [][]The "Add" ink effect on the projectiles and explosions? Translucency? Runtime rotation of my ships? Fine collision detection? Or do all of the above just get really bad when dealing with very large sprites?[/]

    Add/Subtract/Fade ink effects are slow if you have selected the DirectX+VRAM option in the display mode property of the application. If it's selected, unselected it. If it's not selected, then maybe the problem comes from the rotation of your ships (if they are rotating continuously, as the new image is calculated only when the angle changes). Fine collision detection is quite fast.

    Yves. [/]

    Interesting, I'll try that, then!

    I think maybe I'll try actually generating the 32 angles of my ships rather than doing the runtime rotation. It's easy to try, at least (though I don't get slowdown when the ships are just on-screen rotating, I don't think - it's when all the projectiles start flying and overlaying stuff).

  9. #9
    No Products Registered

    Join Date
    Jul 2006
    Location
    Madison, WI, USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Optimization Tips?

    []... But MMF2 seems to choke a bit if You resize couple of those images fluently on runtime. At least: I think that it can choke. <img src="/center/images/graemlins/smile.gif" alt="" />

    P.S. Will You post any screens from Your project? <img src="/center/images/graemlins/smile.gif" alt="" /> I was a huge fan of Star Control 3. Never saw the earlier games from the series, though. <img src="/center/images/graemlins/wink.gif" alt="" /> Not easy to find.

    P.S.2. ... I liked Hexen 2 a lot too... And the level where You had to catapult Yourself over the wall. <img src="/center/images/graemlins/laugh.gif" alt="" /> [/]

    Yeah, I'll try a bunch of stuff (not using runtime rotation, not using add, the thing Yves mentioned above about display modes). And the ships, actually, are the only thing not being resized (scaled) runtime - I have 3 different sprites for them - one for each zoom level. Everything else, though, is being dynamically scaled. Maybe that's the problem. It'll be a pain to make graphics for every zoom level for everything, but maybe that would fix it.

    Here's a couple quick non-combat shots:
    Zoomed all the way out:
    http://www2.ravensoft.com/users/mgum...k_zoom_far.bmp

    Zoomed at middle level:
    http://www2.ravensoft.com/users/mgum...oom_medium.bmp

    Zoomed all the way in:
    http://www2.ravensoft.com/users/mgum...zoom_close.bmp

    EDIT: BTW, as is obvious from the above shots, it isn't a Star Control remake, it's a Star Control-like game with Star Trek ships (movie era). I would have remade Star Control, but there's a project called Time Warp that's already done a great job of that... <img src="/center/images/graemlins/smile.gif" alt="" />


    I actually didn't care for Star Control 3 much, I thought Star Control 1 &amp; 2 were classics. I just couldn't get into SC3, they changed too much... <img src="/center/images/graemlins/frown.gif" alt="" />

    Hexen 2 was my first game at Raven, and it was a lot of fun to work on. The catapult was actually something that just came out of a late-night work session where we just thought it would be cool to have a catapult (plus we wanted it for the Siege MP mode), so we did it... <img src="/center/images/graemlins/smile.gif" alt="" />

  10. #10
    No Products Registered

    Join Date
    Jul 2006
    Location
    Madison, WI, USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Optimization Tips?

    []... But MMF2 seems to choke a bit if You resize couple of those images fluently on runtime. At least: I think that it can choke. <img src="/center/images/graemlins/smile.gif" alt="" />

    P.S. Will You post any screens from Your project? <img src="/center/images/graemlins/smile.gif" alt="" /> I was a huge fan of Star Control 3. Never saw the earlier games from the series, though. <img src="/center/images/graemlins/wink.gif" alt="" /> Not easy to find.

    P.S.2. ... I liked Hexen 2 a lot too... And the level where You had to catapult Yourself over the wall. <img src="/center/images/graemlins/laugh.gif" alt="" /> [/]

    Yeah, I'll try a bunch of stuff (not using runtime rotation, not using add, the thing Yves mentioned above about display modes). And the ships, actually, are the only thing not being resized (scaled) runtime - I have 3 different sprites for them - one for each zoom level. Everything else, though, is being dynamically scaled. Maybe that's the problem. It'll be a pain to make graphics for every zoom level for everything, but maybe that would fix it.

    Here's a couple quick non-combat shots:
    Zoomed all the way out:
    http://www2.ravensoft.com/users/mgum...k_zoom_far.bmp

    Zoomed at middle level:
    http://www2.ravensoft.com/users/mgum...oom_medium.bmp

    Zoomed all the way in:
    http://www2.ravensoft.com/users/mgum...zoom_close.bmp

    EDIT: BTW, as is obvious from the above shots, it isn't a Star Control remake, it's a Star Control-like game with Star Trek ships (movie era). I would have remade Star Control, but there's a project called Time Warp that's already done a great job of that... <img src="/center/images/graemlins/smile.gif" alt="" />


    I actually didn't care for Star Control 3 much, I thought Star Control 1 &amp; 2 were classics. I just couldn't get into SC3, they changed too much... <img src="/center/images/graemlins/frown.gif" alt="" />

    Hexen 2 was my first game at Raven, and it was a lot of fun to work on. The catapult was actually something that just came out of a late-night work session where we just thought it would be cool to have a catapult (plus we wanted it for the Siege MP mode), so we did it... <img src="/center/images/graemlins/smile.gif" alt="" />

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. MMF2 Optimization Tips Tutorial Around?
    By Kid_Roleplay in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th September 2012, 08:35 PM
  2. Optimization Tips for Large Numbers of Objects
    By redpandagames in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 20th May 2012, 09:48 AM
  3. Optimization
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 9th June 2009, 11:17 AM
  4. Code Optimization
    By Kalnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th March 2008, 01:10 AM

Posting Permissions

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