Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Panoramic Title Screen

Status
Not open for further replies.
Panoramic Title Screen
Version 1.0.2 (I guess)

Introduction

This is a quick and simple script add-on which adds a neat effect to the title screen of your game.

I know it's small, but it works.

I made it for my project and figured I should share it, someone might find it useful. :thumb:

Screenshots

Not really applicable... It's an animation, so a screenie would show but one frame. ':|

Script

Code:
#----------------------------------------------
# Panoramic Title Screen
#------ v 1.0.2
# Script by Wyatt (a.k.a Dan Badger)
# Do not remove this header!
#----------------------------------------------
class Scene_Title
  alias wy_title_1_main update
  def update
    unless @sprite.x < -640
      loop_sprite
    else
      @sprite.x = 0
    end
    wy_title_1_main
  end
  def loop_sprite
    loop do
      @sprite.x -= 2 # Change this figure to a WHOLE NUMBER to change the speed it scrolls
      break if $scene != Scene_Title
    end
  end
end

Instructions

1. Place this in a new script that is below the defaults, but above main
2. Change the value where it is commented, if you want to change the speed
3. Add the following image in the Titles folder - and make it your title screen

http://afarrpg.freepgs.com/mov1.PNG[/IMG]

If you wish to add another image, say... a logo for your game, static, add this script below it:

Code:
class Scene_Title
  alias wy_edit_1_main main
  def main
    @sprite2 = Sprite.new
    @sprite2.bitmap = RPG::Cache.picture('YOUR_IMAGE_NAME_HERE') # Keep the ' '
    @sprite2.z = 9998
    wy_edit_1_main
    @sprite2.dispose
  end
  alias wy_edit_1_update
  def update
    @sprite2.update
    wy_edit_1_update
  end
end

Edit the "YOUR_IMAGE_NAME_HERE" with your file name, keeping the ' ' around it.
Compatibility

> Will probably work with most Title edits, so long as they are based on the origional system
> Should be SDK compatible as I aliased

To make this work with the Three Image Title Screen:

To make it work with the 3 image TS script, (tried and tested), do this:

Use this script instead of my origional one,

Code:
class Scene_Title
  alias wy_title_1_update update
  alias wy_title_1_main main
  def main
    @sp = Sprite.new
    @sp.bitmap = RPG::Cache.title('mov1')
    @sp.z = 1
    wy_title_1_main
    @sp.dispose
  end
  def update
    unless @sp.x < -640
      loop_sprite
    else
      @sp.x = 0
    end
    wy_title_1_update
  end
  def loop_sprite
    loop do
      @sp.x -= 2
      break if $scene != Scene_Title
    end
  end
end

Then go to line 38 of the TITS (er... Three Image Title Screen) and change that line to:

Code:
    @back_sprite.z = 5000

Credits and Thanks

Credit me!!! - if you want to. (As Wyatt or Dan Badger, I don't mind which)
 

Jason

Awesome Bro

This is cool, But do you think you could do it like this ?:
I have a logo for my game, Which I would like to display in the top center of the screen, but still have the Panorama picture moving in the Background ? Because this would be great for my game
 

Kraft

Sponsor

cool script.

One problem though... I did everything that you said, and it only moves the original title screen pic, not the panorama pic.

I will try importing that image into the titles folder, and changing it though, and tell you if that works.

EDIT. Yes that works, you have to import the picture into the Titles folder, not the Pictures folder.

Anyway, I could use this!

I have some small questions though...
First, if I wanted the panorama to scroll sideways slower than 1 (it says in the script it has to be a whole number) how could I do this?

And secondly, like Brist said, is there a way that I could place a transparent PNG file on the title screen that does not move? like could you alter the script a little to fix that?
so that wee could put everything (such as the title) on that PNG, and it would not move?

And maybe (if it is not too hard) make it fade out and in kinda? with a changable (in the script) fade time?

That would be awesome!

Just as another idea...
Something that I would suggest (and use if it was made) is that script with the 3 image title screen, and the 3 images are PNG's that are transparent.
That would be cool.

Anyway, just rambling here...

Kraft
 

arev

Sponsor

I remember doing this in a similar way long time ago :D Now I'd use the "Plane" class to do it. Read about it in the help file - you'll find it usefull ;)
 
jbrist: This should do it:

Code:
class Scene_Title
  alias wy_edit_1_main main
  def main
    @sprite2 = Sprite.new
    @sprite2.bitmap = RPG::Cache.picture('YOUR_IMAGE_NAME_HERE') # Keep the ' '
    @sprite2.z = 9998
    wy_edit_1_main
    @sprite2.dispose
  end
  alias wy_edit_1_update
  def update
    @sprite2.update
  end
end

Instructions: Copy and paste it in a new script below the other one.


@Kraft:

EDIT. Yes that works, you have to import the picture into the Titles folder, not the Pictures folder.

Sorry, typo ':|

First, if I wanted the panorama to scroll sideways slower than 1 (it says in the script it has to be a whole number) how could I do this?

I really do not know. :s Sorry. A wait command would probably do the trick, but I do not know how to do that in ':| scripting.

And maybe (if it is not too hard) make it fade out and in kinda? with a changable (in the script) fade time?

Hmm... this would be complicated, I really don't know. ':|

Something that I would suggest (and use if it was made) is that script with the 3 image title screen, and the 3 images are PNG's that are transparent.
That would be cool.

I'll try this. Hold on.
 
Lol, I need to learn to read :)

@Kraft: To make it work with the 3 image TS script, (tried and tested), do this:

Use this script instead of my origional one,

Code:
class Scene_Title
  alias wy_title_1_update update
  alias wy_title_1_main main
  def main
    @sp = Sprite.new
    @sp.bitmap = RPG::Cache.title('mov1')
    @sp.z = 1
    wy_title_1_main
    @sp.dispose
  end
  def update
    unless @sp.x < -640
      loop_sprite
    else
      @sp.x = 0
    end
    wy_title_1_update
  end
  def loop_sprite
    loop do
      @sp.x -= 2
      break if $scene != Scene_Title
    end
  end
end

Then go to line 38 of the TITS (er... Three Image Title Screen) and change that line to:

Code:
    @back_sprite.z = 5000
 
Nice script but...

When I add the script for a picture

Code:
class Scene_Title
  alias wy_edit_1_main main
  def main
    @sprite2 = Sprite.new
    @sprite2.bitmap = RPG::Cache.picture('NightFall Logo') # Keep the ' '
    @sprite2.z = 9998
    wy_edit_1_main
    @sprite2.dispose
  end
  alias wy_edit_1_update
  def update  [COLOR=Red]<---- Here[/COLOR]
    @sprite2.update
  end
end

Itt gives me a Syntax Error Message on Line 11 (Def update).

A little help O_o?
 
Hey uhh... the panorama only appears half on the screen and the rest is just black. I mean it moves which is great but it dosen't even loop. It just kinda gets to the end then appears half on again
 

Jason

Awesome Bro

Sammy, would you mind telling me the date of the last post ? I think I'm going blind, it says:
March 10, 2007, 06:21:39 pm
I'm sure it's called a Necropost if you post 1 month later, you posted at:
February 23, 2008, 12:07:15 am (My time)
If I've counted correctly, thats over 11 months ago.

Please try not to Necropost again, thankyou.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top