[DYNRPG] OPENGL RENDERER & VIDEO OPTIONS MENU

Adds a hot new OpenGL renderer to your old RPG Maker 2003 games

OpenGL Renderer & Video Options menu

Full Documentation & Github Link

A DynRPG plugin to enable OpenGL rendering in older RPG Maker 2003 games



Features:

  • Fast Fullscreen/Windowed mode switching

  • Large window sizes(up to the desktop resolution's height... 4k etc.)

  • Fullscreen mode set to the desktop resolution with pixel scaling options (or a "classic" 640x480 fullscreen mode)

  • Interpolation

  • Shader support(The possibilities are endless)

  • Video Optionsmenu similar to the Retail/Steam version of RM2003 (but drawn in OpenGL)

  • TRANSLATIONSfor the Video Options menu mentioned above

  • An actual screenshot key that will capture a perfect 320x240 screenshot (without shaders) to a png file.

  • SFML(See advanced section in github link)


Note: If your game uses the "Play Movie" command, this plugin doesn't handle it well from a fullscreen context (since OpenGL's fullscreen mode is exclusive), so it has to switch back to a window. This is obviously not great, but it's the best I could do. If playing in a window, the video should play fine. Personally, I would suggest not using "Play Movie" at all since it's garbage to begin with (calling it twice in a row for example will show a black screen the second time). If that doesn't apply to you, then onward!
Usage

F4 key - now toggles between numerous window sizes supported by your monitor (1x, 2x, 3x, 4x etc)

F5 key - Launches into the "Video Options" menu, navigated with arrow keys. F5 again, or Escape will exit the menu.

Details

  • Offsite
  • N/A
  • Never

Actions

Posts

Pages: 1
Sweet! Gonna mess around with this.
This seems very useful! Lots of players have requested a bigger windowed mode

Thanks for making this!
It has alot of comment commands but the only ones I would recommend for basic games are:

@load_video_options
(you can set this inside some kind of system menu)

@quit_game
(if you need to hard quit from a game)

@set_fullscreen (0 or 1)
(this is good for breaking fullscreen during videos or switching to it)
For those using this plugin: I just updated it to use SFML (graphics library) v2.5.0 from v2.4.2. v2.5.0 has some performance improvements (sf::RenderTexture class), although they're probably too tiny to notice. The plugin code itself is the same. Just redownload it and update all of the included *.dll files if you want to try it out.
This is amazing and makes it possible for me to even do fullscreen in Windows 8. Thanks for this.

I'm noticing it messes with the mouse plugin when in windowed mode at most resolutions. I can always see the cursor on top of the game window now, and the in-game mouse cursor is way off sync. It only syncs in 640x480.

Is it possible to hide the windows mouse cursor?

I can't press F12 while in fullscreen mode.

I decided to disable F5 and put commands in game. I notice that when you are in fullscreen, and then use @toggle_window_scale 0, it has a weird effect of sometimes enabling @set_ignore_aspect_ratio. I refer to that as widescreen in my game. Should window scale really affect anything in fullscreen? It keeps it fullscreen but shrinks the visible play area. Who wants that?

Anyways, I just disabled the option of window scale while full screen is on. Oh and while in window mode, and I change widescreen, it doesn't change anything but later when I do go into fullscreen, it doesn't always work right. Sometimes it won't be widescreen, and when I change the option for it, it doesn't work right away(not widescreen while option is set to ON). I have to cycle between on/off a few times then it matches up. I have a fix so this one is fine for me but I thought I'd mention it.

When using F5 and I change uneven pixels, it auto puts aspect ratio to yes as well. In that menu they seem to be tied together, if one is yes then the other is too. When I use the @command to change one, does the other change as well?


Can you explain how this would be used:

@set_window_resolution_to_hero_name

Treats a hero name as a string and sets it to the window resolution (in "width x height" format)
number - The ID of the hero

@set_shader_name_to_hero_name

Treats a hero name as a string and set one to the name of the current shader (or "None")
number - The ID of the hero

@set_desktop_res_to_hero_name

Treats a hero name as a string and set one to the desktop resolution (in "Yes (width x height)" format)
number - The ID of the hero


Interpolation sucks, heh.

And I plan on using shaders for special states in game. Like when you get turned into a ghost I'll turn on some filter. It will look pretty cool :D Is it impossible to use 2 shaders, like any of the color ones on top of the scale2x one?

Wait, how do I call a specific shader? I only see a command to cycle between them.

Is there a way to tell which shader is active? There doesn't seem to be much control for them. As it stands it's merely a gimmick for a player to choose between, instead of me being able to integrate it into gameplay.

I could rig a system with variables to change and keep track, but then I won't be able to give the player the option of using the Scale2x filter, which would be unfortunate. Or...well I guess I could, but it would be so much better if I had more control.

It seems that when I start a new game it remembers any set shader from a previous game. This could be a problem if the player quits while a shader was changed, or if scale2x is on then the player starts a new game. Things will be really messed up and I'd have no way to implement a fix with code. I am using the AEP patch too, so maybe it's remembering something there?


There's a typo in the DynRPG.ini file info.

;
Shader8=Sepia
Shader8frag=true
;
Shader8=Invert
Shader8frag=true
;
Shader10=CB_Protanopia
Shader10frag=true




Is it possible to add more shaders? How would one find them?

I notice you can open the .frag files in notepad and change it, but I don't know what I'm doing here. Maybe I'll figure out something cool heh I'll try to reverse engineer these things.

I finished the system to control shaders in my game. It works just fine except for the issue of quitting the game while it's not on NONE. For now I'm adding a recalibration screen where the player will have to cycle them until it's normal. But it would be nice to have simply a @set_shader command :)


