Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 55 posts ]  Go to page Previous  1, 2
    Nuri Yuri
  Mon Jan 06, 2014 9:08 pm
Nyu~
User avatar
Member

Party Mascot

Location: France
Don't do it with its ID :b
Expand to see the code.

Bitmaps should probably have a different structure in RGSS2, checks it by reading the memory of a Bitmap object ^^'

_________________


Top Top
Profile      
 

    Drago del Fato
  Mon Jan 06, 2014 10:04 pm
Dark Slayer
User avatar
Member

L1 Slime

Location: Somewhere with a heater on...
You can also use Ruby macro Data_Get_Struct for getting DATA from Ruby objects (copied from ruby.h from include folder in source code of ruby interpreter):

Expand to see the code.


Basically getting the data from ruby variables would amount up to:
Expand to see the code.


Data types are basically memory pointers to C structures (or C++ objects) stored inside Ruby variable, this way you can make Ruby class wrappers of C structures and not worry about where they are referenced. This one is really vaguely explained inside ruby documentation (especially stuff when making your own Native API Ruby classes. I had to find a lot about it by hand).

_________________
RAGE - A 2D Game Engine with Ruby scripting!. 0.0.3 - beta out!
Check it out here! https://github.com/ArekX/RAGE#releases


Visit my little scripts corner here. :)


Top Top
Profile      
 

    Xilef
  Mon Jan 06, 2014 10:18 pm
User avatar
Staff

Big Dumb Guy

Location: UK
Nuri Yuri wrote:
Don't do it with its ID :b
Expand to see the code.

Bitmaps should probably have a different structure in RGSS2, checks it by reading the memory of a Bitmap object ^^'


I tried without ID, which nearly works, but the struct looks totally misaligned so I suppose that the struct format has changed between versions


Top Top
Profile      
 

    Xilef
  Sun Jan 12, 2014 3:43 pm
User avatar
Staff

Big Dumb Guy

Location: UK
I'm bumping this with some news.

In a continuation with my bitmap experiments in this exe, I made a union to look through the bitmap class to try and find something related to my input bitmap.

I gave the function the title screen background bitmap (544 x 416 in resolution) and made a union that had 16 32bit integers against 16 pointers to the same union type, I search around a bit for the resolution of the image and found this:
Image

So I'm going to write an RGSS3 bitmap struct mapping now

EDIT: Looks like this isn't a consistent value, changes every now and then to large numbers, so it must be pointing to some other memory location, oh well.


Last edited by Xilef on Sun Jan 12, 2014 4:18 pm, edited 1 time in total.

Top Top
Profile      
 

    Drago del Fato
  Sun Jan 12, 2014 4:08 pm
Dark Slayer
User avatar
Member

L1 Slime

Location: Somewhere with a heater on...
Hmm... [4], [6] and [14] look like pointer values, [12] and [13] are 99% bitmap width and height. [2] might be a color... kinda looks like one. :)

_________________
RAGE - A 2D Game Engine with Ruby scripting!. 0.0.3 - beta out!
Check it out here! https://github.com/ArekX/RAGE#releases


Visit my little scripts corner here. :)


Top Top
Profile      
 

    Xilef
  Sun Jan 12, 2014 4:28 pm
User avatar
Staff

Big Dumb Guy

Location: UK
I believe it's a pointer to something else as it changes to weird values every other launch of the game, so it could be anything unfortunately.


Top Top
Profile      
 

    Nuri Yuri
  Sun Jan 12, 2014 5:15 pm
Nyu~
User avatar
Member

Party Mascot

Location: France
RGSS3 bitmaps are the same as RGSS1 bitmaps :
Image
I did :
Expand to see the code.

_________________


Top Top
Profile      
 

    Xilef
  Sun Jan 12, 2014 6:14 pm
User avatar
Staff

Big Dumb Guy

Location: UK
The RGSS1 bitmap functions really don't work for me, the bitmap header is always an invalid pointer and the adjacent pointers don't match as the header either


Top Top
Profile      
 

    Nuri Yuri
  Sun Jan 12, 2014 9:41 pm
Nyu~
User avatar
Member

Party Mascot

Location: France
Oh.
How do you called it ? Can you send me the code ?

_________________


Top Top
Profile      
 

    Xilef
  Sun Jan 12, 2014 11:15 pm
User avatar
Staff

Big Dumb Guy

Location: UK
Aha I got it working, I didn't realise that the first argument for Global functions is the calling module, what I was doing was shifting around the pointers to find the bitmap, I added param 1 to the function and now it all works.

Guess that teaches me to learn Ruby before trying to dick around with it, sorry for being sucky, I'll package up and release what I've done.


Top Top
Profile      
 

    Nuri Yuri
  Sun Jan 12, 2014 11:33 pm
Nyu~
User avatar
Member

Party Mascot

Location: France
:b
I got a similar problem when I started to extend ruby :3

_________________


Top Top
Profile      
 

    Xilef
  Mon Jan 13, 2014 12:48 am
User avatar
Staff

Big Dumb Guy

Location: UK
This is cool:
Image

So now I can look into my plan of having OpenGL target given RPG Maker 'Pictures' as a frame-buffer for rendering.


Top Top
Profile      
 

    Injury
  Mon Jan 13, 2014 1:56 am
Ṱ̻̘o҉̸̴̮̬͉o̹̬̰ M̠͍͍͡a̧̺ǹ͍̝y̢̞̮̯ C̳͚͇̻̬͝o̴̡̲̼͕ͅo̶̢̧̠̫̹̳̬̣̭k̶̻̫̯s̴̰͖̭̟̱̯̀͜
User avatar


