Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,065
Reaction score
686
First Language
English
Primarily Uses
RMVXA
This script was found in a zip file that I got from somewhere (I don't remember and can't find again).

It needs these files
http://www.mediafire.com/file/irvxogj7512gv1i/Files.zip

During test play, with the console open. There are several entries regarding the skull image and title commands.
console.png

Is there anyone with enough ruby knowledge to see what is wrong and maybe fix it?

Thanks

Oops, forgot this image with the zip file.
Particles.png
 
Last edited:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,965
Reaction score
3,072
First Language
French
Primarily Uses
RMMV
You may ask to the author MogHunter (int the script header)
who can adress this issue.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,065
Reaction score
686
First Language
English
Primarily Uses
RMVXA
I should have tried my tests first before posting this.

I think it's good now. I played around with different options (I look at whats in the script and try different things)
I added in 4 extra lines and now the messages do not show up.

Title commands dispose section
@com.each {|sprite| sprite.dispose }
@com.each {|sprite| sprite.bitmap.dispose }

Title Skulls dispose section
@skulls.each {|sprite| sprite.dispose }
@skulls.each {|sprite| sprite.bitmap.dispose }

SO now it looks like this
Code:
  #--------------------------------------------------------------------------
  # ● Dispose Commands
  #--------------------------------------------------------------------------               
  def dispose_commands
      @com.each {|sprite| sprite.dispose_sprites }
      @com.each {|sprite| sprite.dispose }
      @com.each {|sprite| sprite.bitmap.dispose }
  end 
 
  #--------------------------------------------------------------------------
  # ● Dispose Skulls
  #--------------------------------------------------------------------------               
  def dispose_skulls
      @skulls.each {|sprite| sprite.dispose_sprites }
      @skulls.each {|sprite| sprite.dispose }
      @skulls.each {|sprite| sprite.bitmap.dispose }
  end

This is now solved for me.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,965
Reaction score
3,072
First Language
French
Primarily Uses
RMMV
No this will provoke memory leak the script wasnt originally having memory leak its just print what its doing
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,065
Reaction score
686
First Language
English
Primarily Uses
RMVXA
Thanks for telling me.
I tested some more and it works with only the one line.
Code:
@com.each {|sprite| sprite.dispose }
@skulls.each {|sprite| sprite.dispose }
Does that make it better?
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,965
Reaction score
3,072
First Language
French
Primarily Uses
RMMV
You dont need to modify the script
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,196
Reaction score
848
First Language
Hungarian
Primarily Uses
RMVXA
No this will provoke memory leak the script wasnt originally having memory leak its just print what its doing
The script got memory leaks, at least the one posted in the opening post surely does.
None of the Title_Commands and Title_Skull objects were disposed properly, which equals memory leaks.
Only their bitmaps are disposed, the objects themselves are not (and since their superclass is Sprite, they need to be disposed).
This wouldn't be the first time I find memory leaks in Moghunter's scripts, so it's really nothing unusual or unbelievable.

This should be the most efficient code to dispose everything properly:
Code:
  def dispose_commands
    @com.each {|sprite| sprite.bitmap.dispose; sprite.dispose }
  end
 
  def dispose_skulls
    @skulls.each {|sprite| sprite.bitmap.dispose; sprite.dispose }
  end
One iteration is enough, everything can be done inside that. And just to make sure everything goes right, always dispose the bitmap first, the object after that.

For the record, Moghunter's dispose_sprites method got nothing to do with disposing the actual Sprite object, it only disposes the sprite's bitmap. Basically, using sprite.bitmap.dispose is the same as using sprite.dispose_sprites.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,065
Reaction score
686
First Language
English
Primarily Uses
RMVXA
@Sixth Thank you. Nothing shows up in the console, so I can only assume it's all good.
 

Latest Threads

Latest Posts

Latest Profile Posts

Man, nobody has created an MZ state animation plugin outside of VisuStella. That breaks my heart.
Finnuval wrote on Alador's profile.
Cute new avatar you got there ;)
Alberest so far, got a lot done but still ALOT left to do.
Wish I had a better means of taking screenshots...
Map is 148x98

concept: zombie slayer fest.

Lag because of outdated hardware.

Lots todo:
-Terrax lightning should have another step for the flashlight, between up down left right.
-Also Online mv from Nelderson should emit the flashlight from the other player.
-Animation needed for killing the zombie...
Before adding it to #crypchania.
Working on a case. Get all the evidence to prosecute some bad guys. :kaojoy:
But, the game development schedule delayed. :kaoswt2:
The moral of the story: No good deed goes unpunished... I guess...
Except that, nothing to see here. :kaoswt2:

Forum statistics

Threads
111,460
Messages
1,061,268
Members
144,833
Latest member
Keitaro122
Top