[RGD] DirectX implementation of RGSS3

They say 2/72 is false positives most likely though.
I just find it strange, since I have no issues whatsoever and I have been using RGD.

Hell, for the heck of it, I ran the normal(!) rpg vx ace game.exe through virustotal, and it said it was malicious too. Ehm?

d0ec98e24449c5e817268703c5b01eaf.png

Interesting, have you tried publishing your game to Steam with it?
Those problem behaviours from above occured when after approval of Steam.
If you had, I'll tell to my friend about tried another thing after of it.
it is known that Steam sometimes re-packs uploads to their store so the pack is compatible with their update systems, but if they modify the executable as well, that's against their own EULA's.

if we're talking about the same file, contrasted before and after uploading to Steam, and there's a difference in their functionality, then that's modification by Steam, and that's illegal.
I don't think they'll be greedy to the point of modifying contributions to their store.
Interesting, have you tried publishing your game to Steam with it?
Those problem behaviours from above occured when after approval of Steam.
If you had, I'll tell to my friend about tried another thing after of it.

No, my game isn't steam-ready, unless I'd make it an veeeeeeery Early Access. But not going to do that.
It would be good to get this cleared up soon. False positive or not, I find it rather unsettling how this was left off with a cliffhanger given how the problem was described.

I'm almost positive the last thing anyone would want is their long term passion project being released, only to have its image ruined by alleged malware. I love how well RGD has worked so far, and I would like to keep going forward with its usage.

Perhaps I'm just being paranoid, but this seems like something important to address. I speak out of concern for a wonderful addition to VX Ace.
Jul 12, 2020 – 1.5.4
  • Fixed sprite visibility as a child.
  • Fixed a crash on disposing a sprite when it has any children.
  • Fixed incorrect display on looped tilemap.
  • Console now supports multiple line input.
  • Fixed a memory leak on incorrect Tilemap disposal.

Sorry I still can't fix all the incorrect tile bugs. But I will if I have any idea about the remaining bugs.
Actually, I found another.. thing 🙁

I'm using 2 scripts that utilize bitmaps/images. They work fine in VX Ace, but when using RGD, the game just shuts down.
Is there a way to fix that?
Image operations may not fit for RGD because RGD has different internal bitmap structures.

1) A small "mistake" that I am reporting if someone has not yet spoken or noticed. The texts are not exactly in the center, they are always a little more to the left:
SYNvRP3.png


The code I'm using to draw the text is:
Code:
self.bitmap.draw_text(self.bitmap.rect, 'Inventário (I)', 1)


2) Is there a way to check that the middle mouse button is being pressed down and up? This would be useful for scroll bars.
I'm not sure about the detailed effects of parameters in text drawing function. I even find something like bugs in GetGlyphOutline.
For the middle key, :M may work as :L and :R.

If possible, it would be interesting to be able to draw text and images directly in the scene update, without having to create a Sprite, the way that DirectX 9 normally works, for those who want better FPS performance. There would be 2 extra functions: one for text and one for images.
Some old APIs draw text directly on screen. But they are not for d3d and I am not going to add them in RGD. If you need better performance, "text sprites" may be a good solution, caching each character in one bitmap and use a sprite to display it. RGD is ready for many sprites on the screen. This is especially useful if you are working on phonogram languages. Some other languages including Chinese and Japanese take more time to generate characters but it still works good enough on enhancing performance.

Hey my friend reported to me recently this modified program contains Trojan virus.

After the Steam build review with this has been completed and approved for deployment on Steam, my friend has experienced multiple weird behaviours of Windows.

View attachment 149740

- Chrome browser is keep changing font size repeatedly.
- Discord's screen started not stable to running. (since Discord is Chromium based program)
- Resolution changed automatically.
- Unintall and reinstalled some program in Control panel, but actually installed outdated program.
- Steam community and my profile page is not stable and when using Chinese characters will makes incorrect glyph to display(like )
- Tried Google drive backup, this changes file name into real name.
- Even after formatted Windows, it's still have weird behaviours such as can't right click and unknown processes.
Please try download the newest version. I have just updated to 1.5.4.