I'm having a problem where at the title screen when I do test play, it keeps setting the shader to #7. I have a common event:call trigger that uses a variable/branches to set the shader to a specific one(no other events do this unless triggered by the player), but it only works if the game starts at shader #0. I put a message command at the start of that event to see if it was being called somehow when I start game and it's not. I tried putting the player starting position on a different map, still happens. I wasn't doing anything in the common events, I was working on map events that were on trigger. Not parallel or anything. There is no reason it should be doing this, that I can think of or find. I've checked everything I worked on in the last hour because it just happened a few minutes ago. Nothing. Could this be a bug?

I've seen it start the game on the last filter, if it wasn't 0. So if I have it on Virtual Boy when I close the game. Next time I start it's still on Virtual Boy. But what's happening is that even if it's on Virtual Boy when I quit, next time I start a game it goes to #7 every time. I'm going to keep looking and I know you might not be able to help, or need to see the game, just mentioning this *sigh*

UPDATE: It seems like it was a bug. I downloaded a fresh copy and pasted the main game folder files and that solved it.
I'm getting an error when opening RPG_RT.exe
Every time I open it it sends an error message saying "Plugin "system_opengl.dll" is not compatible with this version of DynRPG!"
I have tested this on a seperate computer to get the same error.
I believe to be using version 0.32 of DynRPG, do I need a different version?

Thanks
author=PickyIcky
I'm getting an error when opening RPG_RT.exe
Every time I open it it sends an error message saying "Plugin "system_opengl.dll" is not compatible with this version of DynRPG!"
I have tested this on a seperate computer to get the same error.
I believe to be using version 0.32 of DynRPG, do I need a different version?

Thanks


I'm using 0.20 and it works fine
Works fine here too!
Are you sure you are using one of the latest version of dynrpg?
0.32 is the sdk for the plugins not the dynrpg version!
author=TheNecromancer
Is there a way to tell which shader is active? There doesn't seem to be much control for them. As it stands it's merely a gimmick for a player to choose between, instead of me being able to integrate it into gameplay.



It seems that when I start a new game it remembers any set shader from a previous game. This could be a problem if the player quits while a shader was changed, or if scale2x is on then the player starts a new game. Things will be really messed up and I'd have no way to implement a fix with code. I am using the AEP patch too, so maybe it's remembering something there?




I finished the system to control shaders in my game. It works just fine except for the issue of quitting the game while it's not on NONE. For now I'm adding a recalibration screen where the player will have to cycle them until it's normal. But it would be nice to have simply a @set_shader command

Any chance of resolving this problem with shaders?
That's working as designed. This plugin just takes the original RM23k Window, and copies all the pixels to an OpenGL context. It draws shaders to the entire screen because that's all it can do. The screen itself is a set of vertices and a single draw call each frame that attaches a shader if one is defined.
I agree, it's working as designed with the commands that are available. I have no complaints with how they are applied to the game window. Really, I have no knowledge of how they are applied and honestly I'm not certain how your explanation relates to my question. It's a bit above my knowledge level :P

Let me try to explain more specifically:

From what I can tell, all I can do is move to the next shader, or the previous one.

What would be helpful is any other commands for changing the shader. Set to the 6th one, or reset to the default one.

I see there is @set_shader_name_to_hero_name, but I'm not aware of any way to make conditional branches based on a string/hero name. So I can't use this in any meaningful way to control my shaders. I assume it's a simple way to display on screen in text which shader is active.

There's also this one:
@set_shader_param

Sets a shader's float parameter (experimental)
text - The shader's parameter
text - A textual representation of a float value (ex: "0.975")


But I have no idea what a float parameter is, or what I would use this command for. I tried looking up shader float parameter but it's beyond me. Is this supposed to allow me to set a specific shader? Is Shader ID a paramater and this allows me to set it? How? What does float have to do with it? The average user will be clueless on this one. I guess it's experimental for a reason maybe?

That's all I could glean from the help files. Here's what I did in game:

I created a system so the custom ingame options menu allows the player to cycle between none, scale2x, and CRT. When they hit next, a variable increases to keep track of which shader is showing, and the command is run to cycle to the next shader, or back to the first one when it loops around.

The game obviously starts on none. If the player changes to CRT, doesn't save the game, and restarts, it will be in CRT mode on startup. However the in game variables still think it's set to NONE, so when the player goes to change shaders it won't match the visual label of the options screen in game. That's a minor issue, since the player can just keep cycling to get what they want.

The problem would be when I want to change to a specific shader for story purposes. Example, when a character dies and turns into a ghost I would want the gameboy shader to apply. Since I can't tell it to move to a specific shader, I have to cycle to the next shader enough times for it to land on the one I want. I have to check the variable to see which shader is active, and then have code cycle it x times based on it's current shader.

If the player messed up the order by quiting without saving, it will not land on the gameboy shader. And any attempts to bring it back to the previous shader, will be off as well, since the code can't determine which one it's on. At that point, anything involving shaders becomes broken.

Maybe I'm missing something obvious, and I hope I am. Maybe there's another dynRPG plugin that could help. But I think if you made a simple @reset_shader command it would give enough control to avoid this problem. I could reset shader, reset variable, then cycle to whatever I need to reset the whole system. Or on game startup, have it reset the shader every time to keep it in check.
Source code is here:
https://github.com/rewrking/system_opengl

I think @set_shader_param only supports simple values, so it's rather limited. To be honest, the shader support was fairly experimental anyway.

Just FYI: I'm not going to add anything new to this plug-in unless it's a critical bugfix or something. If you want to add to it (admittedly the code is pretty rough), I suggest forking the source code and learning C++.
So, just so I'm sure I'm reading this correctly - are all the SFML features listed in the link available? Like FTP transfers?
Pages: 1