MirEvo VB.NET & DX9

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
DjDark, Would you mind sharing the contents of the original 0-3.bmp in the data folder your using for the unleashed?

I am interested on the method used for the lighting etc, And I'm positive that it would help Skunk also, (It won't be copied but a reference point in what I need to do)
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Ok its no problem.

BMP i have included in my resources (i use jpg for less space):
View attachment 10573

I hope this serves you :)
I was afraid it would be something like this :(.

I'll have to get a work friend of mine to help me out with this, I'm not an image making person.

On a side note, I looked into changing the image format for the library.

Image = (Mir2 Login Background) My Results:
BMP: 470KB
JPG: 389KB <-- Not 100% Quality
PNG: 521KB
TIF: 1056KB
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
Interesting. My textbox class allows you to specify allowed input characters so no need for checking that, just needs to check that the userid and password are not null, and are atleast minimum uid/pwd lengths. Textbox class also lets you set a maximum ammount of characters so no need to check that.

Just ran a quick test on the server in debug mode with client in release mode, server encrypted and sent 10,000 packets with a 512 byte payload in just under 3 seconds consistently. Server in release mode wasnt much different, took just over 2.5 seconds. So I think ill stick with the "easy" method for now as it seems pretty fast, well, fast enough for what its needed to do.

I suppose my method is lacking a bit in the sense that all strings are marshalled to a specific length, and will send a set ammount of bytes no matter how long the actual string is. For example 564 bytes (unencrypted) are sent when a character says "lol", which is slightly, just ever so slightly, excessive.
 

DjDarkBoyZ

Dev
Golden Oldie
Aug 11, 2006
1,065
228
260
127.Ø.Ø.1
I was afraid it would be something like this :(.

I'll have to get a work friend of mine to help me out with this, I'm not an image making person.

On a side note, I looked into changing the image format for the library.

Image = (Mir2 Login Background) My Results:
BMP: 470KB
JPG: 389KB <-- Not 100% Quality
PNG: 521KB
TIF: 1056KB

Ok, i put to you the original bmp files:
View attachment 10574
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
On a side note, I looked into changing the image format for the library.

Image = (Mir2 Login Background) My Results:
BMP: 470KB
JPG: 389KB <-- Not 100% Quality
PNG: 521KB
TIF: 1056KB

I changed my convertor to save images as BMP's and the size of M-Hum went up from 38.5MB (PNG) to 196MB (BMP). I believe this may be because of the increased colour depth in mir 3.
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Is your server hosted on the same computer or are you doing this over the internet?

Since 512Byte * 10,000 = 5Megs in 3 seconds is pretty fast uploading/ping :p

I haven't tested my upload/download. I shall test it now :p

Test for 5 Seconds Measured from the start test Packet:
Packet Header: 1 Byte
Message Sent: String with 100 Characters.
Total Size (101Bytes)
From: Client
To: Server
IP: LocalHost
Packet Count: 191,006

Not a Bad test xD
 

DjDarkBoyZ

Dev
Golden Oldie
Aug 11, 2006
1,065
228
260
127.Ø.Ø.1
Better use png, have a full color depth and a good file size.

You can code a image pre-compresion to do more compresion in library ;)

Im using a png encrypted atm and is working fine.
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
yeah i am using same computer for client/server. yours is much faster approx 18mb was sent, but who has or would need upload speed of 3.6mbp/s :tongue_smilie:, still very impressive tho.

going ot for a sec what part of kent are you from? i originally come from thanet.
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Minster (Isle of Sheppey)

Edit:

Add me on MSN if you have it, I'm sure we could bound Ideas/Methods off of each other when one needs it.
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Excuse the Double Post.

Thank you Dj for Allowing me to confirm what I needed to know about the Light Images.

I now create what I need in memory (With the client) rather then loading from a file or embedded resource.

I am not sure on how they will perform, they look similar but not tested, also I have the option to chose any size I like, by changing a few numbers, and any colour.

Here are mine:

100*100
testing1.png


200*200
testing2j.png
 

CheekyVimto

It's my Precious!
Veteran
Mar 8, 2005
395
166
130
skunk if you want some help decoding the files and what each image range is for etc, give me a shout I've done alot of 'research' over the last 5 years, and if I can be of any help would be nice to see an opensource project.

/cheeky
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
some little question @Skunkmeister :
- I see you have 75 FPS, if D3D running in VSync or in immediate mode? : if VSync what are the real FPS in immediate mode?
- can you switch from / to Window - Fullmode? if yes : in Runtime or only as option before you start?
- What are your plans on this Version?
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
some little question @Skunkmeister :
- I see you have 75 FPS, if D3D running in VSync or in immediate mode? : if VSync what are the real FPS in immediate mode?
- can you switch from / to Window - Fullmode? if yes : in Runtime or only as option before you start?
- What are your plans on this Version?

-immediate mode fps ingame ranges from 70-95 fps depending on where youre standing, vsync is a steady 64 (no idea why, but its a logical 60 on login/select screens)
-atm only avaliable by changing a declaration in the source code, but it wont take too much to make it avaliable at runtime
-no idea really, to make an easily customisable base client/server
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
ohh 70 - 95 is not good, to little for only a handfull objects.
I believe you use D3DXSprits right? and you do it in a loop like this fake code :

Code:
 loop begin
   beginSprite
     DrawSprite
   endSprite
 loop end

If this your way to blit the Images, then you can get many FPS with a other way.

Code:
beginSprite

 loop begin
     DrawSprite
 loop end

endSprite

the begin and end function capture and apply all states and made some other calculation. If you need only alphablend then made it like the latest code.
A good way is to use StateBlocks. If you know waht you need (z.b. only some States)
use the Device function like this :

Code:
var
  PStateBlock : IDirect3DStateBlock9;

      pd3dDevice.BeginStateBlock;

      pd3dDevice.SetRenderState(D3DRS_ALPHABLENDENABLE, iTrue);
      pd3dDevice.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
      pd3dDevice.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
      pd3dDevice.SetRenderState(D3DRS_ALPHATESTENABLE, iFalse);

      pd3dDevice.EndStateBlock(PStateBlock);

      PStateBlock.Apply;

If you need help with optimizing your Client ask me. ;-)
 
