Author Topic: [WIP] Rpg.NET  (Read 3202 times)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
[WIP] Rpg.NET
« on: July 14, 2014, 11:25:55 PM »
    With the discover of how to export methods from managed .NET assemblies, and now the discover of how to manipulate RGSS Bitmaps from within a managed .NET assembly, I can now do all sorts of things that I have only dreamed of before, using my favorite programming language: C#.

    For the past few days, I have been working on a library to use in conjunction with script that can add all sorts of various improvements and enhancements to RPG Maker. So far I have implemented a few general "utility" methods, and have been focusing a lot on extending the Bitmap class.

    So far, this is what I have:

(click to show/hide)

(click to show/hide)

What I was hoping to get from this thread was some feedback and ideas on other things that could be implemented. I already have a few ideas that I already have plans for, or have already begin implementing, which I will list here, but please feel free to share your thoughts.

(click to show/hide)

(click to show/hide)
[/list]
« Last Edit: July 16, 2014, 08:15:11 PM by ForeverZer0 »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Spaceman McConaughey

  • Legit Poo Poo Man
  • Lexima Warrior
  • *******
  • Posts: 2002
  • LV: 46
  • Gender: Male
  • muh murph
    • View Profile
    • Titties, titties, and more titties!
Re: [WIP] Rpg.NET
« Reply #1 on: July 14, 2014, 11:29:00 PM »
  • Tilemap rewrite to finally make a good custom resolution system without the performance loss and graphical errors

I love you so fucking much, dood. <3

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [WIP] Rpg.NET
« Reply #2 on: July 15, 2014, 12:20:05 AM »
  • Setting the resolution
  • Added methods to get/set the saturation, brightness, contrast, and gamma
  • Save a bitmap as *.jpg, *.png, *.gif, or *.bmp
  • Implemented draw_arc function
  • Implemented draw_line function
  • A "snapshot" function that returns a copy of the current client area of the game as a Bitmap
I need this in my life

Offline PhoenixFire

  • Moderator
  • Astral Trancist
  • ***
  • Posts: 918
  • LV: 6
  • Gender: Female
  • ~That's an interesting notion, in it's own way~
    • View Profile
