Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 26 posts ] 
    Gust
  Sat Jan 16, 2010 5:28 pm
User avatar
Member


Location: Brazil
RGSS Web Kit
Version: 1.1
By: Gustavo Bicalho


Introduction

The RGSS Web Kit (RWK) was designed to allow simple HTTP access through RGSS. I wanted to download resources from the web, so that's what it does: download resources from the web. However, this isn't a script for people who don't know RGSS, at least some basic stuff. There's no ready-to-use "Scene_ResourceDownloader" or something like that. RWK gives you a way to get online, but it's completely up to you to make it useful.

What you can do with RWK: download resources, send Post data to a server and read the response, send requests with special headers and check the headers of the response.

You can use this to create an Online Ranking, or some kind of chat or bulletin board in your game, or to check and download updates. Like the whole game making thing, it's all up to your creativity.

Remember: this is a HTTP library, not a browser. It won't do everything for you. If you want to access some service that needs cookies, you will have to emulate those cookies by yourself and deal with the HTTP headers. The same applies to everything else beyond the normal "Get" and "Post like a web form". RWK gives you only the basic stuff.

The Demo

RWK Version 1.1 Demo has an interesting system to show the Kit's power: GusForum, an in-game forum system. It uses AWorks Input scripts for user input, REXML for XML processing (in external files) and RWK to connect to a web server and, using simple PHP scripts (that you can download below to install in your own web server), allow users to create threads and send messages that can be seen by other people through the internet.
You are free to use and modify the GusForum scripts, just remember to credit me ;)
You can download the Demo below.

Download

Demo: http://www.gust.projetorpgmaker.com/RWK_1_1/RWK%201_1.rar
RWK Scripts in txt files: http://www.gust.projetorpgmaker.com/RWK_1_1/RWK%201_1_txt.rar
AsyncHTTP.dll Source Code: http://www.gust.projetorpgmaker.com/RWK_1_1/AsyncHTTP.src.rar
GusForum Server Scripts: http://www.gust.projetorpgmaker.com/RWK_1_1/GusForum_Server.rar

Instructions

Download the Demo and copy the scripts of the section named RGSS Web Kit (the Documentation is not necessary) and the AsyncHTTP.dll to your project. The SDK is not needed.
Read the RWK Docs to learn more.

FAQ

Q: Can I use RWK with RPG Maker VX?
A: I created and tested (a lot) the script on XP, but there's no reason it wouldn't work on VX since it's completely independent from all Game classes, it uses only the core Ruby classes... I tested it briefly on VX and it looks like it's OK. There could be some incompatibility somewhere... but I don't think so =P Just remember to copy all the Scripts (the Docs pages aren't necessary) and copy AsyncHTTP.dll from the demo to your VX project.

Compatibility

RWK should be compatible with any normal scripts. The only way you could have a problem is if some script changes classes from the core Ruby library (like class Thread or class Proc), which (I think) is not frequent.

Credits and Thanks

Special thanks to Diovanni "AntiCasper" de Souza, for support and testing.

Terms and Conditions

RWK is released under Creative Commons BY license. That means you must give me credit for the script if you use or redistribute it.


Last edited by Gust on Fri Apr 09, 2010 11:32 pm, edited 8 times in total.

Top Top
Profile      
 

    Amy
  Mon Jan 18, 2010 9:24 am
User avatar
Staff

Big Dumb Guy
Damnit, all the cool stuff comes out when I stop using RPG Maker. Nice work with this, I haven't had chance to try it out but it's certainly useful and looks a nice way of going about it.


Top Top
Profile      
 

    Gust
  Mon Jan 18, 2010 11:16 pm
User avatar
Member


Location: Brazil
Commodore Whynot wrote:
Damnit, all the cool stuff comes out when I stop using RPG Maker. Nice work with this, I haven't had chance to try it out but it's certainly useful and looks a nice way of going about it.


Thanks!

Right now I'm working on a more interesting Demo and on some helper methods that I didn't put in v1.0 because I wanted to release it fast.
So v1.0.1 should be online in a few days and you'll a better example of what you can do with this :)


Top Top
Profile      
 

    Delmaschio
  Tue Jan 19, 2010 10:24 pm
User avatar
Member

OFF-TOPIC
Olá, também sou brasileiro, eu lhe enviei uma PM, duas na verdade, mas parece que estas não foram entregues, não sei porque, bom gostaria muito de conversar com você, tenho um proposta a lhe fazer, você tem e-mail ou MSN?


Top Top
Profile      
 

    Gust
  Tue Jan 19, 2010 11:36 pm
User avatar
Member


Location: Brazil
FYI: Awardspace web host, where I host the page accessed by the demo, seems to be down for a while, so the Demo might not work and you'll see Error 12029. The server should be online again soon.
New demo works ok.


Last edited by Gust on Fri Feb 19, 2010 2:44 pm, edited 1 time in total.

Top Top
Profile      
 

    rey meustrus
  Fri Jan 22, 2010 6:43 pm
Master of Dark Magic
User avatar
Sponsor

