apresentação com vídeo antes do menu principal

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

apresentação com vídeo antes do menu principal

Mensagem  roberto em Sab Mar 13, 2010 6:19 pm

ótimo tutorial criado por :Skull_Grimm
click aqui para ver a pagina original
Spoiler:
http://www.reinorpg.com/forum/index.php?topic=1160.0
tutorial
Spoiler:
Introdução

Antes de começar o tutorial, gostaria de falar que eu já vi vários tutoriais ensinando como por ví deo no seu jogo, e o meu se baseia basicamente neles. Mas eu não vi ainda um que ensinava como posta um ví deo antes da Titlescreen (Tela Principal). Nesse tutorial, vou ensinar onde você pode fazer um bom ví deo, como colocá-lo no seu jogo, e depois vou postar um script para fazer seu ví deo ficar antes da tela principal (O script não é de minha autoria). Tudo bem explicadinho. Vamos começar, então Wink.

Criando seu Ví deo

Peço para quem tem um ví deo pronto pular essa parte. Aqui vou ensinar a fazer um ví deo simples, como um ví deo de créditos, por exemplo. Para quem é usuário do sistema operacional Windows XP, é muito fácil de fazer um ví deo. Clique no menu 'Iniciar', depois em 'Todos os Programas' e depois em 'Windows Movie Maker'. Se você não tem experiência em como fazer ví deos usando o WMM, use a ajuda que a Microsoft disponibiliza. Gente, muitas pessoas apenas ignoram os helps dos programas, e ficam passando dificuladade atoa. Bem, agora para quem não possui Windows XP e quer fazer um ví deo, entrem nesse link:

http://baixaki.ig.com.br/pesquisa.asp?nome=cria%E7%E3o+de+v%EDdeo&tipo=1&imageField.x=24&imageField.y=8

Colocando o Ví deo no seu Jogo

Essa é a parte mais simples de todas. Para colocar o ví deo no seu jogo, entre em 'Meu Computador', depois em unidade 'C:\', depois em 'Arquivos de Programas', depois em 'Enterbrain', e aí entrem em 'RGSS-RTP', depois em 'Audio', e por fim em 'BGM'. Cole seu ví deo nessa pasta. Pronto, seu ví deo já pode ser usado no seu jogo, basta selecionar o comando 'Reproduzir BGM' e seu ví deo aparecerá Surprised.

Nota: Se você tiver instalado o RGSS-RTP em outro diretório, use os mesmos procedimentos, só que no diretório que você instalou.
Essa era a parte que todos estavam esperando. Para você colocar seu ví deo antes do Title, basta seguir alguns poucos passos. Primeiro, abra seu projeto e vá em editor de scripts. No script Scene_Title, apague tudo o que está lá e substitua para esse script aqui:
Spoiler:
###########################################################################################################
###########################################################################################################
#### ATENÇÂO : Coloque o "Posição Inicial do Jogador" no mapa de apresentação
###########################################################################################################
###########################################################################################################

#==============================================================================
# ? Scene_Title
#------------------------------------------------------------------------------
# ???????????????????
#==============================================================================

class Scene_Title
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ????????
if $BTEST
battle_test
return
end
# ??????????
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# ?????????????
$game_system = Game_System.new
###########################################################################################################
###########################################################################################################
#### A apresentação antes do title precisa de uma variável e um if (é o que coloquei aqui)
###########################################################################################################
###########################################################################################################
if $game_mostra_tittle == true
# ?????????????
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# ????????????
s1 = "New Game"
s2 = "Continue"
s3 = "Shutdown"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# ???????????
# ?????????????????????????
# ???? @continue_enabled ? true????? false ???
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# ???????????????????????????????
# ?????????????????????????
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# ???? BGM ???
$game_system.bgm_play($data_system.title_bgm)
# ME?BGS ??????
Audio.me_stop
Audio.bgs_stop
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????????
@command_window.dispose
# ?????????????
@sprite.bitmap.dispose
@sprite.dispose
else
## Novo Comando (olhe lá em baixo) #########################################################################################################
command_apresentacao
$game_mostra_tittle = true
end
###########################################################################################################
###########################################################################################################
#### fim fo if da apresentação
###########################################################################################################
###########################################################################################################
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????????
@command_window.update
# C ??????????
if Input.trigger?(Input::C)
# ???????????????????
case @command_window.index
when 0 # ??????
command_new_game
when 1 # ???????
command_continue
when 2 # ???????
command_shutdown
end
end
end
#--------------------------------------------------------------------------
# ? ???? : ??????
#--------------------------------------------------------------------------
def command_new_game
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# BGM ???
Audio.bgm_stop
# ??????????????????????
Graphics.frame_count = 0
# ??????????????
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# ?????????????
$game_party.setup_starting_members
# ???????????????





