Welcome to the RaGEZONE - MMORPG development forums.

Ask Mootie - Question & Answer Thread

This is a discussion on Ask Mootie - Question & Answer Thread within the FlyFF Help forums, part of the Flyff category; Hey Lethal, i've managed to changed the client Architecture,i mean the design, (like where are the files...). I've got it ...

Page 5 of 9 FirstFirst 123456789 LastLast
Results 61 to 75 of 128
  1. #61
    The baddest.
    Rank
    Member +
    Join Date
    Nov 2011
    Posts
    287
    Liked
    80

    Re: Ask Lethal - Question & Answer Thread

    Hey Lethal, i've managed to changed the client Architecture,i mean the design, (like where are the files...). I've got it to work but it wont read .res files that are at ..\\Data\\X.res ...
    can you give me a tip or a help to fix that?

  2. #62
    Monster
    Rank
    Developer
    Join Date
    Apr 2009
    Posts
    1,461
    Liked
    472

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by Max98 View Post
    Hey Lethal, i've managed to changed the client Architecture,i mean the design, (like where are the files...). I've got it to work but it wont read .res files that are at ..\\Data\\X.res ...
    can you give me a tip or a help to fix that?
    I'm going to be nice, but this isn't a thread for beginners... This is the last tip I'm giving that can be solved with extremely basic C++ knowledge. Look at "CResFile::ScanResource( LPCTSTR lpszRootPath )".

  3. #63
    The baddest.
    Rank
    Member +
    Join Date
    Nov 2011
    Posts
    287
    Liked
    80

    Re: Ask Lethal - Question & Answer Thread

    Lol?
    is this for bigginers?
    Changing the whole path system isn't for beginners <.<
    but thanks for your answer.

  4. #64
    [R8]ℓσℓ32
    Rank
    Alpha Member
    Join Date
    Oct 2008
    Location
    Here!
    Posts
    1,534
    Liked
    224
    Gamertag: ThawingDrake736

    Re: Ask Lethal - Question & Answer Thread

    Yeah it's for dummies

    Code:
    void CResFile::ScanResource( LPCTSTR lpszRootPath )
    {
    	TCHAR szPath[ MAX_PATH ];
    	TCHAR szPathTemp[ MAX_PATH ];
    	struct _finddata_t c_file;
    	long hFile;
    
    	strcpy( szPathTemp, lpszRootPath );
    	strcat( szPathTemp, "*.*" );
    	if( ( hFile = _findfirst( szPathTemp, &c_file ) ) != -1L )
    	{
    		do
    		{
    			strlwr( c_file.name );
    			strcpy( szPath, lpszRootPath );
    			if( c_file.attrib & _A_SUBDIR )//if( CFile::GetStatus( name, fileStatus) == TRUE )
    			{
    				if( strcmp( c_file.name, "." ) && strcmp( c_file.name, ".." ) 
    #ifdef __INTERNALSERVER
    					&& strcmp( c_file.name, ".svn" )
    #endif // __INTERNALSERVER
    					)
    				{
    					strcat( szPath, c_file.name );
    					strcat( szPath, "\\" );
    					ScanResource( szPath );
    				}
    			}
    			else
    			//if( strstr( c_file.name, ".res" ) != 0 )
    			if( CompareExt( c_file.name, ".res" ) )
    			{
    				strcat( szPath, c_file.name );
    				AddResource( szPath  );
    			}
    		}
    		while( _findnext( hFile, &c_file ) == 0 );
    			
    		_findclose( hFile );
    	}	
    }
    The client will open all files with *.res extension, and it will also look in subdirectories. After 10seconds googling you can get to the Microsoft MSDN and find this _find, _wfind Functions (CRT)

    And looking on Neuz you can see

    Code:
    void CNeuzApp::BeginLoadThread()
    {
    	CResFile::ScanResource( "" );
    
    	prj.LoadPreFiles();
    
    	m_hThread = (HANDLE) _beginthread( LoadProperty, 0, (LPVOID)this );
    #if !defined(_DEBUG)
    	WaitLoading();
    #endif
    }
    You can see when neuz starts it loads *.res files and prefiles which include the auth file, definitions and text files.

  5. #65
    Monster
    Rank
    Developer
    Join Date
    Apr 2009
    Posts
    1,461
    Liked
    472

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by Max98 View Post
    Lol?
    is this for bigginers?
    Changing the whole path system isn't for beginners <.<
    but thanks for your answer.
    Yeah it is for beginners... I can't see how anyone with experience would have issues with such a simple task.


    Quote Originally Posted by NickHough View Post
    Just a bit of a humorous questions

    how do you migrate a DDoS attack from a dedicated server hosted by another company?
    If you mean "mitigate", not "migrate"... I would report the IP of the attacking server(s) to the hosting company.

    Quote Originally Posted by NickHough View Post
    What would you suggest for DDoS protection software?
    Software won't help against any sizable DDoS attack. You need expensive hardware or a mitigation service to defend against large scale attacks given that I've heard of a Flyff server hosted on anything that can pipe more than 2gbps bandwidth.

    Quote Originally Posted by NickHough View Post
    What is the possibility i would get a DDoS without provoking anyone? (e.g. staff members advertising your server on their site)
    It depends on how large your server is. I've received many DDoS attacks from people I never have done anything to(on average, my servers get hit by unsuccessful DDoS attacks every few days).

    Quote Originally Posted by NickHough View Post
    Best software to use to make a DDoS attack had you need to, or want to as revenge for someone advertising on your site?
    I would never DDoS anyone, it's pretty much the lowest of the low. All you need is a botnet, which can be bought with a 10 year old's allowance. DDoSing is just stupid in general and very illegal/immoral.

  6. #66
    Newbie
    Rank
    Member
    Join Date
    Aug 2012
    Posts
    2
    Liked
    0

    Re: Ask Lethal - Question & Answer Thread

    I have Problems with my Database Server, i dont changed anything, but much users get bugged and the Characters dont save exactly. ( this error occurs only if there are 200 ++ User online. )

    Code:
    2012/08/03	06:23:33
    query:{call uspSavePocket( '01', '0007939', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 132) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:38
    query:{call uspSavePocket( '01', '0013079', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 130) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:41
    query:{call uspSavePocket( '01', '0000989', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 128) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:42
    query:{call uspSavePocket( '01', '0013202', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 136) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0013208', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 126) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0010865', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 132) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0013266', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 123) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0000037', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 119) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0009679', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 128) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0013249', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 136) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0011403', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 126) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0003159', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 130) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    is there any fix ._. ?

  7. #67
    Monster
    Rank
    Developer
    Join Date
    Apr 2009
    Posts
    1,461
    Liked
    472

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by Nerdinerd View Post
    I have Problems with my Database Server, i dont changed anything, but much users get bugged and the Characters dont save exactly. ( this error occurs only if there are 200 ++ User online. )

    Code:
    2012/08/03	06:23:33
    query:{call uspSavePocket( '01', '0007939', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 132) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:38
    query:{call uspSavePocket( '01', '0013079', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 130) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:41
    query:{call uspSavePocket( '01', '0000989', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 128) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:42
    query:{call uspSavePocket( '01', '0013202', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 136) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0013208', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 126) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0010865', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 132) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0013266', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 123) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:43
    query:{call uspSavePocket( '01', '0000037', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 119) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0009679', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 128) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0013249', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 136) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0011403', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 126) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    2012/08/03	06:23:44
    query:{call uspSavePocket( '01', '0003159', ?, ?, ?, ?, ?, ?, ?, ?, ?) }
    SQLSTATE:40001 error:[Microsoft][SQL Native Client][SQL Server]Transaction (Process ID 130) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    is there any fix ._. ?
    People have asked me this question a lot... I can't answer due to the advantages I would be giving to competing pservers, but I'll give you a (pretty big) hint: Indexes.

    (this is lethal btw)

  8. #68
    Hardcore Member
    Rank
    Member
    Join Date
    Sep 2008
    Location
    France
    Posts
    103
    Liked
    40

    Re: Ask Lethal - Question & Answer Thread

    Hi !

    I'm stuck with the new navigator design.

    I've changed the code to load the new graphs, but when i render alphacircle.tga, it seems that the alpha is inverted :


    but if i edit the .tga and invert the alpha layer, i've got this :


    Can you give any tips to arange this ?

    edit: i can pm my code if you wan't to see how i've done this

    ps: sorry for bad english
    Last edited by Seymourfr; 06-08-12 at 03:27 PM.

  9. #69
    Monster
    Rank
    Developer
    Join Date
    Apr 2009
    Posts
    1,461
    Liked
    472

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by Seymourfr View Post
    Hi !

    I'm stuck with the new navigator design.

    I've changed the code to load the new graphs, but when i render alphacircle.tga, it seems that the alpha is inverted :


    but if i edit the .tga and invert the alpha layer, i've got this :


    Can you give any tips to arange this ?

    edit: i can pm my code if you wan't to see how i've done this

    ps: sorry for bad english
    I'm no DirectX wizard, but this is how I did it...

    I first created a render target buffer, then rendered the alpha layer to that. Next, I rendered the navigator to it with alpha blending. Then finally, I rendered the target buffer to the screen.

    This is relatively efficient since calculating the circle coordinates would've been more cpu intensive than rendering the alpha layer.

    Quote Originally Posted by caja View Post
    Database indexes is a way to speed up the retrieval data, so the server wouldn't need to work hard to get the data, but with a bad configuration it may slow your database.

    You just need to update the thread sizes to fit with the new save time to fix deadlocking problems.
    Increasing the number of threads will just make the issue worse. The issue is two threads are accessing the extra bag table and causing a deadlock...

  10. #70
    Hardcore Member
    Rank
    Member
    Join Date
    Sep 2008
    Location
    France
    Posts
    103
    Liked
    40

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by mootie View Post
    I'm no DirectX wizard, but this is how I did it...

    I first created a render target buffer, then rendered the alpha layer to that. Next, I rendered the navigator to it with alpha blending. Then finally, I rendered the target buffer to the screen.

    This is relatively efficient since calculating the circle coordinates would've been more cpu intensive than rendering the alpha layer.
    By creating a render target buffer you mean a LPDIRECT3DVERTEXBUFFER9 ? or a new temp pd3dDevice or p2DRender ?

  11. #71
    Monster
    Rank
    Developer
    Join Date
    Apr 2009
    Posts
    1,461
    Liked
    472

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by ShadowDragon42 View Post
    Problem is, almost all server setup guides I've seen, use MSSQL Express, which does not have the option to add indexing.
    If you can't afford SQL Server Standard, you shouldn't be running a Flyff server with over 10 players online.

    Quote Originally Posted by caja View Post
    The more indexes, the more overhead is incurred as the table is altered. When rows are inserted or deleted, all indexes on the table must be updated. When a column is updated, all indexes on the column must be updated.

    You must weigh the performance benefit of indexes for queries against the performance overhead of updates. For example, if a table is primarily read-only, you might use more indexes, but if a table is heavily updated, you might use fewer indexes.
    In general, if you're doing any "SELECT" or even "UPDATE ... WHERE" queries on a table, you should have at least a clustered index.

    Quote Originally Posted by Seymourfr View Post
    By creating a render target buffer you mean a LPDIRECT3DVERTEXBUFFER9 ? or a new temp pd3dDevice or p2DRender ?
    Creating a new vertex buffer, yeah... I don't know why you would create a new rendering device. Why don't you just google "directx render target"? It's a pretty basic/common technique in directx development.

  12. #72
    i <3 C++
    Rank
    Member +
    Join Date
    Jun 2005
    Location
    Recycle Bin
    Posts
    504
    Liked
    99

    Re: Ask Lethal - Question & Answer Thread

    there's a possible way for neuz and world memory usage to change or make it lower?
    Last edited by Deviant; 09-09-12 at 11:41 PM.
    Sorry For My Bad English ((=
    .

  13. #73
    ~ .NET Developer ~
    Rank
    WTF? Overkill!
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    448
    Liked
    63

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by Deviant View Post
    there's a possible way for neuz and world memory usage to change or make it lower?
    for neuz, u could use only the HQ textures and ignore the mid and low quality textures in Model\Texture[Low/Mid] and World\Texture[Low/Mid]. By taking those off u can save over 500mb client size too and the game will look better.

    i think there is more u can do, this is just my idea
    Last edited by שเ๒єtгเ๒є; 12-09-12 at 07:48 AM.





  14. #74
    !@#$%^&*()
    Rank
    Member +
    Join Date
    Feb 2011
    Location
    Among heroes
    Posts
    613
    Liked
    123

    Re: Ask Lethal - Question & Answer Thread

    Deviant was talking about memory usage, not storage. All you do is making the client smaller, but that does not make the memory usage go down.

  15. #75
    Monster
    Rank
    Developer
    Join Date
    Apr 2009
    Posts
    1,461
    Liked
    472

    Re: Ask Lethal - Question & Answer Thread

    Quote Originally Posted by Deviant View Post
    there's a possible way for neuz and world memory usage to change or make it lower?
    I honestly don't see why you'd want to do this. The memory usage is quite low for most games, however the CPU usage is quite high. If you really want to lower memory usage, you could look into unloading the textures from memory faster.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •