Fixed priority issue on range and characters. But I still cannot find a proper way to test the map looping problem. In my empty object the map looping is fine, but I do not know how to test in your project.
[RGD] DirectX implementation of RGSS3
Useful Development ToolsTraining Grounds, first hall, walk up against the upper wall, then down towards the bottom hallway.
put the player start point in whatever map you want, and use the blank menu option, above Training Grounds.
use the maps at the bottom of the list, under "utils"
put the player start point in whatever map you want, and use the blank menu option, above Training Grounds.
use the maps at the bottom of the list, under "utils"
I know what have caused incorrect scrolling. From RGD I got Graphics.height 720 while in RGSS I got 480. It seems that your screen resolution script do not fit RGD exe.
RGD provides Graphics.resize_window to adjust window size without changing game resolution. See if you need this function.
already resized, no change.
it's only when scrolling down, going up or either side doesn't seem to cause it.
it's only when scrolling down, going up or either side doesn't seem to cause it.
Maybe we need to modify the resolution script and make it compatible with RGD.
If the reflecting effect is made using sprites, then it is fine with RGD.
*just* found something that might help: a piece of Yanfly code was interfering with the scrolling.
find the Viewport/Map Fix, which I believe was included with GTBS, and you'll see a chunk of it is commented out.
*I* disabled it for some reason, but I can't remember why.
re-enabling it solved the issue, but now I have to find where it caused errors with the original game.exe to see why I disabled it XD
EDIT:
isolated the problem when using resolutions above 640x480 with both the original exe and RGD.
aparently that Yanfly code was there to help correct the camera somehow.
the problem doesn't appear with resolutions of 544x416 or 640x480 using the default code.
the map *scrolls* up or down (as it was intended originally) rather than *jumping* or splitting the screen
find the Viewport/Map Fix, which I believe was included with GTBS, and you'll see a chunk of it is commented out.
*I* disabled it for some reason, but I can't remember why.
re-enabling it solved the issue, but now I have to find where it caused errors with the original game.exe to see why I disabled it XD
EDIT:
isolated the problem when using resolutions above 640x480 with both the original exe and RGD.
aparently that Yanfly code was there to help correct the camera somehow.
the problem doesn't appear with resolutions of 544x416 or 640x480 using the default code.
the map *scrolls* up or down (as it was intended originally) rather than *jumping* or splitting the screen
From what I have known, the game map would immediately translate to a new position when it is scrolling and its size is smaller than game resolution. This can already be found in RGSS. The difference between RGSS and RGD is the translation distance.
Since you already have the fixing script, this difference is not so importance then.
exactly.
I'll see if I can work around removing that code entirely, and just rely on RGD
I'll see if I can work around removing that code entirely, and just rely on RGD
I mean, is there a command or code for it already implemented in RGD?
I'm afraid this would not be included in RGD commands. This effect relies on extra information from tilesets or regions, which is more suitable for ruby scripts, instead of built-in functions.
I tried the latest download but I keep getting this error even in a new project.
And I also use RGSS301.dll
And I also use RGSS301.dll
I'm not sure of this problem. Have you tried a new DLL copied from an empty VXA project?
PM'd to see if it'll help 🙂
Whenever the project is saved, the DLL gets replaced by the one from your VX Ace installation folder, so new project or not, it will be the same DLL.
Unless, of course, it is replaced manually.
Tried the mouse clip method with the correct arguments now, works like a charm!
I noticed that you handled the flash color differently somehow, because the sprite's color property won't interfere with it anymore, which is one less annoyance fixed for me, so thanks for that!
And I also noticed that no matter what I do, any text I draw with the default draw_text method is positioned slightly off to the left. It's around 2 pixels too much to the left when the alignment is set to 2 (right), and around 4 pixels too much to the left when the alignment is set to 1 (center). If the alignment is set to 0 (left), it seems to behave the same way like the default engine does (some font types get 1 pixel cut down from the first letter if the text starts from 0 x position on the bitmap, but that's how it always worked, so it's not a big deal).
It doesn't matter what font type or size I use, or what other font settings I use.
I don't know if this is how the default engine works too or not, never paid much attention to it before, but it started to annoy me now because I'm in the process of fine-tuning the text positions in a menu I work on. I can always just set the positions accordingly to work-around this issue, but than I wouldn't know why I set all positions off a few pixels if I ever need to check them again some time later.
Thank you!
The flashing color issue is going to be fixed in the next update.
I did not know much about the exact position of draw_text before. I'm going to do some test work later.
Wait, I think you misunderstood me. 😀
Actually, the way how you handled the flash color of sprites is much better than how the default engine did it.
This is how the default engine handles it:
Only tested this with black and white combinations, so no idea if the blending is any good in the more... colorful situations, but it sure looks better this way with black and white combo.
If you want a quick testing scene for that draw_text issue, you can try this:
This is what I used to test it.
Just run it, make a screenshot, use any image editing program to magnify the image, and check the text positions.
The yellow area is supposed to be the area reserved for the text.
Actually, the way how you handled the flash color of sprites is much better than how the default engine did it.
This is how the default engine handles it:
- Set the sprite's color property to a color with an alpha value of higher than 0, preferably to something high so you can see the visual issue clearly.
- Start a flash effect on that same sprite, any kind with a proper color setting (meaning the color is not set to nil).
- You will see that the flash color will not show up properly, because for some unknown reason, only the color with the highest alpha value will show up between these 2 color effects. This leads to a pretty bad looking flash effect on any sprites that have their color changed, especially if the color's alpha value is set to something high.
Only tested this with black and white combinations, so no idea if the blending is any good in the more... colorful situations, but it sure looks better this way with black and white combo.
If you want a quick testing scene for that draw_text issue, you can try this:
Code:
# Font property settings. Self-explanatory.
fnt = {
:size => 16,
:bold => false, :italic => false, :shadow => true, :outline => true,
:color => Color.new(255,255,255,255),
:out_color => Color.new(0, 0, 0, 128),
}
# Add any font type you want to test here.
# Cycle through them with the LEFT and RIGHT keys during testing.
fonts = [
"Tw Cen MT Condensed","Bell MT","Candara","Adobe Caslon Pro","Corbel",
"Estrangelo Edessa","Franklin Gothic Book","Gill Sans MT","Iskoola Pota",
"Matrix","Aclonica","VL Gothic","Verdana", "Arial",
]
al = 1 # Alignment value.
ww = 400 # Width reserved for the text
hh = 200 # Height reserved for the text
txt = "01234567899876543210" # Sample text for testing.
fnt[:name] = fonts[0]
mtds = [:name, :size, :bold, :italic, :shadow, :outline, :pixel, :color, :out_color]
sp1 = Sprite.new
sp1.bitmap = Bitmap.new(ww,hh)
sp1.x = (Graphics.width - ww)/2
sp1.y = (Graphics.height - hh)/2
sp2 = Sprite.new
sp2.bitmap = Bitmap.new(ww,hh)
sp2.x = (Graphics.width - ww)/2
sp2.y = (Graphics.height - hh)/2
sp1.bitmap.fill_rect(0,0,ww,hh,Color.new(255,255,55,255))
mtds.each do |mtd|
sp2.bitmap.font.send(mtd.to_s+"=",fnt[mtd])
end
sp2.bitmap.draw_text(0,0,ww,hh,txt,al)
# Just a debug print to see the font properties
mtds.each do |mtd|
p "#{mtd}: #{sp1.bitmap.font.send(mtd)}" if sp1.bitmap.font.respond_to?(mtd)
end
# Yeah... laziness at it's best! :P
# Didn't want to bother with sound effects much...
DataManager.load_normal_database
loop do
Input.update
Graphics.update
sp1.update
sp2.update
SmoothAnim.update
if Input.trigger?(:LEFT)
Sound.play_cursor
id = fonts.index(sp2.bitmap.font.name)
id -= 1
id = fonts.size - 1 if id < 0
sp2.bitmap.clear
sp2.bitmap.font.name = fonts[id]
p "font name: #{sp2.bitmap.font.name}"
sp2.bitmap.draw_text(0,0,ww,hh,txt,al)
elsif Input.trigger?(:RIGHT)
Sound.play_cursor
id = fonts.index(sp2.bitmap.font.name)
id += 1
id = 0 if id > fonts.size - 1
sp2.bitmap.clear
sp2.bitmap.font.name = fonts[id]
p "font name: #{sp2.bitmap.font.name}"
sp2.bitmap.draw_text(0,0,ww,hh,txt,al)
end
end
Just run it, make a screenshot, use any image editing program to magnify the image, and check the text positions.
The yellow area is supposed to be the area reserved for the text.
Thanks for your explanation. Now I understand what you mean.
However there is still one bug in sprite flashing. If you set flash color to nil, then the sprite will disappear. In RGSS, the sprite will keep disappearing for the rest of frames, while in RGD the sprite will disappear and gradually appear, which is not expected in some animation effects.
confirmed (ish)
I get a 1px difference *on the vertical*, though...... BUT, RGD's render is more accurate than the original!
Can I disable text compression? I never understood the purpose of the original Game.exe text compression. I do not usually see this in other engines. Why should the text be compressed if this makes it difficult to see? And the current compression of the RGD was not good. Often when I set the width of the text equal to the size of the window, for example, the text barely arrives in the middle of the window and is already compressed.
Default (Game.exe original):
RGD:
All the texts in my project were messed up, they were not messed up in the original Game.exe and I did not understand the logic used in the current RGD to fix this. I really do not know what to do, because now I need to put random values throughout the project so I do not have this problem. Therefore, it would be nice to be able manually turn off text compression.
Default (Game.exe original):
RGD:
All the texts in my project were messed up, they were not messed up in the original Game.exe and I did not understand the logic used in the current RGD to fix this. I really do not know what to do, because now I need to put random values throughout the project so I do not have this problem. Therefore, it would be nice to be able manually turn off text compression.
Original thread: https://forums.rpgmakerweb.com/threads/rgd-directx-implementation-of-rgss3.95228/