User Tag List

Results 1 to 9 of 9

Thread: Overlays > Text Blitters?

  1. #1
    Clicker Multimedia Fusion 2SWF Export Module

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

    Overlays > Text Blitters?

    I've run into some issues trying to get my level editor for my game to run at 50 FPS at runtime. Its not been easy thus far. I've been trying many different approaches, but speed seems to be the issue. So far I had mostly been using text blitters, only to realize that once in-game, there is simply too much slowdown with them. Even though the code is only 3 lines long for a text blitter engine, using the callback feature, it just can't seem to work. With less than 100 tiles being drawn, it seems fine, but I'm trying to create a 640x640 game with 32x32 tiles (400 tiles), which might have as many as 3 or 4 'layers' (not the built in ones) of tiles. So this is 1500+ draw steps being needed, *per frame*

    Now I've put together a simple app that does absolutely nothing but draw a 32x32 square 1500 times to a frame via text blitter, only to discover it runs at 25 FPS. Absolutely nothing else going on.

    Now my game will never need 1500 tiles at the same time, since the backdrop & foreground layers would just be doodads like trees, never heavily used, but I ran a test that came out to about 600+ on a normal screen, and while that might not seem bad, my game engine itself is also monstrously complicated, involving full-screen rotation, 360 gravity derivation, etc etc. Enough to knock that 600+ tiles down to 25 FPS at runtime in the actual game.

    So when I was running this, I came into a neat solution. I tried creating an engine that does the *exact same thing* inside a single overlay object; cut/pasting from other overlays that hold the tilesets. I kept pushing the bar up and up and up, and I didn't run into any slowdown whatsoever until my loop was at around 5000+ iterations per frame. And even then, it was only 40 FPS


    So I guess my question is, why is there all this hype about Text Blitter engines, at least what I've heard? It seems to me that the overlay object can blit images at least 10x as fast, even if its slightly more complicated. I'd have to say hats off the Cragmyre. But I guess unless anyone can point out a reason, an Overlay engine would be *much* better than a Text Blitter engine. Plus it lets me draw the entire frame in a single object, from back to front, without having to worry about built-in MMF2 order/layers

  2. #2
    No Products Registered

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

    Re: Overlays > Text Blitters?

    MMF just doesn't like a ton of triggered conditions being called per second, which is why i obsess over lua+ getting as many interface functions as possible (which are, for what i've seen, realtime in my tests)

    in my game, i can potentially have 200+ objects each needing to be updated 60 times a second, so i know how it hurts when you're forced to call a triggered event for them


  3. #3
    Clicker Multimedia Fusion 2SWF Export Module

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

    Re: Overlays > Text Blitters?

    well thats a problem with fast loops especially, and requires careful coding workarounds, but in this case if I ran the triggered conditions with an empty event that wouldn't reduce via compiler (i put a +1 counter event in there), the game ran at 50 FPS. So it wasn't just the overhead of MMF2 getting in the way, the slowdown was due to the objects copy/pasting, and the overlay seemed to do it *faster*

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Overlays > Text Blitters?

    If you need many textblitters, MMF gets really slow. I tried the same - I just "finished" a nice textblitter-powered dungeon generator, when I noticed that textblitter is not nearly as fast as I thought.. in fact, so slow I had to scrap the whole thing and go a different route to load my external tiles.
    Back then there wasn't a lot of options to choose from, so I went for a different program entirely

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

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

    Re: Overlays > Text Blitters?

    :X

    well I'll scrap mine and rewrite it for overlays :~) I guess text blitter isn't nearly as good as it sounded. But overlays certainly are! I mean heck, I already made a wolftenstein-esque engine in it.

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Overlays > Text Blitters?

    Sounds fair enough, I'm curious to see it when you have something to show.

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Jan 2007
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Overlays > Text Blitters?

    Yeah, the overlay object is great! I even use overlays as Text Blitter (you know, as fonts) :P I guess the question to why Text Blitter is slow and how it really works, is a question for the creator.

  8. #8
    Clicker Multimedia Fusion 2SWF Export Module

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

    Re: Overlays > Text Blitters?

    I don't suppose anyone would happen to know how I could possibly load .PNG files into an overlay object, if my game is in 256 colors? I want to use the Alpha Channel object as the go-between, but in 256 color mode it gets funky colors. And I can't go any higher in colors, because of the various effects used by my game engine (full screen rotation eats up too much processing power with 16 million colors).

    Is there any good method for doing this, or should I have it use the image manipulator to just brutally load a .PNG, save it as a temp .BMP, load it, and delete it?

  9. #9
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Overlays > Text Blitters?

    with last .net object you have the power to modify an overlay from you .net code. I made a very simple rotation of an overlay for example. You can probably load .png files very easily. But this will require the .net framework...

Similar Threads

  1. The difference between text in expression editor and text in strings?
    By RobertRule in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st July 2013, 10:13 PM
  2. Quick Question Regarding Text Objects VS Graphic Made With Text
    By Rolando in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th April 2013, 04:10 AM
  3. Creating floating damage text with the Text Blitting Object - How?
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th January 2013, 02:06 AM
  4. Text speech engine (how to scroll the text?)
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th November 2012, 05:44 PM
  5. BUG: String overlays EVERYTHING!
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 12th April 2012, 07:43 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
  •