Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #76  
Old 07-27-2014, 11:46 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

> .net client framework for Eqemu

https://github.com/eqbrowser/unity-e...ient-framework

> README

.NET 3.5
No pinvokes
No use of Marshalling
100% managed eqemuauthcrypto implementation
- I had to override the default behavior of the DESCryptoServiceProvider. It has an internal check that is performed to
detect weak keys (aka, keys with terrible parity). By default, .NET won't let you use a crappy key (which is what the
emu uses prior to being patched). Put another way, I had to make DES even shittier to work with the emu!
- On this, more for information than anything else. I believe VI/Sony set the key to all 0s for dev and testing, and
then would patch in the encryption key whenever they pushed out patches. This wouldn't make it any more secure as
a hardcoded encryption key is totally worthless, but I think that was what they were doing.

ICSharpCodeSharpZipLib is being used for compression/decompression. As far as I know, it does not pinvoke so it should
be OK. You posted a link detailing a change that had to be made to work with Mono. I didn't make that change because I
don't have mono installed, so you'll have to do that part. Looked simple enough.

The current implementation uses asynchronous receives and sychronous sending. Receives currently have a single buffer, but this can be easily
expanded to multiple if the client starts dropping UDP packets. Sending is done synchronously on a separate thread to avoid impacting the UI
thread.

Receive operations are automatically assigned threads from the thread pool.

When a packet is received it goes through processing. This is where the CRC, decompression, fragment reconstruction, splitting
of opcombined packets, etc. is handled. The end result is either a packet that is handled by the core server code (e.g. an ACK)
or is transformed into an ApplicationPacket that is placed in an inbound queue. The application (e.g. the loginclient) will then
read from this queue, process the application packet, and do whatever it needs to do.

The application layer (e.g. the loginclient) has a thread that is responsible for reading inbound packets. This will prevent it from
locking the UI thread.

In my very awful test client I have a LoginClient and an EmuClient. This was a simple implementation of the steps for contacting the
Login Server and completing the login sequence. I am automatically selecting the first Emu server because it was simpler for testing
purposes. You'll want to use the event to populate the UI.

The current code to handle translation of hostname to IP is slow. IMO, this could do with a test to say, "Is this an IP already? If so, we're done"
instead of always trying to translate. Anyway, when the udp client shell test app starts, it'll take a bit before the menu displays.

The transition from Login Server to Emu is done as a manual step in the test client, again, because it was simpler. In practice, this handoff
is automatic (duh) and follows the steps I implemented (disconnect from login server, connect to emu, send sessionrequest, get sessionresponse,
send login)
- I haven't implemented the login packet due to time constraints, but the easiest way would be to look at the emu to see what the packet
should look like and what data is in it. My guess is you'll have to provide the 10 byte Session ID that is generated by the login server
and your login server player ID at a minimum.
- I may get to this part, but I'm not sure yet. If it has been implemented you'll know if I did or not. =P

I loaded all of the Titanium OpCodes already and wrote a couple of the struct types for the initial packets.

As a general rule, try to avoid creating new reference types unless you actually need them. The primary reason is to avoid periodic
bursts of lag due to GC. You can actually see this happening if you use windbg and sos. You can dump the heap and see how many types
are sitting on the heap, waiting for GC, etc. This doesn't mean you have to use object pools everywhere, just keep it in mind. If
performance becomes an issue, it'll be one area to examine (with windbg and sos.dll)

I haven't implemented opappcombined packets yet because I don't have any examples of them to work with. The emu looks like it can
receive them, but it doesn't appear to send them, so it shouldn't be a big deal for now. When I work out how to make them, I can
add that to the code.

I don't have a full grasp on the set session stats packets yet. I have a very minimal implementation so far (the first packet you send)
which should be OK for now. I did see that they get exchanged periodically, but I haven't analyzed them yet to learn how to set the
values correctly. I'll update them when I work that part out.

I implemented the OP_KeepAlive timer, so you shouldn't have to deal with that.

To send packets, just send an applicationpacket. The UDP client will do all of the necessary compression, fragmenting, opcombined,
sequencing, ACKing, etc. I tried to make it as fire and forget as possible.


Contributed by Daerath.
__________________
Browser based EQ project
Reply With Quote
  #77  