Party Mascot
Being unable to open RPG Maker right now, I ask...

What libraries did you use on the back end? Do you have a Socket class? Does it utilize Winsock? Where did you get the code, or did you write it yourself?

EDIT: I see, you made a compiled library and linked it. Could you share the source code for you AsyncHTTP.dll library?

_________________
Image


Top Top
Profile      
 

    Gust
  Sat Jan 23, 2010 2:28 pm
User avatar
Member


Location: Brazil
rey meustrus wrote:
Being unable to open RPG Maker right now, I ask...

What libraries did you use on the back end? Do you have a Socket class? Does it utilize Winsock? Where did you get the code, or did you write it yourself?

EDIT: I see, you made a compiled library and linked it. Could you share the source code for you AsyncHTTP.dll library?


AsyncHTTP.dll uses the WinHTTP library. WinHTTP itself is waaay more powerful but waaay more complex, and I couldn't use it directly in Ruby because I need to give the methods a pointer-to-function, so I made this wrapper that I called AsyncHTTP. I coded it in C using Visual Studio 2008.
If you look at the Documentation of RWK, there is a description of the methods exported by the DLL.

About sharing the sources... well, I could, but they're not commented and may be a little confuse XD Just wait a few days and I will put them in (fairly) good order and post them here, probably together with RWK 1.1.


Top Top
Profile      
 

    BlueScope
  Wed Jan 27, 2010 1:21 pm
The Third Man
User avatar



Location: Germany
This looks very promising indeed... but everything I can think of utilizing this for kind of wants me to be able to access a mysql database with it, which I don't think I could with this... or is the script capable of handling that?

Either way, this is a great script, and I'll stand in the same line as rey and wyatt before me, as in not being able to use RMXP at the time, so posting the scripts in here seperately from the demo would be handy to give you some more fundamental feedback, rather than guesses. ^^

Keep up the good work!

_________________
Image

If you have a slightly positive memory of my Power Shift contest game,
you might be interested in this development screenshot...
More info about that soon!


Top Top
Profile      
 

    Gust
  Wed Jan 27, 2010 7:22 pm
User avatar
Member


Location: Brazil
BlueScope wrote:
This looks very promising indeed... but everything I can think of utilizing this for kind of wants me to be able to access a mysql database with it, which I don't think I could with this... or is the script capable of handling that?

Either way, this is a great script, and I'll stand in the same line as rey and wyatt before me, as in not being able to use RMXP at the time, so posting the scripts in here seperately from the demo would be handy to give you some more fundamental feedback, rather than guesses. ^^

Keep up the good work!


You couldn't directly access the database, but you can make a php (or any language you want) script running on a webserver that accesses the database, get/set the info you want and returns you the data. That's what i do in the demo. (The problem now is that awardspace, where I host the php script, is down for a week, so the demo won't work u.u)
For example, for version 1.1 I'm making a little "forum" that you read and write to from inside the game =D

About posting the scripts: there are a lot of them, and very long documentation. I could make a package with them in txt files, though. I'll do that.

EDIT:
Here they are: http://www.gust.projetorpgmaker.com/RWK1_0_txt.zip
Please read and review =D hahahaha
I tried very hard to make the docs useful and easy to understand. There are a lot of examples to show you want you can do and how.


Top Top
Profile      
 

    Gust
  Tue Feb 16, 2010 12:49 pm
User avatar
Member


Location: Brazil
RWK Version 1.1 Released

I fixed some bugs and added four useful helper methods for parsing GET and POST data and two HTTP Headers that are commonly used. Also, the V1.1 Demo has an interesting system to show the Kit's power: GusForum, an in-game forum system. It uses AWorks Input scripts for user input, REXML for XML processing (in external files) and RWK to connect to a web server and, using simple PHP scripts (that you can download below to install in your own web server), allow users to create threads and send messages that can be seen by other people through the internet. You are free to use and modify the GusForum scripts, just remember to credit me ;)

Also, I now realease the Source Code to AsyncHTTP.dll, for those of you who like some C code.

Downloads

Demo: http://www.gust.projetorpgmaker.com/RWK_1_1/RWK%201_1.rar
RWK Scripts in txt files: http://www.gust.projetorpgmaker.com/RWK_1_1/RWK%201_1_txt.rar
AsyncHTTP.dll Source Code: http://www.gust.projetorpgmaker.com/RWK_1_1/AsyncHTTP.src.rar
GusForum Server Scripts: http://www.gust.projetorpgmaker.com/RWK_1_1/GusForum_Server.rar


Top Top
Profile      
 

    Crazyninjaguy
  Sat Mar 13, 2010 1:04 pm
User avatar
Member

I'd really love to use this, but whenever i set it up to work with my webserver, all i get in the game window is

Error -> Invalid board id

Can anyone help?
I've setup the connect.php and the mysql database, and setup the scripts and executed the sql queries.


Top Top
Profile      
 

    Gust
  Sun Mar 14, 2010 12:07 am
User avatar
Member


Location: Brazil
Oh, oh, sorry.
Here's the problem: You have to create a board in your DB table "board".
Use this code:
Expand to see the code.

Look at the table to see what's the created board ID and use that ID when creating Scene_Board.
My fault, I should have explained that in the instructions.

Let's make something clear: GusForum isn't a "serious" script. I mean, the purpose is just to show one thing you can do with RWK, so I didn't put a lot of effort on making GusForum bug-free (some people already found one bug... try pressing a NUMPAD key). You can use it, but you should probably work on it to make it better before releasing your game.


Top Top
Profile      
 

    Crazyninjaguy
  Sun Mar 14, 2010 4:52 pm
User avatar
Member

That's great thanks, everything connects :)
Just one more problem though.
Whenever i try and post anything, i get this error:

Error Sending: Query Failed

Any ideas on what's wrong?
Thanks in advance :)


