Parthanandix 3 Posted March 18, 2013 Introduction This is a collaboration from Moghunter and Me (Parthanandix). This creates a splash screen that has particles on it. Script #=============================================================================# # Parthanandix's Particle Splash # #-----------------------------------------------------------------------------# # Instructions: Place this below Materials but above Main. If using with # # Moghunter's Animated Title A place this below it. Flows very well with # # his title screen. # # # # Credits: Moghunter for the particles movement # #-----------------------------------------------------------------------------# # Usage Terms: You may use this both in commercial and non-commercial as long # # as credit is given. # # # # This is also stated below his website: # # # # License to use # # 1 - You're free to use all Atelier-Rgss scripts in commercial or # # non-commercial projects. # # 2 - You're free to edit and adapt my scripts # #-----------------------------------------------------------------------------# module Particle_Splash #----------------# # Splash Picture # #----------------# Splash_Pic = "Logo" # Place inside "Graphics/Titles2/" Splash_X = 0 # X position of splash Splash_Y = 0 # Y position of splash Skip_Button = :C # Button used to skip the splash Dur = 180 # Duration of the splash Fade_Dur = 60 # Fade duration of the splash #-------------------# # Particle Settings # MOGHUNTER SETTINGS #-------------------# Use_Particles = true # Really self explanatory.... Particle = "Particle" # Place inside "Graphics/Titles2/" Particle_Rand_Color = true # Set to true if you want random hues/colors Particle_Move_Range_X = 3 # X and Y range the particles are allowed to move Particle_Move_Range_Y = 3 # If you want the particles to turn set this to Particle_Angle_Range = 3 # something other than 0. # Makes it look like they're dancing around end #=============================================================================# # NO EDIT PASTA HERE (hehe pasta...) # #=============================================================================# module SceneManager class << self alias first_scene_class_new first_scene_class end def self.first_scene_class if $BTEST Scene_Battle else Scene_Particle_Splash end end end class Scene_Particle_Splash < Scene_Base def initialize make_splash_pic make_particles @p_splash_time = 0 end def make_splash_pic @p_splash = Sprite.new @p_splash.bitmap = Cache.title2(Particle_Splash::Splash_Pic) @p_splash.opacity = 0 @p_splash.x = Particle_Splash::Splash_X @p_splash.y = Particle_Splash::Splash_Y @p_splash.z = 201 end def make_particles return unless Particle_Splash::Use_Particles @viewport_particle = Viewport.new(-32, -32, 576, 448) @viewport_particle.z = 202 @particle_bitmap =[] for i in 0...20 @particle_bitmap.push(Particles.new(@viewport_particle)) end end def terminate super dispose_particles @p_splash.bitmap.dispose @p_splash.dispose end def dispose_particles return unless Particle_Splash::Use_Particles if @particle_bitmap != nil for i in @particle_bitmap i.dispose end @particle_bitmap = nil end @viewport_particle.dispose end def update super update_splash update_particles end def update_splash @p_splash.opacity += 1 proceed_2_title if Input.press?(Particle_Splash::Skip_Button) if @p_splash.opacity >= 255 @p_splash_time += 1 proceed_2_title if @p_splash_time >= Particle_Splash::Dur end end def update_particles return unless Particle_Splash::Particle if @particle_bitmap != nil for i in @particle_bitmap i.update end end end def proceed_2_title Graphics.fadeout(Particle_Splash::Fade_Dur) SceneManager.goto(Scene_Title) end end # MOGHUNTER's Coding class Particles < Sprite def initialize(viewport = nil) super(viewport) self.bitmap = Cache.title2(Particle_Splash::Particle) self.tone.set(rand(255),rand(255), rand(255), 255) if Particle_Splash::Particle_Rand_Color reset end def reset self.x = rand(576)- 32 self.y = rand(448 + self.bitmap.height) self.opacity = 0 self.angle = rand(360) @speed_x = [[rand(Particle_Splash::Particle_Move_Range_X), Particle_Splash::Particle_Move_Range_X].min, 1].max @speed_x = 0 if Particle_Splash::Particle_Move_Range_X < 1 @speed_y = [[rand(Particle_Splash::Particle_Move_Range_Y), Particle_Splash::Particle_Move_Range_Y].min, 1].max @speed_y = 0 if Particle_Splash::Particle_Move_Range_Y < 1 @speed_a = [[rand(Particle_Splash::Particle_Angle_Range), Particle_Splash::Particle_Angle_Range].min, 0].max end def dispose super self.bitmap.dispose end def update super self.x += @speed_x self.y -= @speed_y self.angle += @speed_a self.opacity += 5 reset if can_reset? end def can_reset? return true if (self.x < -64 or self.x > 600) return true if (self.y < -64 or self.y > 500) return false end end Credits Moghunter Parthanandix Screenshot Share this post Link to post Share on other sites
Fafnir 34 Posted March 18, 2013 That's some good work, runs nicely and easy to use. Share this post Link to post Share on other sites
Pikalyze 4 Posted March 18, 2013 I have got to try this. It will go great with that Madoka title screen Moghunter made. Share this post Link to post Share on other sites
Parthanandix 3 Posted March 18, 2013 (edited) Thanks it ran really smoothly with his titlescreen. It just sorta gave it a better feel with some sort of animation to it. -Edit- Maybe I should add like a slide effect to the splash idk need some ideas. Edited March 18, 2013 by Parthanandix Share this post Link to post Share on other sites