Last edited:

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
actually i was using textured quads, since changed to the sprite object. optimized the client quite a bit, now getting 84fps with player + 25 others and 54fps with player + 100 others. this is without drawing weapons & wings, plus theres no hair/helmets on the other characters, but i cant see the fps dropping to an unplayable state. only downside is armour/hair colors will be limited as im applying each shader once per frame and using the z buffer to sort the sprites into the correct order, therefore the more colors made avaliable the slower it will run, but to change shaders dynamically fps drops to >5.
 

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,797
299
370
United Kingdom
Z Buffer to draw in correct order, I'm not sure what method your doing for here, never touched it myself.

With my C# Project (Not sure if its the language) but The lowest FPS I have gotten with the default resolution is a static 500 With Thread.Sleep(1) (1 Millisecond) and that was because I used some ineffective technique.

What FPS do you get in the Login Scenes (Before the game). Just wondering why your FPS is like it is, I have a constant 1,000 FPS with the Thread.Sleep(1) (in each loop), and 2700 without.

Let me know what your FPS is for the login scenes please.
 

Skunkmeister

LOMCN VIP
VIP
Jul 10, 2007
203
19
105
my login screen fps was just under 1000 when i was applying shaders as they were needed, this is because it only needed a coupple of shaders, now it is just under 200. i think the low fps is to do with language, as ive never had 2700 fps even with a blank screen. i may port it to c++, or c# if i fancy learning something new.
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
Z Buffer use o.O on 2D ??? Ok *fg*...
To check your Problems, use : PIXWin.exe or PIX.exe from the DirectX9 SDK, it show you the calls and so on. If you need help with PIX use Google with PIX+DirectX9.
It looks like your DXEngine framework that you made is very bad. Shader is not on all the best.

I have on my Login ~1070 - 1100 FPS (but it has multiple background Animation) ;-)

NewClient_1.PNG
 
Last edited:

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
Looks good so far. Any update on where you are with these files? I take it you will be releasing these files to the community? Will you be including a MIL editor for the client?