RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Paperdoll Generator using PHP (MyRunUO)

Bradley

Sorceror
punt said:
Ok, perhaps I should have said windows. But art returns things in a Bitmap class, and this isn't C++. That is windows is it not? (showing my ignorance of windows here). I suppose it could have been converted, but my read of mono as them avoiding any windows display stuff.
I was refering to the DirectX part. There are no references to DirectX anywhere in source code for Ultima.DLL.
 

punt59

Wanderer
The original problem...

Bradley said:
Cause it's written in .NET and doesn't have the overhead of calling into non-managed code.


Ok, now I am totally confused. The original problem stated, was accessing the data from php, on a linux server. So NET in this case, is really a foriegn entity, thus I am now very confused on unnecessarly complications, performance, etc, as this seems to just add to it on linux.

But what I am still no clear on, is the basic desire to build the images from the mul files in php? Access them from a database (I saw that posted, so then not sure what the dll has to do with anything), or interface to a C/C++ cgi that uses some library (ultima, etc) to return a png (or whatever format) image?
 

Arya

Wanderer
Ultima.dll has all the functions needed to manipulate the objects stored in mul files, converting them to objects that can be easily manipulated (such as bitmaps). Now he would like to use it on a Linux machine, probably because he's familiar with .NET. Someone suggested using a database to store the images, I personally think it's a waste of database space as you can efficiently access the mul files (either using Ultima.dll on a Windows system or on Linux with Mono - except the cases stated before). In ASP.NET this would be very easy to do, he probably wants to do something similar using PHP because it's Linux...
 

Bradley

Sorceror
I'm not sure how well the database solution would work. The orriginal request also stated that the images need to have hues aplied to them. I guess that could be done on the fly also, but if you are going to go through the trouble of that, why not just read the mul file?
 

punt59

Wanderer
Arya said:
Ultima.dll has all the functions needed to manipulate the objects stored in mul files, converting them to objects that can be easily manipulated (such as bitmaps).


Ok, so can someone tell me, what is the Bitmap class a part of ? Is it not part of the windows api for display? I didn't peruse most of the ultima source, as it wasn't of much use for me. Is Bitmap one of the class that are part of the dll, and not part of the windows display system?

I have read the mono objectives pretty closely, they seem to have commited to gtk+ for their display system. So can one tell me where they believe mono has picked that up?

As for database, it is large. http://games.gimbo.org/~punt/sform.php is an example of the art work being in a database (the actua png images are stored as blobs). After that, it is all php. But that seems pretty wasteful, I would agree. Hueing to me would be about a wash, but I suppose that depends on if doing in C or php.

The other option, which would work, is just do the entire thing in php.
 

Arya

Wanderer
I'm not a Mono expert. The Bitmap class is part of the .NET framework and I believe it encapsulates a windows HBITMAP (which is a pointer to a structure containing all the bitmap data). It's clear that Mono will handle the Bitmap class differently, but I believe it will support it. The exposed class should be the same as in .NET, it will just work different behind the scenes.
 

punt59

Wanderer
I guess wait and see

Arya said:
I'm not a Mono expert. The Bitmap class is part of the .NET framework and I believe it encapsulates a windows HBITMAP (which is a pointer to a structure containing all the bitmap data). It's clear that Mono will handle the Bitmap class differently, but I believe it will support it. The exposed class should be the same as in .NET, it will just work different behind the scenes.


Well, I don't claim to be a mono expert either, as for it me it doesn't offer much. I still think it won't be included, as it seems to follow the "link" to windows display api. Mono isn't dependent on gtk+, but is using it for their display stuff (so I don't see how to get it generically). I readily admit I could easily be reading this all wrong, so I guess it is a wait an see.

What I was still confused about, was it didn't seem the orginal poser was looking to write in C# on linux. That was my why my orginal post, was trying to determine if he was planning on a cgi interface, and if so, what was that going to be coded in. For there are native C++ libraries available on linux for the mul files as well, that would not require all the mono setup. Regardless, it would appear there are several ways to accomplish what wants to be done, it is just dependent on how where one wants to program (php, C#, C++, etc).
 

Arya

Wanderer
He's probably familiar with .NET, which I guess is the reason for his post.

As far as the Bitmap class is concerned, well it's part of .NET so I guess Mono will implement it. How is beyond my knowledge :)
 

Bradley

Sorceror
http://www.go-mono.com/class-status-System.Drawing.html

MONO says that system.drawing.bitmap is 97% complete, missing only 2 rarely used function calls.

Since in PHP the bitmap never actually gets drawn on the server's screen, it only exists in memory, there shouldn't be a problem using it on any system. All it would need to know how to do is stream it to a client it the correct format, which is standard, .gif, .jpg, .png, or whatever. it's fairly system independant.
 

punt59

Wanderer
Bradley said:
http://www.go-mono.com/class-status-System.Drawing.html

MONO says that system.drawing.bitmap is 97% complete, missing only 2 rarely used function calls.

neat, wasn't aware of that. Still not sure it is worth the effort to get setup for just a php displaying of gumps, but to each their own.

Arya, not all NET is being implemented on MONO. Thus my confusion, and mistake on Bitmap. But just because something is in NET, doesn't mean MONO is going to do it (several things they are not doing due to patents, and are just windows specific, which isn't there goal).
 