Re: [WIP] Rpg.NET
« Reply #3 on: July 15, 2014, 12:22:01 AM »
If you can manage to get networking to work without lag, AND, really easy to implement to the non-scripter scripters (basically, those of us that can read a script, kind of understand it, troubleshoot it on our own, but don't write our own and need help sometimes), well, then I would probably send you  a nice little chunk of whatever profit is made off of any game I make with your stuff in it. You never cease to amaze me sir.
Next off, how to create a first person shooter using microsoft excel.

<Remember when computers had turbo buttons?

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [WIP] Rpg.NET
« Reply #4 on: July 15, 2014, 12:38:46 AM »
(click to show/hide)

<3
« Last Edit: July 15, 2014, 12:47:05 AM by LiTTleDRAgo »

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [WIP] Rpg.NET
« Reply #5 on: July 15, 2014, 12:47:40 AM »
question, why would you need a bitmap from a .psd?

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [WIP] Rpg.NET
« Reply #6 on: July 15, 2014, 12:58:36 AM »
Will Do:
  • tilemap with zoom & tone change features
  • bitmap anti aliasing
  • get bitmap from *.psd & *.tiff function

Maybe In the Future:
  • Networking

Probably Not:
  • get bitmap from *.psd & *.tiff function
  • draw_3d (from 3dmax / blender) function

As far as 3D goes, I highly doubt. It would be easier to simply add RGSS support to an existing 3D game maker.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline winkio

  • Epiq
  • Administrator
  • Guardian of Chaos
  • *****
  • Posts: 4505
  • LV: 199
  • Gender: Male
  • I am lying.
    • View Profile
Re: [WIP] Rpg.NET
« Reply #7 on: July 15, 2014, 01:16:42 AM »
these are all off the top of my head, feel free to choose which ones you want:

lighting / shadows
particle effects
animated color fills (invert, rainbow, etc.)
HUD (because it updates every frame performance can be an issue in Ruby)
outlines / tooltips (think quest icons from MMORPGs, teammate outlines from Left4Dead, etc.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3204
  • LV: 386
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [WIP] Rpg.NET
« Reply #8 on: July 15, 2014, 01:24:17 AM »
Well I look forward to that tilemap rewrite 'cuz I've been having difficulties trying to find a universal implementation that works for both XP and XPAce. But I'm pretty sure it's the sprites that are the problem of performance, not the bitmaps.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [WIP] Rpg.NET
« Reply #9 on: July 15, 2014, 01:59:19 AM »
ah, I forgot to include mouse wheel function to suggestion
http://www.mundorpgmaker.com.br/forum/index.php?topic=10055.0

question, why would you need a bitmap from a .psd?

because I think it probably will save time, instead save as png for every edit, you can save the file as it is for just CTRL + S

*.psd &

oh well....

Offline Wecoc

  • Transcended Spirit
  • ***
  • Posts: 108
  • LV: 45
  • Gender: Male
    • View Profile
    • Mundo Maker
Re: [WIP] Rpg.NET
« Reply #10 on: July 15, 2014, 04:15:34 AM »
This is REALLY epic!

(click to show/hide)

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [WIP] Rpg.NET
« Reply #11 on: July 15, 2014, 07:11:48 AM »
actually that's probably not an impossible idea. if you can use window hooks and manipulate bitmaps than you should be able to change the window icon.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [WIP] Rpg.NET
« Reply #12 on: July 15, 2014, 08:41:39 AM »
Yeah, its an easy thing. I think there is even a simple API function for it.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [WIP] Rpg.NET
« Reply #13 on: July 15, 2014, 10:40:34 AM »
There is. You can load the icon image and get its handle like this:

Code: [Select]
hIcon = (HICON)LoadImage(NULL, "new_icon.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
And then just change it.

Code: [Select]
SendMessage(windowHWND, WM_SETICON, ICON_SMALL, hIcon);
In other words: This can be done with play Win32API. And you have to get the window handle. And constants are not there in Ruby so you have to use their numeric values.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [WIP] Rpg.NET
« Reply #14 on: July 16, 2014, 02:04:42 AM »
After a little looking into it, adding support for opening *.psd files is going to be added.
Obviously due to the size of *.psd files it will be slower to open them than a *.jpg or *.png, but at least for debugging purposes it can be used.

EDIT:
Implemented loading Bitmap's using from *.psd format. It was actually much simpler than I anticipated.

For some reason, the edits I make to fix the BB code in the OP do not save, and the formatting is off, so I apologize.
« Last Edit: July 16, 2014, 06:21:10 PM by ForeverZer0 »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [WIP] Rpg.NET
« Reply #15 on: July 19, 2014, 09:06:56 PM »
* DOUBLE POST *

Mwahahaha. Basic particle system now working. Not a single loss in frame-rate.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [WIP] Rpg.NET
« Reply #16 on: July 19, 2014, 09:31:05 PM »
That is sick f0. KK20 and I used an existing particle system which caused a noticeable drop in frames in maps that used it.
Also, what exactly do you mean by HUD? Is there some kind of default HUD that I'm not aware of xD ?

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [WIP] Rpg.NET
« Reply #17 on: July 19, 2014, 09:55:40 PM »
That is sick f0. KK20 and I used an existing particle system which caused a noticeable drop in frames in maps that used it.
It's all about how the drawing is implemented. Directly accessing the memory of bitmaps without any converting, using buffers, and drawing all once is what I have found successful. I am not working with actual Bitmap objects, but merely the area on the RAM where they are located. They are simply stored as a long line of bytes, where every 4 bytes is a color in BGRA format, so knowing that, a lot of manipulation can be done without any casting/converting. I haven't used anything other than GDI for a lot of drawing methods, and I simply copy the C# Bitmap's memory into the place of RGSS's Bitmap's memory.

Also, what exactly do you mean by HUD? Is there some kind of default HUD that I'm not aware of xD ?
No, there is no existing HUD, but I could probably implement some sort of API to handle the drawing of a HUD.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [WIP] Rpg.NET
« Reply #18 on: July 19, 2014, 10:10:38 PM »
Ah that sounds like the complicated stuff that kk20 is doing. I know nothing of casting D:
No, there is no existing HUD, but I could probably implement some sort of API to handle the drawing of a HUD.
Ah I see. Combined with your bitmap methods, this could replace my entire HUD xD