Top Top
Profile      
 

    Gust
  Sun Mar 14, 2010 8:39 pm
User avatar
Member


Location: Brazil
That happens when you try to create a thread or send a post to an existing one?
Is there anything in your "thread" table right now?


Top Top
Profile      
 

    Crazyninjaguy
  Sun Mar 14, 2010 10:36 pm
User avatar
Member

This is what's in my Thread table at the moment:

Image

Those are the titles of the threads i sent from the Game.
The messages don't show, and neither do the times, but the Titles do which is weird.


Top Top
Profile      
 

    Gust
  Mon Mar 15, 2010 4:10 am
User avatar
Member


Location: Brazil
Hmm
Are you sure you've run all the sql instructions?
When you create a new thread, it says "query failed" or "insert 2 failed"?
It looks like you are missing the add_post procedure, I think..
It's in the sql.txt file but I copy here:
Expand to see the code.


Top Top
Profile      
 

    Crazyninjaguy
  Mon Mar 15, 2010 8:59 am
User avatar
Member

Sorry about all this :/

I get "Insert 2 failed" now.


Top Top
Profile      
 

    Gust
  Tue Mar 16, 2010 12:43 am
User avatar
Member


Location: Brazil
Crazyninjaguy wrote:
Sorry about all this :/

I get "Insert 2 failed" now.


No problem =]
Have you checked the add_post sql code I posted in the previous post?


Top Top
Profile      
 

    Crazyninjaguy
  Tue Mar 16, 2010 10:08 am
User avatar
Member

Yeah i copied and executed it exactly.
This is a really great script so far!


Top Top
Profile      
 

    Gust
  Sat Mar 20, 2010 2:24 am
User avatar
Member


Location: Brazil
Just to let anyone who see the topic know:
Problem solved, it was an issue with permissions in the hosts database, not a problem with GusForum scripts.
Remeber, when you copy the php scripts to your host, remeber to set the correct user and password at the connect.php file to the ones you use to log into phpmyadmin.


Top Top
Profile      
 

    woratana
  Wed Apr 07, 2010 10:59 am
User avatar
Sponsor

Thanks for making this!

I will be using it soon. :D


Top Top
Profile      
 

    Nadim88
  Sat Apr 17, 2010 5:41 pm
Member

Wow... that's just... great!

But I'm a noob to script, and how can I edit those script? XD

But all that scripts are necessary for that sort of chat room? And how to create a server (I'm a noob, sorry if you find some questions stupid...)?


Top Top
Profile      
 

    Gust
  Sun Apr 18, 2010 2:54 pm
User avatar
Member


Location: Brazil
First of all: you should never edit the script in the "RGSS Web Kit" section (unless, of course, you are an experienced programmer and knows exactly what you are doing). You should only use those classes and methods, without editing them. Read the DOCS to learn what each class/method do.

Second: Yeah, all those scripts in the "Gus Forum" section AND the AWorks input library are needed for that small chat room. But GusForum is actually just a little example of what you could do with RWK... It's not really meant to be used in games. Of course one could use it, but one should work to make it better and more stable. You see, that's why I said in the first post: "this isn't a script for people who don't know RGSS. RWK gives you a way to get online, but it's completely up to you to make it useful".

Third: A server for RWK is any HTTP server. A server for GusForum, though, can be created using the GusForum Server Scripts, available in the first post.


Top Top
Profile      
 

    ,- Chap
  Fri May 14, 2010 1:41 am
Member

Say, I want to make a basic message of the day window in my titlescreen. What is the easiest way to accomplish this? Im no noob at RGSS and neither at PHP, but I just can't figure out how to do that.


Top Top
Profile      
 

    Gust
  Fri May 14, 2010 3:11 am
User avatar
Member


Location: Brazil
Give a look at Example 8. You could do something like this:

Expand to see the code.


Maybe there's some sintax error somewhere, but that's the idea.


Top Top
Profile      
 

    djr
  Wed Aug 06, 2014 2:59 am
Member

L1 Slime
Hi there,

All of the download links are now broken. Any chance this could be re-uploaded? I'd like the DLL source as well.

Thanks


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ] 


Who is online

Users browsing this forum: No users and 7 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