Arya

Wanderer
Yes Punt, I'm pretty sure they won't implement everything. However the Bitmap class is one of those things one would expect to be in as it's the main class used to manipulate images in .NET.
 

Tim

Wanderer
Actually, Eagle and I were going to do this using PHP. All you'd have to do is access the character save and get the appropriate bmps from uo.com

We just never got around to it.
 

Phantom

Knight
I thought I would come back to the discussion :)

yeah my suggestion will work :rolleyes:

Mono isn't the perfect solution, but I wll be honest if I had a choice between using Mono/PHP or any other solution I would pick Mono/PHP instead of a ASP solution with Mono/Apache.

Actually the best solution would be to use a windows server.

But I will be honest the current version of MyRunUO has alot of work to be done to make it work.
 

punt59

Wanderer
Why, not enough data...

Phantom said:
Actually the best solution would be to use a windows server.

QUOTE]

Hehe, so I will come back to the discussion as well. And have to ask why? Apache/linux support php fine, and as prevously stated, if one only wants a library to get the mul files on linux, there are plenty out there. We have assumed the user wants to use C#, but that isn't clear. Nor is it clear that would buy any major advantage in this instance (over Java, php native, or use C/C++ and other mul libraries).

And the suggestion wont work, unless the dll is modified, as it has been identified to have native windows calls that do need to be changed (few, but there are some). So if one wants to get that route, then changes have to be made to the dll, and then it can be tried.
 

Phantom

Knight
Has anyone even tried, punt you siad you have not even look at mono/tried it.

I think it would, what he wants to use would work.

Well at this point if your saying it won't work the simplest solution would just be to use a windows server.
 

punt59

Wanderer
Again, how do you draw that conclusion?

Phantom said:
Has anyone even tried, punt you siad you have not even look at mono/tried it.

I think it would, what he wants to use would work.

Well at this point if your saying it won't work the simplest solution would just be to use a windows server.

It has been identified that the ultima.dll, unmodified, uses windows specific functions (not the Bitmap, but others where identified). So I don't see how it would load that dll. But no, I readily admit I have not tried, for I have no need for such a thing.

What I still don't understand, is if one assumes it wont' work, the simpliest solution would be use a windows server? Change your whole OS for one library? Just use another library equivlanent to ultima.dll.
 

Phantom

Knight
punt said:
It has been identified that the ultima.dll, unmodified, uses windows specific functions (not the Bitmap, but others where identified). So I don't see how it would load that dll. But no, I readily admit I have not tried, for I have no need for such a thing.

What I still don't understand, is if one assumes it wont' work, the simpliest solution would be use a windows server? Change your whole OS for one library? Just use another library equivlanent to ultima.dll.

He wants to do MyRunUO i mean what choices does he have, if he wants a good stable system?

Up till now we been just talking.. I still say the dll would work on mono.
 

Arya

Wanderer
Most of the dll will work on Mono. The TileMatrix and Client classes won't. Look at the code, those calls to FindWindow, _lread, and SendMessage will not work under Linux (unless you program a fake kerlen32.dll or user32.dll and expose a Linux implementation of those functions).
 

punt59

Wanderer
Plenty

Phantom said:
He wants to do MyRunUO i mean what choices does he have, if he wants a good stable system?

Up till now we been just talking.. I still say the dll would work on mono.


What choice does he have if he wants a stable system to read gump art? There are other libraries that do that, has xir has pointed out in this thread. So he has choices for even a "good stable system".


But at this point, I don't see any other useful data to the orginal poster being offered, from either of us. So I any other posts I suppose I will do on this would be in starbucks.
 

Kinetix

Wanderer
What I was asking was for a cross-platform program which would allow the use of Zulu's MyUO on a PHP platform, Apache and Linux. [edit: WITHOUT extra mods or software requiring to be installed.]

Since my last post, I've learned some C and have written a program that reads the gumpindex and gumpart mul files, then prints out the information that is read by PHP. However, I'm hoping you guys can help me with something.

In the tiledata, how do I get the item's gumpid for when it is equipped?
And hues, I don't understand them at all. How are they applied to the gumps? I'd appreciate any help, thanks.
(Keep in mind I don't know C#)
 
Top