Generic Townsperson
Awesomeness! I can't wait to see what comes out of this!


Top Top
Profile      
 

    Xilef
  Tue Jan 14, 2014 12:04 am
User avatar
Staff

Big Dumb Guy

Location: UK
I should make a new thread about the OpenGL stuff as it's a separate project to the custom Game.exe source code.

EDIT: Actually, where would I make a thread about this? Can't find a section that would suit it...

Is there scripts in development?

Anyway, for now:
battleworldrpg.net/hbgames/GLtest2.zip

Load up the game (Uses a custom Game.exe, so warning about that) and talk to the girl, she'll show a picture that will quickly be replaced with an OpenGL frame buffer

That is a very basic OpenGL test, what it does is replace the update for any game picture with the draw call that is inside the custom Game.exe (Or xiGame.exe, I left that one in there :U)

It's VERY rough and basic, at the moment it just draws that triangle with the 3 vertices set to colours that have an alpha of 0.5f.

To repeat; the plan is make it so you can target any game picture as if it's a 3D buffer, draw your crap to it and then display it using picture as you want, from this we can start looking into post-processing shaders (FXAA in RPG Maker, haha) and cool screen-space effects like zoom in with a bilinear filter (At the moment I have it set to nearest neighbour filtering).


Top Top
Profile      
 

    Amy
  Wed Jan 15, 2014 12:33 am
User avatar
Staff

Big Dumb Guy
Quote:
EDIT: Actually, where would I make a thread about this? Can't find a section that would suit it...

I'm not too sure... so I'll leave it up to you to decide if you want it in scripts, programming, projects or completed games.

I mean, we have a few things (Dargor's FF for example) that could fit together, but not enough to fill a board I don't think.

It's "extending RPG Maker" I guess.


Top Top
Profile      
 

    Xilef
  Wed Jan 15, 2014 8:43 pm
User avatar
Staff

Big Dumb Guy

Location: UK
I'll make a thread in Projects in Development then, I plan to make a sort of API for doing post-processing rather than a complete scripting system.


Nice to have got everything working, though
Image


Top Top
Profile      
 

    natinusala
  Mon Feb 02, 2015 8:21 am
Member

L1 Slime
The link is down, could you update it ? Also, would there be a way to have a custom Game.exe for RPG Maker XP ? Would this one work if I adapt it ?

Thanks for your work !


Top Top
Profile      
 

    Xilef
  Mon Feb 02, 2015 2:09 pm
User avatar
Staff

Big Dumb Guy

Location: UK
The original website is gone now.

Writing custom Game.exe's isn't as useful as one would think, it may be better to go the way of making custom DLL's.

Sorry!

In the future I may make a cleaner version of this tutorial


Top Top
Profile      
 

    natinusala
  Mon Feb 02, 2015 3:22 pm
Member

L1 Slime
Actually I would like to edit the icon, get rid of Game.ini and add a launcher before the actual game, is that possible ?


Top Top
Profile      
 

    Xilef
  Mon Feb 02, 2015 6:05 pm
User avatar
Staff

Big Dumb Guy

Location: UK
natinusala wrote:
Actually I would like to edit the icon, get rid of Game.ini and add a launcher before the actual game, is that possible ?

You could achieve this by having another launcher application that launches the normal game.exe when you click "play" or something.

You could even parse command line arguments to Game.exe from the launcher so you could prevent a player booting the game from Game.exe directly or you could parse in arguments depending on the settings given in the custom launcher.


Top Top
Profile      
 

    natinusala
  Mon Feb 02, 2015 6:34 pm
Member

L1 Slime
Sounds interesting, how could I get the parameters from RGSS ?


Top Top
Profile      
 

    Xilef
  Mon Feb 02, 2015 6:55 pm
User avatar
Staff

Big Dumb Guy

Location: UK
If you are familiar with the Win32 API and its RGSS class you can get command line arguments with this;
Expand to see the code.

That will return the startup string, you'll need to do split the startupString into the components to get the arguments.

Once you split it up into multiple strings, you just need to match your given argument to one of those strings and that's how you know if it exists.

It should be in order too, so you can test for a key and presume the next string is the value for that key.


Top Top
Profile      
 

    natinusala
  Mon Feb 02, 2015 7:15 pm
Member

L1 Slime
Okay, thanks :)


Top Top
Profile      
 

    terabin
  Tue Feb 10, 2015 1:05 pm
Member

L1 Slime
Can you make a new link? plis.


Top Top
Profile      
 

    Xilef
  Tue Feb 10, 2015 1:25 pm
User avatar
Staff

Big Dumb Guy

Location: UK
terabin wrote:
Can you make a new link? plis.

I will make a new download when I improve this project. At the moment I think too many people are using my Game.exe source code without enough programming knowledge to know what to do with it, so I'd rather re-write it so it is more friendly for people to use and remove the current version in the meantime.

Like I said to others before, it is very likely that you are able to get the behaviour you want without having to create your own binary.

On that note, I am going to lock this thread.


If you want a feature and you don't know if it needs a script or an event please make a thread in RPG Maker Support viewforum.php?f=247 and we can help you there.
If it does seem like a custom Game.exe is the solution to a need, then someone may make one for you based on what you need.


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 55 posts ]  Go to page Previous  1, 2


Who is online

Users browsing this forum: No users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group