[RGD] DirectX implementation of RGSS3

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
79
Reaction score
75
First Language
Chinese
Primarily Uses
RMVXA
Updated to v1.5
  • Enabled input for debug console.
  • Enhanced performance for Tilemap.
  • Fixed a bug that some tiles are accidentally above the shadow.
  • Fixed a bug on Bitmap#clear_rect.
Method for executing the input script from console:
Code:
class Scene_Base
  alias cirno_20200130_update update
 
  def update
    cirno_20200130_update
    if $RGD && ($TEST || $BTEST)
      code = RGD.console_input
      if code.length > 0
        begin
          eval(code)
          p "Script execution succeeded!"
        rescue Exception => e
          p "Error: #{e}"
          p "Call stack:"
          p e.backtrace
        end
      end
    end
  end
end
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
174
Reaction score
222
First Language
English
Primarily Uses
RMVXA
Reporting a minor bug here - with RGD the screen tint change command is locked to a maximum of 120 frames - meaning for example if I set them to apply with 300 frames the tint still finishes applying in 120 frames.
 

muramasa

Abomination of life, or life itself.
Veteran
Joined
Apr 29, 2012
Messages
591
Reaction score
302
First Language
Spanish
Primarily Uses
@KK20
No, I didn't realize xD. Didn't take into consideration that the bitmap would change its structure, or in this case, from a bitmap struct (which I didn't know was a DDraw texture then?) to a DX texture.
I'll try later with F0's.

@invwindy
There are some changes, yeah. From what I can gather, it's due to aliasing maybe? but I wasn't able to get why it happened since it's not the first time I alias a method with a variable argument size. The table I'm using is always 3D.

I tried accessing the table with 0, 1, 2 and 3 indices. And every time, no matter the table dimensions, it gave me an error asking for one parameter less. It even asked me -1 parameters when I gave it zero, which is impossible.

I'll keep testing stuff.
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
79
Reaction score
75
First Language
Chinese
Primarily Uses
RMVXA
@KK20
No, I didn't realize xD. Didn't take into consideration that the bitmap would change its structure, or in this case, from a bitmap struct (which I didn't know was a DDraw texture then?) to a DX texture.
I'll try later with F0's.

@invwindy
There are some changes, yeah. From what I can gather, it's due to aliasing maybe? but I wasn't able to get why it happened since it's not the first time I alias a method with a variable argument size. The table I'm using is always 3D.

I tried accessing the table with 0, 1, 2 and 3 indices. And every time, no matter the table dimensions, it gave me an error asking for one parameter less. It even asked me -1 parameters when I gave it zero, which is impossible.

I'll keep testing stuff.
I think the size of parameters must be same as table dimension in RGD. In default RGSS behavior, the parameters work differently. Is this causing your problem?
 

cardcafe

Villager
Member
Joined
Dec 1, 2013
Messages
7
Reaction score
1
First Language
english
Primarily Uses
RMVXA
Given how everything's been rewritten from the ground up, would it be possible to, say, change how tiles are drawn with the tilemap class? For example, could they be displayed closer to each other if someone wanted smaller tiles (Like 16x16 as opposed to the default 32x32)?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,275
Reaction score
6,023
First Language
Indonesian
Primarily Uses
RMVXA
Found another glitch. I could deal with this myself though.

Screenshot_14.jpg
Screenshot_15.jpg
There are two problems here
1. The arrow window shouldn't even be there.
2. If the window openness is 0, the arrow is still being displayed.

EDIT:
Is input.trigger?(:ALT) no longer works?

Please ignore the crappy UI I made
 
Last edited:

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
79
Reaction score
75
First Language
Chinese
Primarily Uses
RMVXA
Updated to 1.5.2
  • Fixed in_focus and out_focus when background_exec.
  • Fixed counter layering bug in Tilemap.
  • Fixed blur implementation in Bitmap.
  • Fixed incorrect copy of color in Font, Viewport and Plane.


@TheoAllen I found the alt key is always unavailable in RGD. This is caused by windows not sending Alt key as a key message and RGD does not handle this key from a version (maybe 1.2).

@cardcafe This would not be an easy work because the tile would be different from the editor and many convensions are going to be made, including the way of drawing auto tiles. I suggest parallax map systems if you need custom map settings. I personally recommend ULDS system https://rpg.blue/thread-367901-1-1.html .
 

Valentine90

Veteran
Veteran
Joined
Oct 5, 2017
Messages
47
Reaction score
15
First Language
Português
Primarily Uses
RMVXA
Updated to 1.5.2
  • Fixed in_focus and out_focus when background_exec.
  • Fixed counter layering bug in Tilemap.
  • Fixed blur implementation in Bitmap.
  • Fixed incorrect copy of color in Font, Viewport and Plane.


@TheoAllen I found the alt key is always unavailable in RGD. This is caused by windows not sending Alt key as a key message and RGD does not handle this key from a version (maybe 1.2).

@cardcafe This would not be an easy work because the tile would be different from the editor and many convensions are going to be made, including the way of drawing auto tiles. I suggest parallax map systems if you need custom map settings. I personally recommend ULDS system https://rpg.blue/thread-367901-1-1.html .
Thanks for your work, he is amazing. I use your work since the first version in my VXA-OS project.

background_exec is what I had suggested once so that the client would not pause when minimized, what would be very useful in online games?
 
Last edited:

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
79
Reaction score
75
First Language
Chinese
Primarily Uses
RMVXA
A quick update (1.5.3): fixed crashing on Font.clone and Font.dup
 

Valentine90

Veteran
Veteran
Joined
Oct 5, 2017
Messages
47
Reaction score
15
First Language
Português
Primarily Uses
RMVXA
1) Do you have any plans to release the source code?

2) Is there a way to not pause the executable when I click the minimize button? Because, even with background_exec enabled, the executable pauses when minimized.
 
