YesNoOk
avatar

My MUGEN fullgame lags on Simul! (Read 1634 times)

Started by -Red-, August 14, 2009, 01:20:57 am
Share this topic:
My MUGEN fullgame lags on Simul!
#1  August 14, 2009, 01:20:57 am
  • avatar
  • ******
  • Complicated.cns
    • Argentina
ha! you think I'm in the wrong section? NO! U are wrong!

I wanna discuss something regarding how MUGEN handles the memory itself, first watch this picture please (And avoid any Poor Tengu faggy comment while you're at it):



The thing to notice here is not the hitspark that's a helper or the lifebars that are explods, it's the "cancel drive gauge" that's above the powerbar. that's an actual diagonal bar and each pixel of the width is an explod (So each slot is divided into 10 explods, 4 slots = 40 explods!). the way the bar is coded is so they all will be nsync so the animation for the transparency effects on all the parts of the gauge will be the same which is the reason why all those explods are triggered from the start of the round and only get visible or invisible when needed.

There's another way (Which I use on diagonal bars with no need to be nsync) and it's to release one single explod with the proper size when needed (So when u have half of that bar full the sprite with said size comes out, when u have another size or value for that bar then the current one gets removed and the new one with the new proper size gets triggered).

Now the real question and discussion topic: what's actually more memory consuming? 40 explods of 1 pixel of width or a single explod with the proper width when needed? (max of 40 pixels width)

I guess it's better to just release and eliminate when needed but that removes the ability to nsync a smooth animation. Still I would like to know your opinion.

btw some data: each character seems to release a total of 90 explods (Yeah, that's the price of handling ONTOP as needed) and from 5 to 7 helpers (Depending of the moment, most of the time is 5 but hitsparks are helpers aswell).

I only experimented lag on simul (as both characters of the team need to release most of the stuff but they dont release 90 explods each as the cancel drive gauge only gets released by the leader).
Re: My MUGEN fullgame lags on Simul!
#2  August 14, 2009, 01:33:31 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
HELPER OVERLOAD
Re: My MUGEN fullgame lags on Simul!
#3  August 14, 2009, 02:43:36 am
  • ******
  • [E]
    • Mexico
Disregard what jesuszilla said, you need to use more helpers, try making everysingle pixel a greyscale one pixel helper and then use palfx to draw the screen.
Re: My MUGEN fullgame lags on Simul!
#4  August 14, 2009, 02:52:30 am
  • ***
  • The Extraordinary Spiderman
    • Netherlands
Sloppy coding consumes more memory than helpers. Try to optimize your code as much as possible.
Last Edit: August 14, 2009, 05:56:19 am by Therio
Re: My MUGEN fullgame lags on Simul!
#5  August 14, 2009, 02:55:15 am
  • ******
  • [E]
    • Mexico
that's rude, I dare you to not avoid deleting your comment.
Re: My MUGEN fullgame lags on Simul!
#6  August 14, 2009, 03:28:43 am
  • ***
  • The Extraordinary Spiderman
    • Netherlands
It's true though. Sloppily coded characters consume a LOT more memory than ones with many helpers.
Last Edit: August 14, 2009, 04:18:37 am by Therio
Re: My MUGEN fullgame lags on Simul!
#7  August 14, 2009, 05:17:18 am
  • ***
    • kratos-kreations.webs.com/
That was extremely rude.
Re: My MUGEN fullgame lags on Simul!
#8  August 14, 2009, 05:55:55 am
  • ***
  • The Extraordinary Spiderman
    • Netherlands
Oh fine, edited
Re: My MUGEN fullgame lags on Simul!
#9  August 14, 2009, 09:19:13 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Why does it have to be 40 explods? I mean, mugens default explod limit is something like 128. 40 is quite a lot of it. Also, i trust p3/4 don't make their own versions of those 40 explods.

1 explod scaling would be a good choice. Failing that, do the crappy method of deploying a different explod per value. I can't see a decent reason to need 40 for that effect. If you want to gradiate your transparency (christ) i'd set up the full sized sprite with a darker colour moving across the full thing. That way the A trans will have a different effect across the bar.

And yes, optimised coding is going to help here as well. I imagine fightfx.sff and fightfx.air would be good idea's as well, that way it's not loading common data sets from both characters and wiping a little more memory.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: My MUGEN fullgame lags on Simul!
#10  August 14, 2009, 09:33:07 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
For the 40 explods thing, create 6 explods, each one having this size : 1, 2, 4, 8, 16 and 32 (), and display them at the right position depending on the length you need.
Length = 3 = 1+2
Length = 15 = 8 + 4 + 2 + 1
Length = 28 = 16 + 8 + 4
etc.
Re: My MUGEN fullgame lags on Simul!
#11  August 14, 2009, 09:55:53 am
  • ******
    • network.mugenguild.com/pots/


Remember your design priorities kids!

Now the real question and discussion topic: what's actually more memory consuming? 40 explods of 1 pixel of width or a single explod with the proper width when needed? (max of 40 pixels width)
Even though you can assume scaling a sprite takes more processing than displaying it as is, I'm sure it doesn't take 40 times more processing. :S

nsync nsync nsync
Hehe.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: My MUGEN fullgame lags on Simul!
#12  August 16, 2009, 03:02:09 am
  • avatar
  • ******
  • Complicated.cns
    • Argentina
I'm sorry I actually posted a previous idea of how the bars where coded like than how they were really coded:

the ways was this:

the diagonal bars were composed by 10 explods per slot, each slot displayed the realtime percentage so when u had 10% of the bar only the image according to that value was displayed and the rest were scalled to 0,0.

so when u had a full slot the other explods were scalled to 0,0 yet still are there, they weren't actually 10 explods pixel by pixel but just an explod per certain value which already had the proper size for it (So a 10% var had 1 pixed size but the 90% bar had 9 pixel size), also I misexplained the real size as it's actually 4 pixels of width when 10% or less (as even by having 1 pixel horizontally still needs 4 pixels of width due to the vertical size).

Also I think some of you people misunderstood why the hell everything get's released at the same time and only get scalled to proper visible size when they need to, it's explained in my XBOX-HUEG fullgame coding guide posted here, it's because of how ontop = 1 works like, the real priority handling and whatnot as stages tend to put stuff above explods even when they had ontop = 1... but later...

... I remembered that this is getting developed for a FULLGAME hence I have total control on that crap and so... I wasted a whole day throwing away that stupidly overloading technique and ended up just releasing the explods when needed. And now each character only has like 4 to 10 explods at a time instead of like 90, and also some other tweaks I'm gonna mention while I answer.

HELPER OVERLOAD

LOL why didn't u even mentioned the explods are beyond me  :P

Why does it have to be 40 explods? I mean, mugens default explod limit is something like 128. 40 is quite a lot of it. Also, i trust p3/4 don't make their own versions of those 40 explods.

explod limit is like 1000 on my fullgame and also 40 explods thing was explained on this post. EACH character released them because of the way the lifebars works, they were coded for tag team purposes but at the time of this post only the lifegauges were coded per char and the rest were released only by the leader.

Now with the tweaks I did only the leader releases everything on the lifebars, the partner releases nothing at all in this case.


1 explod scaling would be a good choice. Failing that, do the crappy method of deploying a different explod per value. I can't see a decent reason to need 40 for that effect. If you want to gradiate your transparency (christ) i'd set up the full sized sprite with a darker colour moving across the full thing. That way the A trans will have a different effect across the bar.

Ha! U just said the method I actually used! cant believe I mistaken both ways, the method of the trans effect you mentioned was one of my ideas but that would mean the entire slot will have htat effect rather than just the filled slots, I just gave up on that anyway and now the trans resets per value.


And yes, optimised coding is going to help here as well. I imagine fightfx.sff and fightfx.air would be good idea's as well, that way it's not loading common data sets from both characters and wiping a little more memory.

I use fight.sff and fightfx.air already, since the beginning. Coding was optimized already but now it's even more thanks to the method mentioned.

Even though you can assume scaling a sprite takes more processing than displaying it as is, I'm sure it doesn't take 40 times more processing. :S

no, the idea was to either display 40 little graphics one next to other when needed or display 1 sprite with the proper width and hide the rest with scale 0,0. But I killed my thread already by not using the ontop = 1 technique already :P

ok people, retarded coding time is over.
Re: My MUGEN fullgame lags on Simul!
#13  August 17, 2009, 04:34:48 pm
  • ******
  • [E]
    • Mexico
explod limit is like 1000 on my fullgame and also 40 explods thing was explained on this post. EACH character released them because of the way the lifebars works, they were coded for tag team purposes but at the time of this post only the lifegauges were coded per char and the rest were released only by the leader.

unless you hack winmugen.exe it ahs hardcoded limits besides whatever the mugen.cfg says.
Re: My MUGEN fullgame lags on Simul!
#14  August 19, 2009, 01:38:32 am
  • avatar
  • ******
  • Complicated.cns
    • Argentina
what's the real limit for winmugen? I didnt know about a hardcoded limit.