[RGD] DirectX implementation of RGSS3

UncannyBoots

Veteran
Veteran
Joined
Feb 1, 2020
Messages
42
Reaction score
5
First Language
English
Primarily Uses
RMVXA
I've noticed that the audio looping in the latest RGD is worse than older versions. I have a seamless looping BGS and it loops perfectly in the RPG Maker editor and with the default RGSS exe. But in-game with RGD 1.6, there is a noticeable 'click' sound -- a split second pause -- in between the loop. I didn't remember this happening in older versions of RGD, and so to test I moved an older RGD exe into my project and the audio now loops perfectly.
I noticed in the update notes for version 1.6 on your site that you rewrote the audio module, so this likely has something to do with that?
I appreciate the work you put into this project, thank you so much.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
98
Reaction score
19
First Language
português
Primarily Uses
RMVXA
Are there any bitmap alpha mask capabilities? :cutesmile:
EDIT: nevermind, found the documentation hahahaha

EDIT2: Would it be possible to disable F10 hangup??
 
Last edited:

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
98
Reaction score
19
First Language
português
Primarily Uses
RMVXA
OK! After a bunch of tests I am really happy with this resource! It is a little upsetting that the exe gets detected as malware :( Would such a thing be avoided if the exe name and ini were changed?

The Live2D implementation is good! I only got one Audio error, but it is pretty important..Like someone said above, BGM audio has a fraction of silence before it loops! I used OGG for the test. Is it possible this is only an error for certain file types??

Personal feedback. Food for thought, if nothing else!

- It seems like http://cirno.blog/archives/391 would be very useful for debugging...I want to use process_color for clipping images! but the documentation isn't available in English, I think.
- I think RMVXA by default does not "lock" audio when you click out of the window, and keeps going. An implementation like that may help devs who make very audio-focused games (it would be nice to see rhythm games in RPG Maker hahahaha)
- Maybe devs would benefit from a resizable window by dragging its borders. I would see this as an optional thing to enable, however...
- Is there the ability to adjust the window's name, even if it's just temporary?
- Are there available DL links for previous versions?
-EDIT: A demo showcasing image masking shader functions would be really nice hahaha
-EDIT: Are there any recommended audio file types for this engine? I saw the audio demo uses FLAC

- EDIT2: So RPG Maker doesn't really let you adjust the window select cursor flashing opacity at all, so it's impossible to remove that effect, and no one has been able to fix this issue..! Could we get something for that, if possible? :cutesmile:
 
Last edited:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,194
Reaction score
843
First Language
Hungarian
Primarily Uses
RMVXA
@zeroscares
The process_color method will just get the colors of a bitmap.
You have to specify the pixel index of the color to get the RGBA values from it.
Although, now that I think of it, I never really tried to use an index directly on the method, but I guess that works too.
Code:
    self.process_color do |col|
      (0..(self.width*self.height-1)).each do |ci|
        cx = ci % self.width # X co-ord
        cy = ci / self.width # Y co-ord
        p "color at [#{cx}, #{cy}] : #{col[ci]}"
      end
    end
This can be run inside the Bitmap class to check the colors on a per pixel basis located by co-ords.
I made a pixel based collision check using this a long time ago, and didn't check the newer RGD versions, so this may have changed since then.

Still no idea why was it made to behave this way, but that's probably because of how DirectX expects this data? Always seemed weird to me that I can't directly iterate the pixels with that method (the ColorArray class got no each method defined despite it's name suggesting that it's an array) and instead had to iterate the co-ords inside of it, but as long as it works, it's fine by me.

I also made the audio stop when the game's window isn't active anymore and started it up again when it became active again with the focus_out and focus_in methods of the RGD module. Not sure about the method names, already forgot them, but I'm sure they are mentioned in the documentation of RGD, so you can check them there. Basically, you stop any audio in the focus_out method and start them back again in the focus_in method.
But again, I made this very long ago, so this may or may not work with the new RGD version, I didn't test it.

As for the window cursor effect, you can just remove it completely and use a new sprite you made in the window class for it instead. Calling cursor_rect.empty will hide the default cursor completely. After that, just replace the default update_cursor method with your own to position your own cursor sprite properly.

Now I'm kinda tempted to try out the newest version, so many new things in it.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
98
Reaction score
19
First Language
português
Primarily Uses
RMVXA
hello again! Is bitmap.blt unusable now?
Because using this (script call) crashes the game with newest RGD exe:
Code:
@testimg = Sprite.new
@testimg.bitmap = Cache.picture("pic_1")
@test2 = Cache::picture("pic_2")
@testimg.bitmap.blt(0, 0,@test2,@test2.rect)
 

Valentine90

Veteran
Veteran
Joined
Oct 5, 2017
Messages
59
Reaction score
20
First Language
Português
Primarily Uses
RMVXA
hello again! Is bitmap.blt unusable now?
Because using this (script call) crashes the game with newest RGD exe:
Code:
@testimg = Sprite.new
@testimg.bitmap = Cache.picture("pic_1")
@test2 = Cache::picture("pic_2")
@testimg.bitmap.blt(0, 0,@test2,@test2.rect)
The problem is not the RGD, but your code, you defined the bitmap as picture pic_1 and then tried to draw another picture over it. The ideal would be like this:
Code:
@testimg = Sprite.new
@testimg.bitmap = Cache.picture("pic_2")
Or:
Code:
@testimg = Sprite.new
@testimg.bitmap = Bitmap.new(100, 100)
pic1 = Cache.picture("pic_1")
pic2 = Cache::picture("pic_2")
@testimg.bitmap.blt(0, 0, pic1, pic1.rect)
@testimg.bitmap.blt(0, 0, pic2, pic2.rect)
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
98
Reaction score
19
First Language
português
Primarily Uses
RMVXA
Code:
@testimg = Sprite.new
@testimg.bitmap = Bitmap.new(100, 100)
pic1 = Cache.picture("pic_1")
pic2 = Cache::picture("pic_2")
@testimg.bitmap.blt(0, 0, pic1, pic1.rect)
@testimg.bitmap.blt(0, 0, pic2, pic2.rect)
second option still crashes the game :dizzy:
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
351
Reaction score
136
First Language
English
Primarily Uses
RMXP
Just making sure, your script call works in a vanilla Game.exe? The Cache::picture makes me doubt that is true.
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
98
Reaction score
19
First Language
português
Primarily Uses
RMVXA
Just making sure, your script call works in a vanilla Game.exe? The Cache::picture makes me doubt that is true.
it works with normal exe :distrust:
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
351
Reaction score
136
First Language
English
Primarily Uses
RMXP
Then would you mind explaining what's the difference between Cache.picture and Cache::picture? The latter is not part of the vanilla scripts.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
351
Reaction score
136
First Language
English
Primarily Uses
RMXP
My mistake; in my 10+ years of Ruby experience, I've never seen module methods called that way before.

Anyways, code works fine for me in v1.5.4 and v1.6. Maybe it has something to do with the image you're using? I just tested with the RTP face graphics.
Code:
evilface = Cache.face('Evil')
actorface = Cache.face('Actor1')

s = Sprite.new
s.bitmap = evilface
s.bitmap.blt(0,0,actorface,actorface.rect)
 

UncannyBoots

Veteran
Veteran
Joined
Feb 1, 2020
Messages
42
Reaction score
5
First Language
English
Primarily Uses
RMVXA
Is it possible for someone to make a controller/gamepad input script? Instructions to do so are in the documentation but I have no idea how to do it. I'd have to learn how to code... but I use RPG Maker so I don't have to write code :eswt:
Would it be difficult?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
98
Reaction score
19
First Language
português
Primarily Uses
RMVXA
My mistake; in my 10+ years of Ruby experience, I've never seen module methods called that way before.
I didn't either :guffaw:
Your code does a block transfer but the effect is different! Original code snippet I gave in vanilla exe works as an image mask hack. (Solid black outline serves as mask + texture is pasted on.))
I haven't read into blend modes differences with RGD.... That is probably crashing the exe
 