Last edited:

sawworm

Sir Waste Time A Lot
Veteran
Joined
Jul 28, 2013
Messages
103
Reaction score
24
First Language
Turkish
Primarily Uses
RMVXA
Any news on text compression problem? Some of my dialogues and menus are cutting off because of this. Especially on the bottom and the right side.

Temporary fix for now: I was using 24 font size, now using 23... kinda works for now...

Also, is there a way to prioritize text boxes I want it on the front :(?

Game_6Q7fYLUv1K.png

Code:
class Window_BattleDifficulty < Window_Command

  def make_command_list
    KGC::BattleDifficulty::param_revs.each { |d|
      add_command(d[:name], d[:name].to_sym)
    }
  end

  def select_last
    select($game_variables[KGC::BattleDifficulty::DIFFICULTY_VARIABLE])
  end
end

class Window_MenuCommand

  alias :th_kgc_battle_difficulty_add_main_commands :add_main_commands
  def add_main_commands
    th_kgc_battle_difficulty_add_main_commands
    if KGC::BattleDifficulty::USE_MENU_DIFFICULTY_COMMAND
      add_command("Difficulty", :difficulty, main_commands_enabled)
    end
  end
end

class Scene_Menu

  # add new menu to the scene

  alias :th_kgc_battle_difficulty_start :start
  def start
    th_kgc_battle_difficulty_start
    create_difficulty_window
  end

  alias :th_kgc_battle_difficulty_cmd_window :create_command_window
  def create_command_window
    th_kgc_battle_difficulty_cmd_window
    @command_window.set_handler(:difficulty,      method(:command_difficulty))
  end

  def create_difficulty_window
    @difficulty_window = Window_BattleDifficulty.new(80, 100)
    @difficulty_window.set_handler(:ok, method(:on_difficulty_ok))
    @difficulty_window.set_handler(:cancel, method(:on_difficulty_cancel))
    @difficulty_window.hide.deactivate
  end

  def command_difficulty
    @difficulty_window.select_last
    @difficulty_window.show.open.activate
  end

  def on_difficulty_ok
    KGC::BattleDifficulty.set(@difficulty_window.index)
    end_difficulty_selection
  end

  def on_difficulty_cancel
    end_difficulty_selection
  end

  def end_difficulty_selection
    @difficulty_window.close
    @command_window.activate
  end
end
 
Last edited:

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
79
Reaction score
75
First Language
Chinese
Primarily Uses
RMVXA
Any news on text compression problem? Some of my dialogues and menus are cutting off because of this. Especially on the bottom and the right side.

Temporary fix for now: I was using 24 font size, now using 23... kinda works for now...

Also, is there a way to prioritize text boxes I want it on the front :(?

View attachment 143566

Code:
class Window_BattleDifficulty < Window_Command

  def make_command_list
    KGC::BattleDifficulty::param_revs.each { |d|
      add_command(d[:name], d[:name].to_sym)
    }
  end

  def select_last
    select($game_variables[KGC::BattleDifficulty::DIFFICULTY_VARIABLE])
  end
end

class Window_MenuCommand

  alias :th_kgc_battle_difficulty_add_main_commands :add_main_commands
  def add_main_commands
    th_kgc_battle_difficulty_add_main_commands
    if KGC::BattleDifficulty::USE_MENU_DIFFICULTY_COMMAND
      add_command("Difficulty", :difficulty, main_commands_enabled)
    end
  end
end

class Scene_Menu

  # add new menu to the scene

  alias :th_kgc_battle_difficulty_start :start
  def start
    th_kgc_battle_difficulty_start
    create_difficulty_window
  end

  alias :th_kgc_battle_difficulty_cmd_window :create_command_window
  def create_command_window
    th_kgc_battle_difficulty_cmd_window
    @command_window.set_handler(:difficulty,      method(:command_difficulty))
  end

  def create_difficulty_window
    @difficulty_window = Window_BattleDifficulty.new(80, 100)
    @difficulty_window.set_handler(:ok, method(:on_difficulty_ok))
    @difficulty_window.set_handler(:cancel, method(:on_difficulty_cancel))
    @difficulty_window.hide.deactivate
  end

  def command_difficulty
    @difficulty_window.select_last
    @difficulty_window.show.open.activate
  end

  def on_difficulty_ok
    KGC::BattleDifficulty.set(@difficulty_window.index)
    end_difficulty_selection
  end

  def on_difficulty_cancel
    end_difficulty_selection
  end

  def end_difficulty_selection
    @difficulty_window.close
    @command_window.activate
  end
end
GetGlyphOutline always fails in some special scales, and measuring text size sometimes returns incorrect values. I am not sure how default RGSS implements the drawing function. Maybe it will take more time to solve this.

But for your problem, I guess RGD doest not work well with KGC bitmap extension.

1) Do you have any plans to release the source code?

2) Is there a way to not pause the executable when I click the minimize button? Because, even with background_exec enabled, the executable pauses when minimized.
1) Currently no but I think I should release the source code after the project is stable enough.

