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.

PNG Sequence

I need a script that will make a .png sequence.

Basically:

In a folder called:

game_folder\graphics\movies\movie_name

There are files, numbered 1, 2, 3, 4, 5, 6, 7, ...etc .png

When this is called, it plays them one after the other with a changable space in between each image. Then it goes to a new scene:

$scene=Scene_Sequence.new(movie_name, 1, scene_title)

/\ In this:

movie_name = the folder where the images are stored
1 = the amount of frames between each image
scene_title = the scene it will go to after the last image is shown

This essentially creates a low-filesize movie that has good .png quality.
 

arev

Sponsor

Here's another one, for you to choose from:
Code:
#=======================================================================================
# * CGI Movies
#-------------------------------------------------------------------------------------
# Create cutscenes and movies using images, like what Square-Enix is doing for
#Final Fantasy 12
#-------------------------------------------------------------------------------------
# Tsunokiette
# Version 3
# 11.22.05
#=======================================================================================

#**********************
# Create RPG::Cache.CGI
#**********************
module RPG
module Cache
def self.CGI(filename)
self.load_bitmap("Graphics/CGI/", filename)
end
end
end

#************************
# Start CGI Movies Script
#************************
class Scene_CGI
attr_accessor :cgi_over

#-------------------------------------------------------------------------
# Initialize the CGI Movie
# $scene = Scene_CGI.new ("folder", Scene_Map.new, true)
#-------------------------------------------------------------------------
# cgi_folder = folder containing CGI images
# scene = the scene to return to after CGI plays
# skip = set to true if you want to be able to skip movie by pressing esc.
#-------------------------------------------------------------------------

def initialize(cgi_folder, scene, skip = false)
@folder = cgi_folder
@scene = scene
@folder_size = Dir.entries("Graphics/CGI/#{@folder}").size
@skip = skip
@cgi_over = false
play_cgi
end

#-------------------
# Main Processing
#-------------------
def main
  @spriteset = Spriteset_Map.new
loop do
if @cgi_over == true
break
end
end
@cgi_over = false
$scene = @scene
end

#-------------------
# Play the CGI Movie
#-------------------
def play_cgi
for i in 1..(@folder_size - 2)
unless @skip == false
if Input.trigger?(Input::B)
break
end
end
@cgi = Sprite.new
@cgi.bitmap = RPG::Cache.CGI("#{@folder}/#{i}")
@cgi.x = ((640 - @cgi.bitmap.width) / 2)
@cgi.y = ((480 - @cgi.bitmap.height) / 2)
delay(1)
@cgi.dispose
end
@cgi_over = true
end

#------
# Delay
#------
def delay(wait)
count = Graphics.frame_count
while wait + count >= Graphics.frame_count
Graphics.update
end
end
end

;)
 

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