[RGD] DirectX implementation of RGSS3

Discussion in 'Useful Development Tools' started by invwindy, May 13, 2018.

  1. BCj

    BCj Veteran Veteran

    Messages:
    1,440
    Likes Received:
    679
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    I spied some updates/addons on the chinese forum. Any updates coming here too? :D
     
    Romanticist likes this.
  2. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    Oh sweet! I'll have to go check that out :kaojoy:
     
  3. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    @BCj
    Huhh? What updates? Where? I don't see any updates on that forum linked in the opening post.

    Btw, I found several errors with the mouse cursor while working on a project.
    1. The set_ratio method won't work for not-round float numbers, it only works if the number is round. Needless to say, this breaks the mouse for full screen mode or for resized windows (depending on the scale ratio).
    2. Additionally, full screen mode mouse doesn't seem to recognize the real position of the game screen, and it reads the co-ordinates from the top-left corner of the screen instead.
    3. The description of the scroll method is wrong in the documentation on that forum. This part: "When the scroll is not in operation, this number will remain on its previous value." is not true. The number will reset to zero on it's own. The method is still usable and working fine, just not how you would think by reading that description.
    I managed to fix these issues myself, just wanted to notify them here, in case some people are interested in using these mouse features.
     
  4. BCj

    BCj Veteran Veteran

    Messages:
    1,440
    Likes Received:
    679
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
  5. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    "Performance of Bitmap operators is slightly lower than RGSS3, because of extra overhead when updating modified texture to GPU."

    Is this why my game lags like crazy with my Zeus lighting script? My computer is 5 years old but can run games like Skyrim pretty well, to add some perspective, but my game lags a lot whenever walking near lights.
    If this is the case, then that really sucks because I love the "nearest neighbor" upscaling of this script, and also the fact that it isn't connected to every other RGSS3 game on the PC. :frown:
     
  6. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    @Romanticist
    Why don't you simply use the lighting script that was made for RGD instead? It's much more advanced than Zeus', at least from what I saw so far from both lighting systems.

    @BCj
    I don't see any updated versions there, it's still on 1.3.2. Unless you mean something hidden in between those 20 pages of posts, haven't checked much there, just the first and last pages.
     
    Romanticist likes this.
  7. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    That is a good question and I am considering it. However, I've already made lots of custom lights and events and common events using Zeus' light script and I wasn't ever planning on removing it (which was a mistake, it seems). But if there's no other way, then I guess I'll have to take up the extra work and totally overhaul the lighting :kaosigh:
     
  8. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    What is the possibility that joypad control input could be feasibly implemented?
    EDIT: And... it's actually in the documentation. Yikes! Sorry.
    I wish I could delete this post but... oh well :p I can't.

    EDIT2: You know what, I'll actually put this post to good use:
    When in Fullscreen mode, is there a way to disable Window Resize? Because when you resize the window in Fullscreen, the game crashes. So if Window Resize could be disabled only when in Fullscreen, that'd work great.
    Furthermore, adding the F1 menu to the title screen would be epic. Moreso if it could be opened during every scene in the game but if it was at least added to the title menu, I'd be happy. Or, if it could be opened in the default main menu?
     
    Last edited: Sep 5, 2019
  9. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    You could try this little snippet:
    Code:
    class << Graphics
    
      alias fix_fs7761 resize_window
      def resize_window(*args)
        return if self.is_fullscreen?
        fix_fs7761(*args)
      end
    
    end
    Place it anywhere you want.
    This should prevent the window resize if the game is in fullscreen mode.
     
    Romanticist likes this.
  10. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hey, thanks! That works almost perfectly. Would it also be possible to disable the actual window resize options too though? You can still change the window size -- it won't actually change while in fullscreen, so therefore it won't crash the game, but when I exit fullscreen after I 'changed'the window size, the window size won't be changed, yet it says that it was. If that makes sense?

    EDIT: I'm asking a lot of questions, sorry about that, but what are the specs for RGD to run smoothly? I'm playing the lighting test demo and it still lags a lot on my computer. My computer has 8GB ram and i5 2.60GHz processor. Should that be enough to run the game smoothly? And if not, isn't that overkill for an RM game? I wonder how powerful the average RM player's computer is, because I don't want to release a RM game only for majority of my players to not get a smooth experience :kaodes:
     
    Last edited: Sep 6, 2019
  11. Heirukichi

    Heirukichi Veteran Veteran

    Messages:
    1,235
    Likes Received:
    492
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMVXA
    Specs greatly depend on how the code is written and optimized. A poorly written algorithm might be heavy even on a 9th generation i7, it matters little if the game is written using RM or anything else. The same goes for memory usage, if you write the code so that you have a memory leak there is no amount of RAM that is going to save you.

    In the case of Zeus's script, it puts a heavy toll on the CPU. As for the memory...well, you could run your game and check how much memory it is using. I was already able to make RGD run smoothly many updates ago, and on a much worse machine at that. Unless you have tons of things to load into memory, everything else comes down to how you optimize the program, but - and this is especially true for RM communities - people often do not care (or care too little) about optimization. They often think that because one thing does what it is supposed to do, it is fine, but actually if you start piling up inefficient algorithms one after another your game is going to be incredibly slow, even if it is a RM game.
     
    Romanticist likes this.
  12. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    What about the RGD Lighting script? Is that poorly optimized? How well does it run on your computer?
    Are there any lighting scripts that don't run poorly? :kaocry:
     
    Last edited: Sep 6, 2019
  13. Heirukichi

    Heirukichi Veteran Veteran

    Messages:
    1,235
    Likes Received:
    492
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMVXA
    Unfortunately, I cannot give you a proper answer because I did not have a chance to check the RGD Lighting script. Because of that I do not know how well optimized it is neither do I know how well it runs on my computer.

    Lighting is not exactly light (this sounds as a joke, really), but even then there are differences between different algorithms, just think about the games from the Dark Souls saga. The lighting algorithm in the first one was incredibly heavy, but it was much lighter in the sequel. This is why I think that more efficient algorithms exist, I am not a fan of lighting so I usually avoid using those kind of scripts. Maybe somebody else will be able to help you more on that hand.

    However, keep in mind that Bitmap operations on RGSS are slow, and in RGD - as stated in the documentation - they become even slower, although RGD improves a certain number of other things. Anything that performs Bitmap operations is bound to be even slower, especially if it performs a lot of them.
     
    Romanticist likes this.
  14. Romanticist

    Romanticist Veteran Veteran

    Messages:
    187
    Likes Received:
    97
    First Language:
    English
    Primarily Uses:
    RMVXA
    Man, this is a hard pill for me to swallow :kaodes: My game has lots of ambient lights and I had plans for many more.
    I did also test it with normal RGSS player and it did run a little better but still had noticable lag. They weren't kidding when they said that RGD was only slightly worse with Bitmap operations :rswt
    Well, I thank you for your detailed response, truly. I'm gonna have to find some workaround. Gonna try other lighting scripts first, I think. May just end up removing lighting altogether (sadly).
     
  15. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,698
    Likes Received:
    374
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    I just found this thread.
    I grabbed the file and put it in my project folder. ran the game.exe it started up with my splash screen and then the title screen. I selected new game and the game closed. No errors, just completely closed.
    I'll have to do some testing. May be a script I have or loaded dll file.
    Khas lighting, f1 -f12 block, messageintercept, trgssx. are extra files used with scripts.
     
  16. BCj

    BCj Veteran Veteran

    Messages:
    1,440
    Likes Received:
    679
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    It works with Luna Engine for me, so that can't be the culprit for it not loading. I did notice excessive lag in the battles with Luna Engine/Yanfly symphony, however.
     
  17. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,698
    Likes Received:
    374
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    Seems to be ok with luna, but I have many other scripts. I had to remove shaz mouse, Khas lights, tidloc and VE scripts and then I was able to start the game and get to the menu. selecting items, causes it to close again. This means there is a lot of scripts that this is not compatible with.
    It will not work for me.
     

Share This Page