|
||
|
|||||||
| XNA Tutorials and support for game development using Microsoft's XNA Game Studio framework. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Apr 2009
Location: NW US
Posts: 64
|
I played Ultima Online my first semester in college. It was a lot of fun, although I remember struggling with the interface. Now I'm working on my own Ultima Online client, both as a hobby and in a attempt to implement a better interface for the classic UO client. I've been coding this up for the past month and a half, and now I'm releasing the code as open source.
I've used code from xWinFormsLib, UltimaSDK, and Chase.XNA's map renderer in this client. Being able to use this code so I didn't have to start entirely from scratch saved me a lot of time, so thanks to Chase.XNA and the developers of UltimaSDK and xWinFormsLib. Visit UltimaXNA @ Google Code to download the latest revisions from the SVN and upload your edits UltimaXNA @ Google Code So, what can you do? You can log in to a server on a local machine, walk around, see NPC's walking around and animating... and that's about it. Considering how much is going on beneath the hood, that's pretty impressive. If you want to add on to the engine, extend it or optimize it, you're welcome to do so! I only ask that you share your additions so that I don't end up recoding what someone else has already done. A word of warning! This is my first C#/XNA project ever, so the code may not follow best conventions for the language. It is also somewhat messy and poorly commented in places. I'll try to amend this in future releases. But don't let this stop you from diving in and having fun with it! The client does not handle every single message that the server might send - so beware using this in a production environment, it might drop crucial packets. It works just fine on a fresh-out-of-the-zip-folder distribution of RunUO 2.0. An issue which might crop up is a missing reference to the xWinFormsLib dll. If this happens to you, simply add the /bin/Debug/xWinFormsLib.dll library as a reference in the solution explorer. You will need to change the Username and Password variables in the Engine.cs file to log in to your server. The client currently attempts to log in to a server on Localhost, so if you're attempting to log in to a remote server, you'll need to change the appropriate string further down in Engine.cs. Have fun and let me know what you think! Last edited by Poplicola; 06-10-2009 at 07:59 AM. |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: May 2007
Location: Somewhere In The Sunshine State!
Age: 42
Posts: 660
|
Awesome work man!
Only 1 request/suggestion though... could you make it so that players can have the 5 original maps and then give us the ability to add 10-20 (the higher the amount the more customizable a server will become) additional trammel/felucca size custom worlds? If I'm correct, at this point, there is a client-side code, or lack of, that prevents players from adding more than 5 maps. In addition, 'Map32, Map33, Map34...etc.', which are reserved for "additional maps" exceeding the 5 original maps by players can only clone the maps already on the server; so while they are completely different facets and read as such... the terrain will look like one of the 5 maps already on the server. What I'm thinking is that maybe you can reserve a series of map numbers (depending on how many custom maps one wishes to add), 'Map32, Map33, Map34...etc.', and make it so we can add new custom worlds instead of them being clones of a pre-existing facet. I hope this makes sense, and I can't speak for anyone else on these forums, but his will be the deciding factor on whether or not I would use a custom client; even as good as yours looks. Since the KR graphics are being scrapped by EA in the next expansion Stigian Abyss... No need to create a KR client except to appease the few who use KR on their servers. ![]() Technically they are taking the KR GUI and keeping the UO 2d graphics and combining them. So everything will look like KR except the game window which will look like 2d looks now. I think they will give the option to use the classic GUI settings, but not sure about that one. KR is doomed my friend, doomed! lolLast edited by Sythen; 06-08-2009 at 12:20 PM. |
|
|
|
|
|
#5 (permalink) | ||
|
Master of the Internet
Join Date: Dec 2005
Posts: 13,302
|
Quote:
Quote:
Doom is negative, KR going bye bye is a very positive step forward. |
||
|
|
|
|
|
#7 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Age: 29
Posts: 6,069
|
I didn't test this, but ideally this should provide better lighting (per pixel lighting instead of per vertex)
Code:
float4x4 world : WorldViewProjection;
float3 lightDirection;
bool DrawLighting;
sampler textureSampler;
struct VS_INPUT
{
float4 Position : POSITION;
float3 Normal : NORMAL;
float2 TexCoord : TEXCOORD;
};
struct PS_INPUT
{
float4 Position : POSITION;
float2 TexCoord : TEXCOORD0;
float3 Normal : TEXCOORD1;
};
PS_INPUT VertexShader(VS_INPUT IN)
{
PS_INPUT OUT;
OUT.Position = mul(IN.Position, world);
OUT.TexCoord = IN.TexCoord;
OUT.Normal = IN.Normal;
return OUT;
}
float4 PixelShader(PS_INPUT IN) : COLOR0
{
float NDotL = saturate(dot(lightDirection, IN.Normal));
float4 color = tex2D(textureSampler, IN.TexCoord);
if(DrawLighting)
color *= NDotL;
return color;
}
technique StandardEffect
{
pass p0
{
VertexShader = compile vs_2_0 VertexShader();
PixelShader = compile ps_2_0 PixelShader();
}
}
__________________
Jeff Boulanger ConnectUO - Creator/Core Developer ConnectUO Swag/Merchandise Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#9 (permalink) | |
|
Forum Novice
|
Quote:
![]() Internal structure of files, like animations, instead has been changed, cause they are more definite and have more frames.. I'm studing those HEX files right in this period. I think also 2d client will have some very big change with SA, because they full rewrite the Patch system.
__________________
"Stygian Abyss Project" Admin - Running on RunKR v2.8.X SA Rel Developing Kons - Koksi
![]() |
|
|
|
|
|
|
#10 (permalink) |
|
Forum Novice
Join Date: Apr 2008
Location: Messina, Sicily, Italy
Age: 26
Posts: 536
|
well, this looks nice
![]() important things for a good client actually i think that are: - ability to read more than 5 map files - ability to read maps of different sizes than the standard ones - possibility to read custom animX, art, gump, etc, so to be able to create larger files, or totally custom-made files - separate the weapons from theyr weaponabilities by default - make it possible to define chairs mh, can't think of anything else right now... probably those things can't be managed simply (well, a settings file in the core, that would need recompiling the .exe might be enough), but reaching these would be a great goal... Last edited by Thilgon; 06-08-2009 at 06:20 PM. |
|
|
|
|
|
#11 (permalink) |
|
Newbie
Join Date: Apr 2009
Location: NW US
Posts: 64
|
@Kons.snoK — I'll look into that tomorrow, that sounds like a good idea. Here is my stance on KR compatibility: I definitely want to see support for KR graphics included, but I won't personally work on that until the client is more or less feature complete using the old client graphics. Even if/when KR graphics support is added, I would not change any of the net code, so the client would still act 100% like the old client when communicating with the server. If you want to try to add this yourself, give it a shot!
@Sythen — Thanks for the suggestions. I like the idea of extending the client to support features that the original client does not have. Support for features like unlimited maps would have to be added to the server as well, wouldn't it? As I imagine it, this client would send a message identifying itself as an extended client, and a properly set-up RunUO server would then enable an 'extended' feature set for that client. This extended feature set could include just about anything you might want to see added to the client: automatic downloads of patches from the server, improved chat, different object interactivity... can you think of anything else you would want to see in an extended featureset? @Suil Ban — Those files are used by UltimaSDK. I don't know how necessary they are for proper operation of the SDK. You know more about what they're used for than I do, can you tell if the files are vital? Speaking of the bodydef file, how does that work? I noticed in InsideUO that models from expansions have the same body code as models from the original art set. @Jeff — I had no idea how to do that. Your code is perfect; not only does it smoothly shade the terrain, but it also has brightened up the color palette to levels comparable to the official client. Thanks for the contribution! Since you're good with shaders, can you think of a way that I could use them to hue objects (either full hue or partial hue). @Thilgon —*This client will definitely have the ability to load custom resources. Furthermore I'd like to see the client be also to patch itself on a server-by-server basis, so that a RunUO server could direct the client to download custom patches. What do you mean by "separate weapons from weapon abilities" and "define chairs"? If anyone wants to try their hand at expanding the client, I encourage them to do so. Possible ideas for additions that you could work on might include - adding support for hueing textures (I would add a 'hue' variable to IMapObject, and then add support for huing in TileEngine.cs, SpriteBatch3D.cs, and shader.fx), figuring out the correct order for drawing layers (this is in Unit.cs; currently the layers do not draw in the correct order), and adding support for more messages from the server (you will need to add the size of the packet in SocketClient.cs, and then add the code that extracts the data from the packet in GameClient.cs). Or anything else. Have at it! |
|
|
|
|
|
#12 (permalink) | |
|
Forum Novice
Join Date: Apr 2008
Location: Messina, Sicily, Italy
Age: 26
Posts: 536
|
Quote:
A kind of weapon can only have its original weapon abilities, so, except if you use a script by Garguille, that interrupts the communication between client and server regarding weapon abilities, you cannot give to a weapon the abilities you want. Another thing this script do is expanding the number of abilities you can give to a weapon, so you can have a weap with like 5 abilities, not possible with the normal client... Chairs, also, are defined in the client. The chairs actually warps and bends the character animation, since a "sitting animation" does not exist, but what is a chair and what is not a chair is hardcoded in the client, making it difficult to insert custom chairs (there is a script that helps with this too, but requires some extra patching) I like the idea of an integrated patch download Body.def is the file that makes it so animation are copied to new slots with different hues (or the same hue), so if you want to duplicate an animation, you don't have to phisically patch it... it works in conjunction with equipconv.def (that changes the gump, animation etc, of a wearable based on the bodyid), and bodyconv.def (wich is the def file for the client for looking into the different animX.mul and getting the animations from there, since the client reads directly only anim.mul). Another improvement would be make it possible to define any (or anyway, a large number) of custom Body Id for races, since actually it is only possible to have 2 race body (adding any other body animation will not be recognized as a body and give some problems) |
|
|
|
|
|
|
#13 (permalink) | |
|
Forum Novice
|
Quote:
![]() I don't have much time, i'll be busy already supporting/analyzing SA client ![]()
__________________
"Stygian Abyss Project" Admin - Running on RunKR v2.8.X SA Rel Developing Kons - Koksi
![]() |
|
|
|
|
|
|
#14 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Age: 29
Posts: 6,069
|
Quote:
![]() For hues you would need to create 1d textures (width only) of the hue being used and pass them to the shader, I would have to play with the shader to figure out what is needed to properly hue them, but it should be to hard.
__________________
Jeff Boulanger ConnectUO - Creator/Core Developer ConnectUO Swag/Merchandise Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
|
#15 (permalink) |
|
Forum Novice
|
Well now, here's a project that might be interesting enough to pull me out of retirement. I haven't spent much time in the community since heading off for the master's and taking a job, but it's really nice to see someone getting behind an open-source 2D client. The pairing of this and RunUO could lead to some of the greatest UO advancements freesharding has ever seen.
|
|
|
|
|
|
#16 (permalink) |
|
Newbie
Join Date: Apr 2009
Location: NW US
Posts: 64
|
I've set up a google code project for this code. I've uploaded a test commit to the repository. This is the first time I've used SVN, so could someone with more experience in this area take a look at the source code as currently uploaded and let me know if I have the format/directory tree set up correctly? Or any other suggestions before I open the thing up to anyone who wants to add code?
The initial test commit is here: ultimaxna - Google Code Thanks! I really appreciate it! |
|
|
|
|
|
#17 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Age: 29
Posts: 6,069
|
Quote:
__________________
Jeff Boulanger ConnectUO - Creator/Core Developer ConnectUO Swag/Merchandise Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
|
#19 (permalink) |
|
Newbie
Join Date: Apr 2009
Location: NW US
Posts: 64
|
This being my first SVN project, I had some trouble getting the project uploaded correctly. As far as I can tell, as of right now (r13), it's working perfectly. Have at it!
I've set it so that anyone can suggest code changes without joining the project, but if you want to change so you can automatically merge your code changes, let me know and I'll add you as a member. Last edited by Poplicola; 06-10-2009 at 06:05 PM. |
|
|
|
|
|
#20 (permalink) |
|
Forum Novice
|
Good work, but i have a problem, not really related with your project.
Anyway i tried to compile and it says: Error 1 The font family "Arial Narrow" could not be found. Please ensure the requested font is installed, and is a TrueType or OpenType font. D:\Active Project\ultimaxna\UltimaXNA\UltimaXNA\Content\Font s\ArialNarrow10.spritefont UltimaXNA I have TrueType active and i can't find Arial Narrow free (i think is not), so.. i have to deactivate TrueType font? Anyone has this issue and has solved it?.
__________________
Pandora's Box 3 Developer. |
|
|
|
|
|
#24 (permalink) |
|
Forum Novice
Join Date: Apr 2008
Location: Messina, Sicily, Italy
Age: 26
Posts: 536
|
i remembered another thing that doesn't work well with the OSI client...
Character slots. It shows fine if the number of admitted characters is 1, 5, 6 (maybe the seventh works well too, i haven't tried it anyway), but if you set by script the maximum char slots to 2, 3 or 4, it keeps on showing the "new" button and make the char creation (anyway, the server answers fine refusing the new char if it exceed the maximum admitted, hanging the connection)... my suggestion about that is to make it so one can make up to 10 chars (i think they enter in the window :P), removing the "new" button if the server-side maximum allowed is reached, whatever number it may be... i'll be thinking about other improvements ![]() |
|
|
|
|
|
#25 (permalink) |
|
Newbie
Join Date: Nov 2007
Age: 24
Posts: 81
|
I haven't been able to look at your code (really slow internet and no VS) however your progress is impressive and your scree shots look good! I'm finally going home Friday (been in training for 8 months...) and hopefully I can check out your code then.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|