2) Thank you for the reply. I'm going to have a look at this.
EDIT: I tested the case of background_exec + windows minimize button. The game is actually background executing and not paused. You may see the window frozen in the preview when you put the mouse on the toolbar icon. But the game is not stopped and the preview is saved before by windows system I think.
 

Valentine90

Veteran
Veteran
Joined
Oct 5, 2017
Messages
47
Reaction score
15
First Language
Português
Primarily Uses
RMVXA
2) Thank you for the reply. I'm going to have a look at this.
EDIT: I tested the case of background_exec + windows minimize button. The game is actually background executing and not paused. You may see the window frozen in the preview when you put the mouse on the toolbar icon. But the game is not stopped and the preview is saved before by windows system I think.
Really, sorry for the mistake.

Any news on text compression problem? Some of my dialogues and menus are cutting off because of this. Especially on the bottom and the right side.

Temporary fix for now: I was using 24 font size, now using 23... kinda works for now...
I solve this in my project by increasing the width of the texts.
 

sawworm

Sir Waste Time A Lot
Veteran
Joined
Jul 28, 2013
Messages
103
Reaction score
24
First Language
Turkish
Primarily Uses
RMVXA
Is it possible to make the screen 16:9 stretched? I can't seem to ALT + ENTER. Fullscreen ++ script not working either.
 

Valentine90

