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.

Screensaver Effect

Status
Not open for further replies.

PK8

Member

Screensaver Effect
Version 1

Introduction
This screensaver effect began as an idea I wanted to script. Intrigued, I felt like scripting it. Whenever there is a user inactivity for a certain amount of time, the screen would automatically change colors (Time and screen tone is up to you.) in a screensaver-like fashion. When the user presses any button RMVX uses, the screensaver would disappear.

Features
  • Affects anything with a Scene_Base
  • Specify how many seconds of user inactivity there is before a screensaver appears
  • Give your screensaver a custom screen tone. (Desaturated? Darken?)
  • Scripters can create add-ons to it.

Screenshot
http://i38.tinypic.com/2iu2t6u.png[/img]

Demo! (Download here)
Download VX Script/Demo!

Script (Copy into materials section)
Code:
=begin
â•”â•
 
Good idea for this script, Punk!

Anyway, here are some points you may want to consider:
- Many scripters usually forget to write ‘super’ for update method in the scenes they scripted from scratch. Therefore, this will not work with those scenes. I think to put this script in Graphics.update might be a better idea. ^^
- Sometimes the game has a looooong cutscene or movie that don’t need the player to push any key for long time. You may want to add the switch to disable this script temporary.
 
Nice script, could you make it so that music also dims when the screensaver comes up, or a little graphic that could appear in the middle of the screen that says "idle"?
 
It looks to me like this could be very, very easily ported to RMXP given two things:

1. Install SDK, including part 3.
2. Change "Scene_Base" in this script to "SDK::Scene_Base"

Since SDK::Scene_Base is scarily similar to VX's Scene_Base, like Enterbrain copied us or somethin' ;)
 
Suggesions:

1) Put your constants in your module. ;)

2)
Code:
	  if Input.trigger?(Input::R) or Input.trigger?(Input::L)
		break
	  end
	  if Input.trigger?(Input::A) or Input.trigger?(Input::B)
		break
	  end
	  if Input.trigger?(Input::C) or Input.trigger?(Input::X)
		break
	  end
	  if Input.trigger?(Input::Y) or Input.trigger?(Input::Z)
		break
	  end
	  if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
		break
	  end
	  if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
		break
	  end
	  if Input.trigger?(Input::ALT) or Input.trigger?(Input::CTRL)
		break
	  end
	  if Input.trigger?(Input::SHIFT) or Input.trigger?(Input::F5)
		break
	  end
	  if Input.trigger?(Input::F6) or Input.trigger?(Input::F7)
		break
	  end
	  if Input.trigger?(Input::F8) or Input.trigger?(Input::F9)
		break
	  end
	  #Buttons End

How about this:
Code:
for b in Input::PK_SS_Buttons
  break if Input.trigger?(b)
end

# Then outside that module, add:
module Input
  PK_SS_Buttons = [A, B, C, L, R, X, Y, Z, UP, DOWN, LEFT, RIGHT, SHIFT, ALT, CTRL, F5, F6, F7, F8, F9]
end

You can do the same for this:
Code:
	if Input.press?(Input::R) or Input.press?(Input::L) or Input.press?(Input::A)
	  @pk_screensaver_time = 0
	end
	if Input.press?(Input::B) or Input.press?(Input::C) or Input.press?(Input::X)
	  @pk_screensaver_time = 0
	end
	if Input.press?(Input::Y) or Input.press?(Input::Z) or Input.press?(Input::F5)
	  @pk_screensaver_time = 0
	end
	if Input.press?(Input::F6) or Input.press?(Input::F7) or Input.press?(Input::F8)
	  @pk_screensaver_time = 0
	end
	if Input.press?(Input::F9) or Input.press?(Input::CTRL) or Input.press?(Input::ALT)
	  @pk_screensaver_time = 0
	end
	if Input.press?(Input::SHIFT) or Input.press?(Input::UP) or Input.press?(Input::DOWN)
	  @pk_screensaver_time = 0
	end
	if Input.press?(Input::LEFT) or Input.press?(Input::RIGHT)
	  @pk_screensaver_time = 0
	end
	#Buttons End



Good idea Punk!
 
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