I have published a game on Steam before using RGD, "Yet Another Hero Legend" () and have not got the anti-virus issue. Does the virus already exist on your friend's working environment?
Image operations may not fit for RGD because RGD has different internal bitmap structures.

Thank you for your answers. Could you tell me how RGD draws bitmaps, what is different from normal VX Ace?
I may not understand it, but if I know what is different then perhaps I can hire a scripter than can rewrite/change the scripts that use bitmaps, so they do work with RGD.
Thank you for your answers. Could you tell me how RGD draws bitmaps, what is different from normal VX Ace?
I may not understand it, but if I know what is different then perhaps I can hire a scripter than can rewrite/change the scripts that use bitmaps, so they do work with RGD.
A simple rule is that, if you use external DLLs to handle bitmap, then the script is likely not to work with RGD. RGD stores the bitmap data in a DirectX texture instead of an RGBA color array in RGSS. If the script is not relying on other DLLs or not calling any API to modify the bitmap, it would be OK to use it with RGD.
Ah, yes, I can understand that. My status screen calls the bitmap from a .dll, so that will crash.

My savescreen however, uses a different bitmap call. As far as I can tell, it doesn't use a .dll nor an API.

This is the bitmap script it requires:

Spoiler: scipt
Code:
#----------------------------------------------------------------------------
class Bitmap
  #--------------------------------------------------------------------------
  def ptr
    @ptr  ||= DL::CPtr.new((
    addr = DL.dlwrap(self) + 16
    cptr = DL::CPtr.new(addr)
    addr = (cptr[0,4].unpack("i"))[0] + 8
    cptr.free
    cptr = DL::CPtr.new(addr)
    addr = (cptr[0,4].unpack("i"))[0] + 16
    cptr.free
    cptr = DL::CPtr.new(addr)
    addr = (cptr[0,4].unpack("i"))[0]
    cptr.free
    addr), width * height * 4)
  end
  #--------------------------------------------------------------------------
  def data_to_hash(id = 0)
    data = Zlib::Deflate.deflate(ptr[0, ptr.size])
    {:id => id, :width => width, :height => height, :data => data}
  end
  #--------------------------------------------------------------------------
  def string_to_data(s)
    ptr[0, ptr.size] = s
  end
  #--------------------------------------------------------------------------
  def self.by_hash(data)
    ret = Bitmap.new(data[:width], data[:height])
    ret.string_to_data(Zlib::Inflate.inflate(data[:data]))
    ret
  end
end
#--------------------------------------------------------------------------
#使用例
#--------------------------------------------------------------------------
def snap_for_thunbnail(w, h)
  src = Graphics.snap_to_bitmap
  dest = Bitmap.new(w, h)
  dest.stretch_blt(dest.rect, src, src.rect)
  src.dispose
  ret = dest.data_to_hash
  dest.dispose
  ret
end

def snap_test
  data = snap_for_thunbnail(198, 140)
  $s = Sprite.new
  $s.bitmap = Bitmap.by_hash(data)
  Graphics.update
  sleep 2
  $s.bitmap.dispose
  $s.dispose
end

Any clue as for why that one isn't working?
Ah, yes, I can understand that. My status screen calls the bitmap from a .dll, so that will crash.

My savescreen however, uses a different bitmap call. As far as I can tell, it doesn't use a .dll nor an API.

This is the bitmap script it requires:

Spoiler: scipt
Code:
#----------------------------------------------------------------------------
class Bitmap
  #--------------------------------------------------------------------------
  def ptr
    @ptr  ||= DL::CPtr.new((
    addr = DL.dlwrap(self) + 16
    cptr = DL::CPtr.new(addr)
    addr = (cptr[0,4].unpack("i"))[0] + 8
    cptr.free
    cptr = DL::CPtr.new(addr)
    addr = (cptr[0,4].unpack("i"))[0] + 16
    cptr.free
    cptr = DL::CPtr.new(addr)
    addr = (cptr[0,4].unpack("i"))[0]
    cptr.free
    addr), width * height * 4)
  end
  #--------------------------------------------------------------------------
  def data_to_hash(id = 0)
    data = Zlib::Deflate.deflate(ptr[0, ptr.size])
    {:id => id, :width => width, :height => height, :data => data}
  end
  #--------------------------------------------------------------------------
  def string_to_data(s)
    ptr[0, ptr.size] = s
  end
  #--------------------------------------------------------------------------
  def self.by_hash(data)
    ret = Bitmap.new(data[:width], data[:height])
    ret.string_to_data(Zlib::Inflate.inflate(data[:data]))
    ret
  end