Valentine90

Veteran
Veteran
Joined
Oct 5, 2017
Messages
59
Reaction score
20
First Language
Português
Primarily Uses
RMVXA
If you can make the project's source code available on GitHub, it would be great, more people could contribute to the project.
 

UncannyBoots

Veteran
Veteran
Joined
Feb 1, 2020
Messages
42
Reaction score
5
First Language
English
Primarily Uses
RMVXA
I decided to try out playing a movie just for the heck of it, so I converted a video to wmv and it does indeed work... kind of. But the video itself is sped up, probably by 1.5x or 2x the normal speed. Audio plays as it should though.
Furthermore, if the game is not in fullscreen, then dragging the window causes the video to stop, but the sound continues to play. This wouldn't be a problem if not for the fact that the video continues where it left off before the window was dragged, instead of updating to where it should be. So even if the video speed was correct, this alone would cause the video and audio to be out of sync if the user moves the window during video playback, which is not an unlikely scenario (considering I did it myself without thinking).

Videos aren't crucial for most RPG Maker games, but I am planning on having an opening movie like visual novels do, so I would love to see these two issues fixed in the future.

I would like to add that using Zeus' Video Player script fixes the speed issue, but it has its own share of problems when paired with RGD. For one, the video does not display while in fullscreen. Secondly, when dragging the window onto a second monitor during playback, the video glitches up and freezes. Lastly, after the video finishes, my character continuously walks to the right, as if I had a broken analog stick on a controller. So although Zeus' script has cool features and fixes the speed issue, it is unusable with RGD. This is okay if the native RGD video playback is fixed, but I wanted to throw this out there regardless.

So, for the time being, video playback is broken in RGD.
 
Last edited:

Robert-Character Creator

Waiting for Replies
Veteran
Joined
Feb 8, 2014
Messages
523
Reaction score
233
First Language
English
Primarily Uses
RMVXA
Hello. I'm experiencing an issue where RGD crashes the game on startup. It appears to be a conflict with Tsukihime's Collision Maps script, found here. To recreate the issue, simply install RGD into the demo, and try to run it. It should crash shortly afterward. I have experienced this issue with versions 1.3.2, 1.5.4, and 1.6.

I know you haven't been online lately, but I still have to put this out there in hopes of a fix. Thanks for any help you can give. It's appreciated.
 
Last edited:

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
351
Reaction score
136
First Language
English
Primarily Uses
RMXP
If it uses the DLL, then that's likely the problem due to the changed nature of RGD's bitmaps.
 

Latest Threads

Latest Posts

Latest Profile Posts

Whenever I start on a new chapter, it doesn't feel like the next episodes, but more like sequels :)
It can be frustrating that so many commercial games have used up titles that might otherwise be great for a project.
Light up explosions with QABS and Community Lighting.
qcPQHt9.gif

Forum statistics

Threads
110,655
Messages
1,054,985
Members
143,779
Latest member
Epitaph78
Top