MirEvo VB.NET & DX9

smoochy boys on tour

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
Thought I'd post this as I realised JamieM was doing something similar for Mir 2.

I recently picked up my old Mir 3 project again, after reverse enginiering the maps and wils about 2 1/2 years ago. The aim is to create an easily modified open source client and server based on Mir 3, along with the tools neccesary to setup the server and databases efficiently.

What is done so far:
Wil to Mil conversion/creation tool (Mil is my file format using png's, around 80% the size of wils and much faster loading ingame)
Server selection/connection
Login screen along with create account
GM assignment + IP filtering
Banning accounts
Automatic account lockout after x ammount of unsuccessful logins
Selection screen
Character creation screen
Running around (& walking)
Collision detection (solid serverside, needs more code clientside, i know what needs doing but im just lazy)
Chat (only normal chat atm no shouts etc)

Nothing on mobs or NPCs yet, next things on the list are items, equiping, and displaying armours/weapons.

GUI is all based on a set of classes I have written therfore progress/modification should be quick and easy.

All code is written for para/poisioned/magic etc effects, using fixed function pipeline, or, where supported, pixel shaders (2.0).

Not alot I know, but Its a start and I thought I'd get the word out there and see if anybody would be interested in working on/with such a set of files.

Im calling it Mir Evoloution, I know there used to be an Evoloution server but afaik it doesnt exist anymore and I didnt know this when chosing the name, if this offends anyone then tuff... erm, I mean complain and it can easily be changed. :tongue_smilie:

mirevoss.png


PS. Dont expect a fully tested, working release anytime soon, I code when I can, and have been doing so for about a month and a half. Ive been ok with it recently so *touch wood* I should be working on it regularly for some time to come.
 

Vagrant

Golden Oldie
Golden Oldie
Jul 13, 2004
2,306
63
155
Romania
nice work m8, looks nice and promising also good that some1 didnt forget about mir3 :D
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,164
30
2,763
540
really like this. hope you keep to official path :)

will it be open source when completed?
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
will it be open source when completed?

yes, definetly. i dont believe in putting hours of hard work into something youre proud of just to keep it to yourself, when you could share it and improve it with others help. im not in this for cash, just a passion for the game.

that said though the encryption lib may be kept closed source for security reasons. if i do release source for it, it could easily be modified to a different/custom encryption system, therfore making the communications secure again.

i am also considering releasing under a GPL license (cant remember the name of it off the top of my head) that would require server owners to publish the source of the modified server (this license states that security related source need not be released).

youtube video:
http://www.youtube.com/watch?v=Ch7j56l7s60
 
Last edited:

mapadale

Guest
yes, definetly. i dont believe in putting hours of hard work into something youre proud of just to keep it to yourself, when you could share it and improve it with others help. im not in this for cash, just a passion for the game.

that said though the encryption lib may be kept closed source for security reasons. if i do release source for it, it could easily be modified to a different/custom encryption system, therfore making the communications secure again.

i am also considering releasing under a GPL license (cant remember the name of it off the top of my head) that would require server owners to publish the source of the modified server (this license states that security related source need not be released).

youtube video:
http://www.youtube.com/watch?v=Ch7j56l7s60
It would be the GPLv3 license that it would need to be released under, have a gander at this as it will help you decide.

GNU - GPL
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Nice I hope it comes along well,

I have been working out how to do the Lighting (Night, Cave, Players etc etc)... Not sure how I'm going do this yet
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
I have been working out how to do the Lighting (Night, Cave, Players etc etc)... Not sure how I'm going do this yet

Possibly a black texture with varied alpha but im not sure how you would go about making it on the fly, hence in my client no human shadows yet. I still havnt updated my own map code to include lights but i have a thread bookmarked that has the meanings for the bytes (lights and animations) i hadnt figured out myself. I found the mirunleashed thread again the other night, i think that has the lighting implemented so may be worth downloading for inspiration/education.
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
At first, not bad thats some one work on a client. I hope you don't loos the fun...

Some Info and hints for you from me :

All code is written for para/poisioned/magic etc effects, using fixed function pipeline, or, where supported, pixel shaders (2.0).

Little hint : If you plan latter a move to DX10 you get a Problem with "fixed function pipeline" ;-) DX10 don't use any more fixed function pipeline...

Possibly a black texture with varied alpha but im not sure how you would go about making it on the fly,

you can use IndexBuffer to create a Colored Circle and with the Deffuse Color you can change the Color for the Vertice.... and so on...

hence in my client no human shadows yet.

^^ on my Client I have it done, is not so hard to do this.. need a hand full StateBlocks and some Knowlage in Alphabelnding functions...
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
On a side not Why did you chose VB.Net? C# Much better :p

its just because its what im used to, started off with vb4 :mellow:

vb is for teh kewl kidz :001_cool:

Little hint : If you plan latter a move to DX10 you get a Problem with "fixed function pipeline" ;-) DX10 don't use any more fixed function pipeline...

well most older pc's (and infact my mums new'ish' laptop) dont support pixel shaders, at least not 2.0, so ill probably be sticking with DX9, not that i'd considered DX10 anyway
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
What was that about Licenses?

Is it something that I will need to look into and the other VB.Net Project?
 

lifco

Untrusted Member
Legendary
Golden Oldie
Loyal Member
Jul 6, 2004
3,400
65
195
UK/Italy
Great work on this mate good to see mir is still kicking

lif
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
What was that about Licenses?

Is it something that I will need to look into and the other VB.Net Project?

Well a license is a legal agreement between the creator(s) of a project and the user of said project, on the creators terms. Its something youll want to look into if youre interested in not getting your work stolen (people claiming it as thier own) or sold for rl cash, or at the least when you just want credit where credit is due.

Mir Unleashed (the other vb.net project) can be found here http://www.lomcn.co.uk/forum/showthread.php?t=51305. its quite an old mir 2 project that for some reason went closed source but there is still source avaliable via the links on that thread. Quite useful, got me started by adapting the socket code.
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
How are you transfering data from client to server?

Are your breaking it down into Bytes and sending it or does VB.Net support a way to send objects directly.

C# isn't very giving in this department :p
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
I am using structures declared in a protocol lib, then using a function to turn structures into bytes.

Sending a packet goes a bit like this:

Code:
                            Dim reply As Packet
                            reply.SessionID = conn.SessionID
                            reply.CryptoType = CryptoType.SessionIDCrypto
                            reply.PacketType = GamePacketType.PlayerUpdate
                            reply.PacketOpCode = PacketOpCode.Notify
                            Dim posinfo As StartInfo
                            posinfo.STR_MAP = tmpmap.file
                            posinfo.INT2_X = tmpplyr.conn.PositionInfo.INT2_X
                            posinfo.INT2_Y = tmpplyr.conn.PositionInfo.INT2_Y

                            Socket.SockServer.SendData(MakePacket(reply, posinfo, conn.Crypto), conn.Index)

And recieving one goes like this:

Code:
        Public Sub PacketArrival(ByRef info As Protocol.Packet, ByRef struct() As Byte)

            Select Case CType(info.PacketType, GamePacketType)

                Case GamePacketType.PlayerUpdate
                    Select Case info.PacketOpCode
                        Case PacketOpCode.Notify
                            Dim posinfo As StartInfo = ArrayToStruct(struct, GetType(StartInfo))
                            Player.Stand()
                            Player.SetPos(posinfo)
                        Case Else

                    End Select
                    ...

Obviously theres a hell of alot more code involved but thats all you need to send/recieve an encrypted packet using the framework I've built.
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Hmm Interesting, I have gone a complete different method xD

Here's the code I'm using for sending the Login Data.

I'm using Regular Expressions to validate the Data, both client and server side.


Client:
Code:
public static void SendLogin()
            {
                #region detail checks
                Regex r = new Regex(@"^[A-Za-z0-9]{3,20}$");
                if (string.IsNullOrEmpty(MirInterface.LoginVars.LoginID.Text))
                {
                    MirInterface.ShowMessage(Constants.MissingAccountID);
                    return;
                }
                if (string.IsNullOrEmpty(MirInterface.LoginVars.Password.Text))
                {
                    MirInterface.ShowMessage(Constants.MissingPassword);
                    return;
                }
                if (!r.IsMatch(MirInterface.LoginVars.LoginID.Text))
                {
                    MirInterface.ShowMessage(Constants.BadAccountID);
                    return;
                }
                if (!r.IsMatch(MirInterface.LoginVars.Password.Text))
                {
                    MirInterface.ShowMessage(Constants.BadPassword);
                    return;
                }
                #endregion                

                
                MirInterface.LoginVars.Login.Locked = true;
                OutGoing.Write(ClientMessages.CM_Login);
                OutGoing.Write(MirInterface.LoginVars.LoginID.Text);
                OutGoing.Write(MirInterface.LoginVars.Password.Text);

            }

Server
Code:
//Checks etc etc etc

LoginID = Incoming.ReadString();
Password = Incoming.ReadString();

This allows me to transfer objects extremely easy,
For the shown example
I am using:
RegularExpressions
NetworkStream
BinaryReader
BinaryWriter

I have the option to add either compression to the stream or Encryption to the stream, It will be one or the other.

Still I have shown you this to give you another idea on how to do the communications.
 
Last edited:

DjDarkBoyZ

Dev
Golden Oldie
Aug 11, 2006
1,065
228
260
127.Ø.Ø.1
I have done a lot of things in mir-iv project, if your intention is make a open source mir3 i can help you with encryptions, engine enhancements, voip, image encryption, etc

;)