end
#--------------------------------------------------------------------------
#使用例
#--------------------------------------------------------------------------
def snap_for_thunbnail(w, h)
  src = Graphics.snap_to_bitmap
  dest = Bitmap.new(w, h)
  dest.stretch_blt(dest.rect, src, src.rect)
  src.dispose
  ret = dest.data_to_hash
  dest.dispose
  ret
end

def snap_test
  data = snap_for_thunbnail(198, 140)
  $s = Sprite.new
  $s.bitmap = Bitmap.by_hash(data)
  Graphics.update
  sleep 2
  $s.bitmap.dispose
  $s.dispose
end

Any clue as for why that one isn't working?

DL::CPtr gets the pointer of an object. Then the following operations in this script are executed using memory address. This explains why it does not work on RGD.
I miss ruby code 🙁
It was just so nice to write :'(
Alright thanks for the explanation. I hope in due time I can find a scripter that gets it to work with RGD.
Under development.
Hope this new feature helps improve your game.

164112sgnty29noeo2eecu.gif

164148jm181i33mzrbd3yn.gif

165052oaprdjear7ajq8n1.gif

live2d5.png
辛苦了。

That looks incredible, most implementations of "Live2D" I've seen in Ace are just glorified spritesheets that nukes the FPS to hell. Looking forward to this. 😊
That looks amazing 😀
native live 2d? ok. thats pretty neat! 🙂
Image operations may not fit for RGD because RGD has different internal bitmap structures.


I'm not sure about the detailed effects of parameters in text drawing function. I even find something like bugs in GetGlyphOutline.
For the middle key, :M may work as :L and :R.


Some old APIs draw text directly on screen. But they are not for d3d and I am not going to add them in RGD. If you need better performance, "text sprites" may be a good solution, caching each character in one bitmap and use a sprite to display it. RGD is ready for many sprites on the screen. This is especially useful if you are working on phonogram languages. Some other languages including Chinese and Japanese take more time to generate characters but it still works good enough on enhancing performance.


Please try download the newest version. I have just updated to 1.5.4.

I have published a game on Steam before using RGD, "Yet Another Hero Legend" () and have not got the anti-virus issue. Does the virus already exist on your friend's working environment?


Thanks for reply, I'll tell your comments to my friends!
I was can't clearfy this behaviour by trust.
But, now I can trust RGD's dev because you answered to me for this issue.

So anyway... I'm not sure but I wonder think RGD's exe is may infected by virus in she's laptop and goes on then infected over laptop...
Unfortunally, she already repairs she's laptop to store, so I can't figure out what's going on she's laptop. (and I really want to know it)

I was tried to ask try it again in virtual machine to my friend.
But she answers 'no', she won't to get risks again by this...
My friend seems not being trust RGD at that point.

Well, anyway... thanks to answer for this issue.
The executable hangs when I press F10.
I was can't clearfy this behaviour by trust.
But, now I can trust RGD's dev because you answered to me for this issue.

So anyway... I'm not sure but I wonder think RGD's exe is may infected by virus in she's laptop and goes on then infected over laptop...
Unfortunally, she already repairs she's laptop to store, so I can't figure out what's going on she's laptop. (and I really want to know it)

I was tried to ask try it again in virtual machine to my friend.
But she answers 'no', she won't to get risks again by this...
My friend seems not being trust RGD at that point.

Well, anyway... thanks to answer for this issue.

That's sad. Hope her laptop goes well in the repair.

The executable hangs when I press F10.

The window loses focus when pressing F10. It could be normal.

Original thread: https://forums.rpgmakerweb.com/threads/rgd-directx-implementation-of-rgss3.95228/