Veteran
Veteran
Joined
Oct 5, 2017
Messages
47
Reaction score
15
First Language
Português
Primarily Uses
RMVXA
Is it possible to make the screen 16:9 stretched? I can't seem to ALT + ENTER. Fullscreen ++ script not working either.
You can create a menu that activates the full screen, as I did in my project:

There are some unnecessary things in the original Game.exe, one of which is the shortcut Alt + Enter, F12, text compression etc.

The RGD must be better than the original Game.exe and not repeat the same "errors" as this one.
 
Last edited:

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,693
Reaction score
898
First Language
Dutch
Primarily Uses
N/A
You can create a menu that activates the full screen, as I did in my project:

There are some unnecessary things in the original Game.exe, one of which is the shortcut Alt + Enter, F12, text compression etc.

The RGD must be better than the original Game.exe and not repeat the same "errors" as this one.
How did you make that menu? I've been unable to get fullscreen working with RGD.
 

sawworm

Sir Waste Time A Lot
Veteran
Joined
Jul 28, 2013
Messages
103
Reaction score
24
First Language
Turkish
Primarily Uses
RMVXA
You can create a menu that activates the full screen, as I did in my project:

There are some unnecessary things in the original Game.exe, one of which is the shortcut Alt + Enter, F12, text compression etc.

The RGD must be better than the original Game.exe and not repeat the same "errors" as this one.
Well, RGD's F1 menu script has Full Screen, but it only allows 4:3 resolutions. Is there a way to apply Alt + Enter (stretched) style resolution into that?

Nice settings menu though ^.^
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,138
Reaction score
1,106
First Language
Spanish
Primarily Uses
RMVXA
quick update on the shadow bug: it still happens.
I'll post some screenshots later, but I was able to tie it to Group-2 Autotiles, specifically Block A, sections 3 & 4

from my testing, sections 3 & 4 always render without shadows.

I came to this conclusion also by accident, so further testing is required.

@sawworm , @BCj , I can render fullscreen with alt-enter just fine, and I heavily modified it.
I'm using a partial plugin for a submenu on the title screen, and part of that code runs the fullscreen change, so it might be my doing making that happen..... but alt-enter, widescreen AND, various resolutions, can definitely happen.

EDIT: uploaded pic.
I accidentally modified the tileset for another map and it screwed up this one, but fortunately that evidenced the tiles that were overlapped.
you can see how this screenshot compares to the video, and where the shadows appear or not.
these tiles are a vanilla Outside_A2, so you can use that as reference.

nuevo-1.jpg

nuevo-3.jpg

@sawworm , @BCj
that game window is 640x512, so you can see widescreen is possible, as well as full screen.

EDIT2:
@sawworm @BCj
I did a quick check and the results are inconclusive. I disabled the plugin I'm running and it switches fine to fullscreen AND widescreen. RGD should run just fine on it's own.
I left the plugin running until now, for this very reason. I was unsure RGD would render resolutions above 800x600 but I guess it does.
 
Last edited:

GGZiron

Veteran
Veteran
Joined
Nov 6, 2016
Messages
79
Reaction score
27
First Language
Bulgarian
Primarily Uses
RMVXA
The download link doesn't work to me.
Can someone share me that via PM, or give me link? I want to give a look on it too.

Edit: Got it, don't need link anymore.
 
Last edited:

Users Who Are Viewing This Thread (Users: 1, Guests: 2)

Latest Threads

Latest Profile Posts

When you are trying to make progress in your game. But something is stopping your motivation. Like come on mind! Let me do what I want! :<
Tfw everyone is trying their hardest to brainstorm about unique ideas and game mechanics, here I am just going: "How am I gonna event conversations with busts" everyday. :kaoswt2:
Comedy is third person, tragedy is first person.
Man. A historic 130 year old church nearby had all of its windows broken out with bricks last night. Such a shame, it wasn't generic stained glass patterns either but had beautifully crafted murals depicting various parts of the gospels.
The Steam Summer Sale's been treating me nicely. Now if only game sales were always this good...

Forum statistics

Threads
99,316
Messages
964,112
Members
130,926
Latest member
amarantster
Top