A few questions regarding revlets....

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

A few questions regarding revlets....

Post by shadowslash » Sat Nov 14, 2009 8:53 am

Question 1:
- Is it possible to create a somewhat system for my revlet to be able to load sprites or if not, images to be referenced to. (e.g. I'm trying to make a game and it has characters that has interchangeable headgear, hair and clothing.) I'm thinking of approaching it via a group control but I haven't the slightest idea how to go about doing that? I only need an example on how to implement sprite or image referencing for such a situation.

Question 2:
- From within a revlet, how do I make the browser go to another URL? (e.g. The user clicks on the "Register" button on my revlet and they should be taken to "http://www.mysite.com/register.php".) I already tried the following approach(es) but without any luck:

revGoURL "http://www.mysite.com/register.php"
launch URL "http://www.mysite.com/register.php"

How do I go about doing it? I saw Twist-A-Word from the Facebook Applications (made with RunRev) do it but I can't figure out how to implement it on mine.

Question 3:
- Where can I find an easy reference guide for dealing with SQL tables? I'm afraid I don't have any idea on dealing with MySQL or any other SQL languages but that's what I'm gonna use as a database for the game I'm making. All I need to do is know how to get data from a certain table, add, edit or delete data to certain cells on specified tables. Can you provide me with some getting started SQL scripts for use with Revolution?

Question 4:
- What is the best approach in dealing with multi-user activity through a server? Is it wise to divide the actions taken to 3 or more servers or just create one server program that handles it all? (e.g. login, moving, chatting, etc.)

Question 5: *NEW QUESTION!*
- How would be a fast and resource efficient way of creating maps for the game? I've thought of making a somewhat "map-maker" by creating image controls side by side using tile images for the map but still, that would be extensive to the memory and the users' computers might not be able to handle such a lot of image controls on a single card. Plus there's also the dilemma of layering (objects that are under or over the user's character such as trees and or lampshades). Is it wise to just create one big image and just scroll through it as the user walks and put the trees on top of the user's characters?

Please help me out on this one as when I tried googling about it, I felt like my head's about to explode with all the information that I think I won't need. I just need some specifics not the whole lot. Thanks guys and more power to the ever growing Revolution Community! Image
Last edited by shadowslash on Sun Nov 15, 2009 1:15 pm, edited 2 times in total.
Parañaque, Philippines
Image
Image

RRobert
Posts: 151
Joined: Sat Feb 28, 2009 8:20 pm

Post by RRobert » Sat Nov 14, 2009 5:24 pm

Sounds like you want to create something like Habbo.

Image

1) You could load images via

Code: Select all

put URL "http://www.google.com/logos/wateronmoon09-hp.gif" into Image "Image"
from a revlet and and you could create groups with the group command. Clone them, move them and so on. See the Dictionary for create, group, delete.

2) Try something like this:

Code: Select all

on mouseup
    local tScript
    
    put "tell application " & quote & "Safari" & quote & return & \
            "activate" & return & \
            "set URL of document 1 to " & quote &  "http://www.google.com" & quote & return & \
            "end tell" into tScript
    
    switch the platform
             
        case "Win32"
            # VbScript see Shell.Application, Internetexplorer.Application
            break
             
        case "MacOS"
            get shell("osascript -e '" & tScript & "'")
            break
            
        case "Linux"
            # Open Browser via Bash e.g. firefox http://www.google.com &
            break
             
    end switch
    
end mouseup
3) See w3schools SQL Tutorial and the Dictionary for revOpenDatabase. You also find some examples via the Resource Center.

In your interested I would recommend to access the database from a revlet via a CGI and sanitize the input data for security reasons. You dont want encapsulate your MySQL account data in the revlet.

4) One server should be enough for now. Revlet, CGI scripts, MySQL database. So all you need is a box with Apache, MySQL and Sendmail.

Robert

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sun Nov 15, 2009 11:55 am

Yes, it was something like Habbo but mine is a little less about socializing and more about battling monsters and stuff. So the user can obtain a headgear item, equip it, then see it on his / her character's head so if I'm gonna use the Habbo style, I may need to create individual body sprites with headgears on and with headgears off. That would really be a pain in the neck.

1.
1) You could load images via
Code:
put URL "http://www.google.com/logos/wateronmoon09-hp.gif" into Image "Image"

from a revlet and and you could create groups with the group command. Clone them, move them and so on. See the Dictionary for create, group, delete.
But what about multi-user instances in a single program window? If I clone them say like, to 20 users in 1 window all moving with their own directions, how do I handle it? Wouldn't that slow down the revlet much much?

2.

Code: Select all

        case "Win32"
            # VbScript see Shell.Application, Internetexplorer.Application
            break 
I'm under Windows so I guess this should be the bit for me, but it's commented out? Should I rely on VBScript to opening, say like, a new browser tab? As for Linux, I have absolutely no idea with dealing with linux so I might need more input on that part... Image

3.
In your interested I would recommend to access the database from a revlet via a CGI and sanitize the input data for security reasons. You dont want encapsulate your MySQL account data in the revlet.
This is the first time I've dealt with such a thing as the CGI for revolution so I might be a long long way away from this part but thanks for the link!! I couldn't have known about that link without you posting it here.

4. If I'm to use just 1 server, won't that server get all the hard labor? For example, if 6 users are chatting on 1 map, 7 on the other and so on... And for updating the x and y positions of each character on the whole world of the game. If I am going to continue with just 1 server, what would be the best approach to maintaining that kind of input? Any keywords that I can look up in the revDictionary?
Parañaque, Philippines
Image
Image

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Sun Nov 15, 2009 12:58 pm

shadowslash wrote: 4. If I'm to use just 1 server, won't that server get all the hard labor? For example, if 6 users are chatting on 1 map, 7 on the other and so on... And for updating the x and y positions of each character on the whole world of the game. If I am going to continue with just 1 server, what would be the best approach to maintaining that kind of input? Any keywords that I can look up in the revDictionary?
I guess this is something you do not need to worry about too much. Unless you instantly get a couple of hundret players. In any rate you will just be sending a few bytes, like maybe 500 for a chat message and maybe 20 bytes for the update of a location of one character. The heavy lifting of actually moving the graphic and displaying all stuff is handled client side by the revlet. If you think you will get a couple of hundret users right from start, it might be wise to develop a method serverside, that can redirect to another server for each map you create. If you developed that, you can point to server 1 for all maps as long as user base is relatively small and instantly set up another 100 servers for maps, once your userbase explodes. :D

Cheers,

Malte

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sun Nov 15, 2009 1:13 pm

Hi malte,

100 servers for the maps??? Wow! That made me think real deep at first! Oh an by the way, I know you're one master of graphic stuffs (animationEngine) so I'm gonna rely on you for my latest question (Question 5) I added it just now...
Parañaque, Philippines
Image
Image

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Sun Nov 15, 2009 3:13 pm

Hi,

for 5 I would go with a group of tiles (buttons) that have 2 rows and cols more than visible to the user. Then you can use the additional rows and cols as an offscreen buffer to render the correct graphics in (set the icon of the button to the correct image ID). Once you got that, you can store your map in an arry that holds the x,y values + additional info if the tile is walkable, explodes when you step on it or whatever. However, this is not an easy task. You will need to get the rendering order right. And it still will be a resource intensive task. It is doable though. I tried a basic implementation of that a few years back. And it was not that bad, too bad the sources of that got lost, when my old offices where burgled. Right now I do not have the time to set up something like that, however, if it gets a little more silent over here, I might give it a shot again. Not sure yet when that will be though.

Cheers,

Malte

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sun Nov 15, 2009 4:08 pm

ahhh.... arrays (arrays and evil brain eating monsters are the same in my dictionary) Image Anyway, I'll still try to pull through with it! Imagine it doing NASA's work? So this should only be snitch for Revolution!

P.S.
i'll be here waiting for you're "comeback" to giving it a shot Image
Parañaque, Philippines
Image
Image

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Re: A few questions regarding revlets....

Post by shadowslash » Mon Dec 28, 2009 5:02 pm

elizaara wrote:How can i contact facebook to delete my hacked account? hi,my facebook,myspace AND yahoo email were hacked in the last two days and someone changed all the passwords. They completely deleted my myspace, and changed my email password,but my facebook is still running,just a changed password. Does anyone know if there is ANY WAY i can contact facebook to delete my account.
Theoretically, there's a Contact Us link at the bottom of the Facebook site... I'm just not sure my statement....
Parañaque, Philippines
Image
Image

Post Reply