SharkerrBlue 7 Posted November 17, 2015 (edited) SB - Simple Title Screen This is a simple title screen. Too simple to make. Also, my very first script. Screenshots: Get it at here! Script: [updated] #------------------------------------------------------------------------------# # Simple Animated Title Screen - SB # # Author : SharkerrBlue(SB) # #------------------------------------------------------------------------------# # -Free for any use because this script is too simple :3 # #------------------------------------------------------------------------------# # -P/S Credit goes to: SharkerrBlue(SB) No need to pay just credit me! # #------------------------------------------------------------------------------# class Scene_Title < Scene_Base #------------------------------------------------------------------------------# def start super SceneManager.clear #Don't change the order please! # Graphics.freeze create_background create_foreground font create_command_window create_fog play_title_music end #------------------------------------------------------------------------------# module SB_Menu NUMBER_OF_PARTICLES = 20 end #------------------------------------------------------------------------------# def create_background @sprite1 = Plane.new @sprite1.bitmap = Cache.system("background") end #------------------------------------------------------------------------------# def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler(:new_game, method(:command_new_game)) @command_window.set_handler(:continue, method(:command_continue)) @command_window.set_handler(:shutdown, method(:command_shutdown)) @command_window.opacity=0 @command_window.x=10 @command_window.y=200 end #------------------------------------------------------------------------------# def create_foreground @foreground_sprite = Sprite.new @foreground_sprite.bitmap = Cache.system("Title") @foreground_sprite.y=100 end #------------------------------------------------------------------------------# def create_fog @fog = Plane.new @fog.bitmap = Cache.system("fog") end #------------------------------------------------------------------------------# def update super @fog.ox += 2 @sprite1.ox += 1 end #------------------------------------------------------------------------------# def font Font.default_name = ["Letter Gothic Std"] # The font you want. Font.default_size = 22 # The Font's Size you want. end #------------------------------------------------------------------------------# def dispose_background @sprite1.bitmap.dispose @sprite1.dispose end #------------------------------------------------------------------------------# def dispose_fog @fog.bitmap.dispose @fog.dispose end end Pictures(Graphics/System): You need: *background *Title *fog e.g: Edited November 20, 2015 by SharkerrBlue 1 Share this post Link to post Share on other sites
Zattersmox 4 Posted November 18, 2015 It's simple, and still fairly visually appealing! I kinda think the images move to quickly but they're easy enough to slow down. Wicked. Share this post Link to post Share on other sites
Sixth 113 Posted November 18, 2015 You created a memory leak by not disposing the @fog plane in your script. You need to dispose any new sprites/planes created when the scene changes or else you get a memory leak which will slow down your game or even crash your game in specific cases. I see the title of the project is "Learning Scripting", so I thought this is a good thing to learn, since sprites are used everywhere. In case you need a good debugger tool for finding any non-disposed sprites/planes, you should check out this script: http://forums.rpgmakerweb.com/index.php?/topic/17400-hidden-gameexe-crash-debugger-graphical-object-global-reference-ace/ Nice little script otherwise. Share this post Link to post Share on other sites
SharkerrBlue 7 Posted November 19, 2015 (edited) You created a memory leak by not disposing the @fog plane in your script. You need to dispose any new sprites/planes created when the scene changes or else you get a memory leak which will slow down your game or even crash your game in specific cases. I see the title of the project is "Learning Scripting", so I thought this is a good thing to learn, since sprites are used everywhere. In case you need a good debugger tool for finding any non-disposed sprites/planes, you should check out this script: http://forums.rpgmakerweb.com/index.php?/topic/17400-hidden-gameexe-crash-debugger-graphical-object-global-reference-ace/ Nice little script otherwise. What is memory leak? And yeah I just start learning scripting. And now I understand, I just need to dispose the fog. Anyway thanks. Edited November 19, 2015 by SharkerrBlue Share this post Link to post Share on other sites
Sixth 113 Posted November 19, 2015 Memory leak is basically anything which is stuck in your memory without a way to get rid of it, because it can not be reached to be disposed anymore. This means your memory will get filled with not used garbage sooner or later, which leads to slowdowns if left untreated. And yeah, you did get it, the fog needs to be disposed. The code you wrote for it is good, but the method it's in is never called, the code in the method is never executed, so the memory leak is still there. If you run the method you created from the already existing 'dispose_background' method (just above the new method in your script), it will be executed, and the memory leak will be fixed. Share this post Link to post Share on other sites
+ TBWCS 953 Posted November 19, 2015 I also recommend that you learn a bit about Arrays. When you do know how they work, you can actually remove that command window that you use and represent images based on the index of the command window, slapped on the array of images you work at Share this post Link to post Share on other sites
SharkerrBlue 7 Posted November 19, 2015 Thanks everyone... (gone speechless ) Share this post Link to post Share on other sites
Ariel Schnee 7 Posted November 27, 2015 You forgot to provide the "Title" pic. Share this post Link to post Share on other sites
Rikifive 3,411 Posted November 27, 2015 You forgot to provide the "Title" pic. He provided that picture - it is the second one at the end of his post. Anyway it is just an example picture, you can make one by yourself. Also on a side note: OP will be not accessible until November 12, 2016. Share this post Link to post Share on other sites