Old 07-29-2014, 07:21 AM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default

Happy to help. I'm going to make some additional updates in the coming weeks as I work through a few ideas.
Reply With Quote
  #78  
Old 08-03-2014, 05:08 PM
jcnv
Fire Beetle
 
Join Date: Jun 2009
Location: bb
Posts: 13
Default

Go, guys go!
Reply With Quote
  #79  
Old 08-04-2014, 07:05 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

I started the server I'm using to connect to Unity, it's on the list as VZTZ, at the very bottom.
__________________
Browser based EQ project
Reply With Quote
  #80  
Old 08-09-2014, 07:36 AM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

Char creation, North Qeynos, South Qeynos, and Surefall Glade are in Unity Webplayer now.

linked due to size of image.

http://i.imgur.com/16w4Yqq.png
__________________
Browser based EQ project
Reply With Quote
  #81  
Old 08-21-2014, 05:39 AM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

Tossing a link to a "meh" build since I haven't updated in awhile. As you can see, each zone needs to be touched up.

http://eqbrowser.com/play/

Also updated the help page if anyone is interested in getting the network side of things in shape. I'm pretty much worthless when it comes to the initial zone/world network connection. Dying to start grinding on opcodes (implementing gameplay in unity) and really need a pal to help out on this initial network bottleneck.

http://eqbrowser.com/help/
__________________
Browser based EQ project
Reply With Quote
  #82  
Old 08-27-2014, 11:09 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

http://eqbrowser.com/play/

__________________
Browser based EQ project
Reply With Quote
  #83  
Old 08-31-2014, 11:45 AM
zeldik's Avatar
zeldik
Sarnak
 
Join Date: Feb 2009
Location: London,Ky
Posts: 46
Default

Cool to see this happening keep up the good work
Reply With Quote
  #84  
Old 08-31-2014, 01:45 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

As a general follow up, I see you're doing networking support for EQ Browser, yet your current web builds don't seem to leverage it at all. Have you managed to connect the web browser with all the networking code you're prepping? Or, not possible? I know Unity Web is pretty limiting about DLL additions
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #85  
Old 08-31-2014, 06:03 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

Quote:
Originally Posted by Shin Noir View Post
As a general follow up, I see you're doing networking support for EQ Browser, yet your current web builds don't seem to leverage it at all. Have you managed to connect the web browser with all the networking code you're prepping? Or, not possible? I know Unity Web is pretty limiting about DLL additions
Right now the network framework doesn't connect to a world & zone server so I haven't put it in the Unity build yet.

There are things that are very specific to Unity Webplayer in the framework to make sure it will work in Webplayer; for example: .NET 3.5 only, No pinvokes, No use of Marshalling, and 100% managed eqemuauthcrypto implementation (no eqemuauthcrypto DLL.)

Daerath is hanging out in irc.eqemulator.net #eqemucoders now so he is getting some good help to make the world/zone connection goin.


Us Unity pals are working on C# scripts that makes it available to switch head shapes depending on helmet type. Not a trivial thing in Unity, but got good progress. Also making some basic (low level) C# scripts that make it available to change equipment texture, etc. Character select will be dropping in as well next build, with the same type of camera controls as the Titanium client (also in v1 of eqbrowser build).
__________________
Browser based EQ project
Reply With Quote
  #86  
Old 08-31-2014, 06:04 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

I also released an Android App up on http://eqbrowser.com, trying to figure out what kind of Touch Character Controller type deal would work the best and not be annoying as hell.
__________________
Browser based EQ project
Reply With Quote
  #87  
Old 09-18-2014, 05:51 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

__________________
Browser based EQ project
Reply With Quote
  #88  
Old 11-06-2014, 02:10 AM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

WebGL

__________________
Browser based EQ project
Reply With Quote
  #89  
Old 11-11-2014, 08:31 AM
jcnv
Fire Beetle
 
Join Date: Jun 2009
Location: bb
Posts: 13
Default

Nearing zone explorer potential?
Reply With Quote
  #90  
Old 11-11-2014, 06:38 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

What do you mean by zone explorer potential?

You can run around in the zone and the project source has extracted assets.
__________________
Browser based EQ project
Reply With Quote
Reply

Tags
pras eqbrowser.com, unity3d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:53 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3