######################################
#### ? Níºmero do primeiro Mapa do jogo #
$game_map.setup(1) #
######################################
# ?????????????
#######################################################
#### ? posição em que o heroi ficará no primeiro Mapa do jogo #
$game_player.moveto(10 , 10) #
#######################################################





# ????????????
$game_player.refresh
# ??????????? BGM ? BGS ??????????
$game_map.autoplay
# ?????? (????????)
$game_map.update
# ??????????
$scene = Scene_Map.new
end

###########################################################################################################
###########################################################################################################
#### ? Novo Método! (APRESENTAÇÂO)
###########################################################################################################
###########################################################################################################
def command_apresentacao
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# BGM ???
Audio.bgm_stop
# ??????????????????????
Graphics.frame_count = 0
# ??????????????
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# ?????????????
$game_party.setup_starting_members
# ???????????????
$game_map.setup($data_system.start_map_id)
# ?????????????
$game_player.moveto($data_system.start_x, $data_system.start_y)
# ????????????
$game_player.refresh
# ??????????? BGM ? BGS ??????????
$game_map.autoplay
# ?????? (????????)
$game_map.update
# ??????????
$scene = Scene_Map.new
end
###########################################################################################################
###########################################################################################################
#### ? Fim do Novo Método! (APRESENTAÇÂO)
###########################################################################################################
###########################################################################################################
#--------------------------------------------------------------------------
# ? ???? : ???????
#--------------------------------------------------------------------------
def command_continue
# ?????????????
unless @continue_enabled
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ??????????
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# ? ???? : ???????
#--------------------------------------------------------------------------
def command_shutdown
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# BGM?BGS?ME ????????
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# ???????
$scene = nil
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def battle_test
# ?????? (??????) ????
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# ??????????????????????
Graphics.frame_count = 0
# ??????????????
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# ??????????????????
$game_party.setup_battle_test_members
# ???? ID??????????????????
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# ????? SE ???
$game_system.se_play($data_system.battle_start_se)
# ??? BGM ???
$game_system.bgm_play($game_system.battle_bgm)
# ??????????
$scene = Scene_Battle.new
end
end
Esse script acima permite que seu jogo rode um mapa antes da Tela Principal (Titlescreen). Tudo bem, agora crie um mapa novo, todo em branco, com o titleset que você bem desejar. Coloque 'Posição Inicial do Jogador' nesse mapa. Agora, crie um evento nele com Iní cio Automático. Nesse evento, coloque o comando de reproduzir BGM, e escolha seu ví deo de apresentação. Depois, coloque outro comando de evento, clicando no botão 'Voltar à Tela de Tí tulo'. Pronto. Seu ví deo será exibido antes da tela principal (Titlescreen).

OBS: No script, edite qual será o ID do mapa em que o jogador começará quando clicar em 'Novo Jogo'. O ID do mapa corresponde à ordem de criação dele. Por exemplo, o 1º mapa que eu criei tem ID 1, já o 12º tem ID 12. A edição do ID está na linha 161.
avatar
roberto
Admin

Mensagens : 75
Pontos : 204
Reputação : 3
Data de inscrição : 03/03/2010

Ver perfil do usuário http://morpgmaker.mo-rpg.com

Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum