Host Your Own Sprites/Remote Textures Tutorial

Posts 1–8 of 8 · Page 1 of 1
Host Your Own Sprites/Remote Textures Tutorial
Your going to need web hosting for this. If you don't already have web hosting just google free web hosting,(x10,000webhost).

I Created a Php File called image.php
Code:
<?

$id = $_GET['id'];

$image = 'http://www.website.com/rotmgimage/img/'.$id.'.png';

$photo = file_get_contents($image);

ob_start();
header("Content-type: image/png");
print($photo);
ob_end_flush();


?>

Now Save that as image.php, Even though you can name it whatever you want.php
Now heres an example of how that is going to work.
Say you uploaded a file called 1337.png to the /img/ directory.
If you went to http://www.website.com/rotmgimage/image.php?id=1337ⓘ
It would load 1337.png
----
Which is pretty much the same function as http://realmofthemadgod.appspot.com/picture/get?id=ⓘ

----

So now for the change of the server file part.

Go to /db/data/ and open Xmldatas.cs
Change http://realmofthemadgod.appspot.com/picture/get?id=ⓘ to http://www.website.com/rotmgimage/image.php?id=ⓘ
Then go to /server/picture/ and open get.cs
Change the same thing as before.

Now your pretty much set on the texture grabbing.

If you don't know how to use remote textures for your server, Pretty much just replace:
<Texture>
<File>lofiObj5</File>
<Index>0x70</Index>
</Texture>

WITH

<RemoteTexture>
<Id>draw:5252346121</Id>
</RemoteTexture>

-----

The Advantage to this is not having to manually edit the swf file and you don't have to use Rotmg's server for editing.
You can Use Photoshop/Gimp/Whatever you use and just upload the sprites.

If you have any questions/feedback or need any help, just ask me
Quote Originally Posted by marceliino View Post
The Advantage to this is not having to manually edit the swf file and you don't have to use Rotmg's server for editing
How about telling about disadvantages?
∙ Disadvantage: Often the sprites don't have enough time to load and the client will show art tile instead
Quote Originally Posted by CrazyJani View Post

How about telling about disadvantages?
∙ Disadvantage: Often the sprites don't have enough time to load and the client will show art tile instead
I Haven't Experienced this myself, And Can you show evidence of this instead of coming off as arrogant?
Quote Originally Posted by marceliino View Post
I Haven't Experienced this myself, And Can you show evidence of this instead of coming off as arrogant?
if you have not experienced this, you have not hosted a server for long, also remote textures cause lag and if there are to many, eventually long loading screens....

BUT TY for this Tut, im sure some people with find this very helpful
What if XmlDatas doesn't have that url string?

Using clubs source
Marceliino, you should include the part where you edit the texture editor swf to allow you to directly create the sprite and upload it at the click of a button. IMO it's faster when you make tons of remote textures.


Quote Originally Posted by CrazyJani View Post
Often the sprites don't have enough time to load and the client will show art tile instead
Often this doesn't happen with enemies and projectiles because the client refreshes their textures several times. Items, on the other hand, encounter this a lot.
This is only for the phoenix source. You should state that somewhere
Quote Originally Posted by realmmods2014 View Post
This is only for the phoenix source. You should state that somewhere
No It is not only for phoenix source...
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us