This is a difficult one to ever solve. If you have not known I visit the forums a bit help people with issues where I can help. Provide information to people who perhaps are lacking. But Lag, I can provide some information and I have here in previous posts.
I hear stories about other online games, etc… but MMOs are a different beast and the internet is a terrible one at that. In the previous post I have mentioned ping powering services like BattlePing (which I use) but if your ping is already good then these can’t help lower it, but they do, I find, is stabilise the connection and prevent those massive lag spikes.
Even players in the US could benefit from using these services but this is not what this post is about. This one is how to get information to help the Developers and Engineers at BioWare to find the issue. You can use an application called Ping Plotter, but even tracert works to a point.
There are options to save the text to save the image. Which is handy for a snap shot. In the above you can see that there is a server that has 100% packet loss. Interesting though it is still able to get to the server at the other end.
But a snapshot though good can not tell the true extent of the problem. So I will tell you how to capture a log of it. Then when you play your game, start up ping plotter point it at one of the servers, which I will provide information on, and wait for your connection to fail. Then post it into the forums or create a ticket with the information.
Something to know is. The support officers on the forums and in the game have a lot of people to tend to, respond to. There are reasons for canned responses and providing no feedback once submitted. This is often standard affair. Don’t rant or get upset that you posted information about it and no one got back to you OR all you got was a canned response.
Understanding will help everyone get along better and also make sure they are less likely to ignore you. Also posting information saying I get lag spikes, fix it. I have had massive lag spikes then disconnection since this patch fix it. Post information members of the community might help and you never know the outcome.
Now I have had my piece. Logging. Install Ping Plotter.
Once installed launch it. Once you launch it, you will be presented with the following screen.
Click Edit | Options, this opens the Options dialog. Then Click the Auto-Save item.
Check Auto-save. Keep the standard options unless you want to record the data. Click OK. In the sampling area under the IP lists (servers) there is the # of times to trace and the interval. Set these to 1 second of the interval and unlimited as the number.
Enter one of the IP address below;
- If you play on an East Coast server: 22.214.171.124
- If you play on a West Coast server: 126.96.36.199
- If you play on a European server: 188.8.131.52
Then Click Trace. You will see the graph update the server names etc… are populated. Then start Star Wars The Old Republic. This will impact the network side of it and you might see some additional lag, but the packets it is sending a minor in comparison to that the game sends. Since the purpose of it is to see when it disconnects and where.
It creates a file with the IP address for my test it is the west coast server, the date (YYYY-MM-DD) format and the hour it started (1100) for me. It is a PP2 file which will show anyone who loads it, including yourself the pings over the course.
You could upload this to you favourite file hosting site, link it to the forum post. That is a good way since there is a lot of data that is contained in the PP2 file and if you open it in Notepad you will find you can’t read it.
Or you can click File | Export to Text File
Click All Samples and 1 Column per hop. Click Export. Create the file and the data is saved as a text file. Which can then be pasted into the forums, using the Spoiler tag to hide it. Since if you were recording it for the 30 minutes and recording it for 1 second intervals that is 1800 lines of the test file that is the data.
I recommend refining the data in the forum to be that of the samples where the issue happened. Then saving the PP2 file to SkyDrive or drop box and link that in. Then people can see where the issue is.
Once people are equipped with this data, we can determine if it is something you can do (contact your ISP and yell abuse). At the Data Centre enter (BioWare can hurl abuse at them) or somewhere in the middle that no one can really do anything about.
The one thing you can certainly drawn from this is, the number of places it routes through on the internet. Most of which are out of our control and for the most part work fine. But there is any number of reasons why things get all messed up.
“28/11/2013 11:27:49 AM”,0,0,1,4,101,84,185,200,195,341,327,*,285,285,271,323,306
To Call or not to Call? That is the question. Well it is fairly simple really but something that even to this day I still see used prolifically. I have not used the Call keyword in a VERY long time. In fact even in VB3, yes that long ago. I never used it unless I needed to.
You use the Call keyword when the called expression does not start with an identifier). What does this mean?
Sub WhenToCall() Call (Sub() Console.WriteLine("This is starting without an identifier, so use the Call statement.")) Dim myClass As ClassWithMethod = New ClassWithMethod myClass.NoCallRequired(False) Call New ClassWithMethod().NoCallRequired(True) End Sub Class ClassWithMethod Public Sub NoCallRequired(ifNeeded as Boolean) If ifNeeded Then Console.WriteLine("No identifier is used, a Call statment is required.) Else Console.WriteLine("Calling this is not needed since we are using the identifier.") End If End Sub End Class
The above code shows a method and a class with a method. It shows two places where Call is needed (no identifier) and one where Call is not needed, using the identifier. It is clear to see the difference between the two.
Both of the mechanism are not often standard ways of calling procedures or methods, but the mechanism is there. But it is Recommended that when calling a procedure that uses an identifier, which I would say is most of the time. DO NOT USE CALL.
Sure, that is putting it strongly put, but it isn’t needed, it is an extra word you are typing and to give an indication. The current application I am updating, from someone else, uses call 1,498 times. Might not seem like much out of the entire solution but there was more in there as since I have started updating the application any time I see it, I remove it. But that 1,498 is almost 2% of the entire code are calls,
So, please, VB programmers, I know it might be a difficult to do, like using strongly typed variables (then objects), explicitly declaring our variables before use and using true object oriented programming techniques, but if we have conquered those then removing 4 letters before our procedure calls, might be easy.
So please, think of the future let us band together to get Call depreciated and eliminated from the language, like Variant data type.
Something interesting I have found and it certainly shows my very nerdy side and that is;
What does that refer to?
Why is there an assembly instruction for no operation. This item does not impact any registers (Except the EIP) and does not perform any memory operations. It does however take up space in the instruction stream.
From other sources I have gleaned that it will wait for 3 clock cycles. Unsure if it takes 3 clock cycles to increment the instruction pointer, since that kind of tracing is something done by the chip makers and not the software developers.
A Clock Cycle
Just a quick run down. Within a CPU we have all heard of the term 3.4GHz or other various forms of frequency when describing a CPU. Hz is a frequency, Radios use them to enable the tuner to pick up the station at the that frequency length. But the Hz we are talking about in a CPU are a little different.
A sine wave one complete turn, 360o is 1 clock cycle.
Looking at the graph above. If it takes 1 second to go from 0 to 360o then that is 1Hz.
|1Hz||1 cycle every second|
|1KHz||1000 cycles every second|
|1MHz||1,000,000 cycles every second|
|4.77MHz1||4,770,000 cycles every second|
|66MHz2||66,000,000 cycles every second|
|500MHz3||500,000,000 cycles every second|
|1.4GHz4||1,400,000,000 cycles every second (that is billion)|
|2.4GHz5||2,400,000,000 cycles every second|
|3.8GHz6||3,800,000,000 cycles every second|
So seeing these speeds of my computers over the years other than the first few values. So, waiting 3 clock cycles seems like nothing though on the slower computers it was more noticeable than today. Certainly when I was programming NOP was not used, simply because there was little need for it. I am sure it existed the purpose of assembly when I was writing it was to be as lean as possible. Having a No Operation instruction that chewed into CPU cycles for any reason was wasteful and 1 extra instruction could be executed as well.
Would you use it, as a marker for future code, that is up to the discretion of the developer. Since I started programming on older machines where system resources were very scarce I would always tend to say only put in what you need to put in.
My opinion is, don’t. If all it is going to do is be a place holder, increment the instruction point and then continue processing, this do not put it in, place a comment as your placeholder and then have your next line of code.
For those who are interested, this is the page from the Developer Guide from Intel.
184.108.40.206 No-Operation and Undefined Instructions
The NOP (no operation) instruction increments the EIP7 register to point at the next instruction, but affects nothing
There is also a FNOP – which does the same thing but operated on the FPU (the Floating Point Unit, or Maths Co-Processor).
|Opcode||Instruction||Op/En||64-Bit Mode||Compat/Leg Mode||Description|
|90||NOP||NP||Valid||Valid||One byte no-operation instruction.|
|0F 1F /0||NOP r/m16||M||Valid||Valid||Multi-byte no-operation instruction.|
|0F 1F /0||NOP r/m32||M||Valid||Valid||Multi-byte no-operation instruction.|
Instruction Operand Encoding
|Op/En||Operand 1||Operand 2||Operand 3||Operand 4|
This instruction performs no operation. It is a one-byte or multi-byte NOP that takes up space in the instruction
stream but does not impact machine context, except for the EIP register.
The multi-byte form of NOP is available on processors with model encoding:
- CPUID.01H.EAX[Bytes 11:8] = 0110B or 1111B
The multi-byte NOP instruction does not alter the content of a register and will not issue a memory operation. The
instruction’s operation is the same in non-64-bit modes and 64-bit mode.
The one-byte NOP instruction is an alias mnemonic for the XCHG (E)AX, (E)AX instruction.
The multi-byte NOP instruction performs no operation on supported processors and generates undefined opcode
exception on processors that do not support the multi-byte NOP instruction.
The memory operand form of the instruction allows software to create a byte sequence of “no operation” as one
instruction. For situations where multiple-byte NOPs are needed, the recommended operations (32-bit mode and
64-bit mode) are:
|2 bytes||66 NOP||66 90H|
|3 bytes||NOP DWORD ptr [EAX]||0F 1F 00H|
|4 bytes||NOP DWORD ptr [EAX + 00H]||0F 1F 40 00H|
|5 bytes||NOP DWORD ptr [EAX + EAX*1 + 00H]||0F 1F 44 00 00H|
|6 bytes||66 NOP DWORD ptr [EAX + EAX*1 + 00H]||66 0F 1F 44 00 00H|
|7 bytes||NOP DWORD ptr [EAX + 00000000H]||0F 1F 80 00 00 00 00H|
|8 bytes||NOP DWORD ptr [EAX + EAX*1 + 00000000H]||0F 1F 84 00 00 00 00 00H|
|9 bytes||66 NOP DWORD ptr [EAX + EAX*1 + 00000000H]||66 0F 1F 84 00 00 00 00 00H|
Exceptions (All Operating Modes)
#UD If the LOCK prefix is used.
- 4.77MHz was the clock speed of one of the original x86 processors or the 8088 version, 8bit. No history lesson today though. Though this was the speed of my first computer, it did have a turbo button to take it to 10Mhz
- This was the speed of my next computer, DX2-66 (overdrive) as it said on the chip.
- My next computer, the Intel Pentium 3 though I overclocked this to 550MHz
- My Pentium 4 HT was running nice at 1.4GHz
- A Core2 Quad come in for me at this nice speed
- Finally my new i7 sits at the 3.8GHz speed.
- EIP is just the Extended Instruction Pointer register. It is the pointer of where the current instruction is. ALL code lines increments the IP or EIP (depending on the CPU) and it is
Well it is official, I have started and at the end of the day, you can see my progress. I will put a post every day, but I felt that my story is coming along nicely. Certainly, 8% of the total is good. But this widget there will update, so on day two if I add more, it will update again to what I have done.
I am writing an adventure story and some reason it has me starting it beside the highest train line in the world, Qinghai–Xizang railway. I am not sure what made me set it there to start with, but I guess I am not 100% sure of where things are going in the story at the moment, certainly as my main character has met two Sherpa. But I will write updates through the course in the hopes of having it out there on public record will mean I have a better chance of finishing it. Well maybe this year is the year, one will never know until you see that calendar there and it is more red than green, you will know the outcome.
The Bare Cloud
This is an interesting post and one that comes from a little research and looking into the changes made in Windows 8.1 mainly to DirectX 11.2 (which is only with Windows 8.1). Video card manufactures, they have a tough job they are each trying to get every ounce of performance from their games for each respective card. Sure the flagships can handle most things but there are elements within a game that go only so far for optimisation and the rest are in the hands of the gods.
You see information like this from Nvidia and AMD with each release of their video card drivers. Most gamers will eagerly download one of those drivers if they are playing a game and see one of theirs has a performance increase.
Ever wonder HOW they can improve performance in a game they didn’t write. A couple of ways these is done.
I am sure that the way that a lot of people might think, and they would be right is they optimise their code on the chip. They optimise their code paths increase performance by removing bottle necks, that perhaps certain games, using certain processes within DirectX or OpenGL use.
They optimise their driver, this is the layer that talks to the card hardware, using the WDDM1 (or WDM2 if it is Windows XP).
Once upon a time, before DirectX, games would write code that directly talked to the cards, this caused so many issues as, certainly back in the day there heaps of video card makers, ones using ISA, VESA Local Bus, PCi interfaces and what worked with one card didn’t work with others. Windows 95, changes this to a certain degree an created a protected mode. At its core, Windows was still sitting on top of DOS to a point. When your PC started DOS would start and then like Windows 3.1, Windows 95 loaded the difference ideally was Windows 95 provided a more consistent and safer way of accessing all the elements you used without needing to go into such low levels, like the OS kernels would.
This change created an increased level of abstraction for game developers, they were used to writing for the hardware direct and now Windows 95 was having all sorts of issues letting them. Microsoft released the first version of DirectX for Windows 95 (though not released with the OS) which game developers a way to get the resources they needed without needing to know the code for the cards. It didn’t take off right away but due to the popularity of Windows games using DirectX grew until now it is just the standard,
So, with that little history lesson out of the way, these drivers provide the hooks to which DirectX can communicate with. The Chipset manufacturers are the ones writing the code to access the hardware (and they should since they know their card the best). The developers only need to call to DirectX and the rest is taken care of. So, if the element that talks directly to the card is optimised this should improve performance and if they look at how games call the DirectX libraries and what information they are passing to it, these can help improve performances across the board.
Another way they improve things is an interesting one and is specific for a game, which is why the games listed aren’t smaller and more often than not they are new games. Here is a crude example of what I am talking about.
This is a crude texture I made. On disk its size is 1 MB, not big and certainly in the way textures are copied it enables a more efficient way than have many, many, many textures being copied. So, what they do, is look at the repeating patterns of textures and work out ways that they can be reduced but maintain visual fidelity (so compression is only viable if it is a lossless compression).
So, is there a way to reduce the size of this, which originally is 962 x 694. Sure, depending on the nature of the texture, its size can be reduced, maintain the visual fidelity. I am not a texture artist and what I have done is crude and is only an example. But I decided to cut down the size of the texture.
This texture will not possibly wrap proper and if it does I would be a miracle worker since it took me all of about 2 minutes to do. But it shows my point.
This is expanded in size just for comparison, now, I have also used a different compression method, a lossy compression JPG to show the changes that can be made and the fidelity loss considered so minor it would take hard core people with expensive equipment to even detect that there a small loss in quality.
This image is 840 x 323 and is 158 KB on disk. So, this one texture than COULD, if I was a professional texture artists looking at improving the performance could make it better (and the texture aspect ratio would be identical if they reduce the size of it by a certain fact, 16 or 32 or something that enables them to better utilise card resources.) but it is ONLY an example. So, this one texture would in game give me the same net result in quality but improve loading and display because of the size to load and the physical size.
So, once they have found these textures, fixed them, they will then ship them with the driver package, which is why they are so large. They don’t do it to every texture, there are some they can’t improve and others they can. Textures perform better if they are certain sizes that can fix evening on memory page boundaries. Texture artists should take some of these things into account but their brief would be to create a brick texture, they would have the concept art to use as a reference and they would be told the size. They would provide a wonderful texture that looks great, they might be ordered to provide changes if it was obviously a performance issue but that is for the developers to worry about.
So, how is it I cam to this point when looking at Windows 8.1 and DirectX 11.2 changes. Well it would seem, DirectX 11.2 is going to have an ability to enable dynamic texture scaling to enable an all-round performance boost, when scaling factors are known it enables better use as these can be set up on the get go, but there is also a fall back to a simple linear scaling mechanism if this isn’t known.
Though having this scaling ability in DirectX enables times when games need those improvements but aren’t seeing the love, if a video card has excess cycles, the scaling will enable a better experience, but in the end will this change what the driver makers do? Possibly, knowing that they might not need to perform these tasks like they used to might help free resources up to work on other improvements. In the end though the card makers are wanting their card to play the best, selling advantage, knowing that a game like Battlefield 4 will look and play better on an NVidia card or AMD card will give the card a selling feature, especially when trying to push their new cards.
So, I have decided to go down a path I never truly intended to go down when I first started typing, but suffice to say, I think I have managed to get across what I wanted to, just degraded my performance significantly by adding too many words, I think I might need some word optimisation to help increase my blog performance.
1. Windows Display Driver Model (this is used for Windows Vista an higher)
2. Windows Driver Model (Windows XP and lower)
You might think that I have been busy of late but in reality I have been really just cleaning some things up. But that said, I now present the Windows Live Writer Reference Plug-in. There are some small things that I need to include with it but it can look up a word you type in there, provide the term, part of speech, the definition and any examples it may have.
The reference plug-in will also take a selected word from the document and find the definition for that.
This has been a feature I have liked in Microsoft Word and there has been many instances where I have to open a new browser window and type in the search, this will help, especially if I am trying to find the specific word from my post.
Currently it uses the Stand4 web API. So my goal is to enable further integration of this API to include translations, then to also enable the pasting back of that translated text into the blog post if required.
There is also a desire to add more APIs as I get more, currently I am able to use this API without many problems and it was by far the most simple one to implement without the need of jumping through copious hoops.
Before anyone can ask me about providing them with a copy of this plug-in I will need to fix a link onto the form to make sure that it works because currently it isn’t working.
If there are additional features you might want to see in this, please let me know and I will see what I can do about it. Once I have fixed the link I will provide an updated post about this and then enable you to ask for it.
This is the new plug-in I have for Windows Live Writer. I made it as I was on the thought process of doing my NaNoWriMo novel, on my blog. Interesting task to say the least and it would also mean perhaps those who occasion my blog might spur me on, spurn my efforts.
It is a simple plug-in, and is one of my more complex plug-ins. Wait a moment, how is it a simple plugin, yet a complex one. Well it is complex from the programming stand point. I chose to you what is a server timer within .NET. This operates in a similar but a different manner to the traditional control (UI) timer and the difference in their operation is in the way the instances are created.
A UI timer, runs on the UI thread, typically meant for single threaded applications, but the problem with controls on UI threads is that can cause the UI to stop updating if a process takes a long time to process. A server timer is typically a more reliable timer, it is on a separate thread to the UI Thread and therefore it will not cause issues with the UI updating.
Now, the side that makes it more complex is the cross threaded communication, where the event is raised on one thread but details need to be sent to another thread to perform the update, mainly that of the UI. Controls aren’t thread safe, therefore care should be taken to determine if you should be updating a control from another thread.
Suffice to say, I know, my controls are all updated from places where I know, therefore I can update the controls safely knowing that I am not going to be causing issues.
Another element that makes this more difficult is the fact that there is also another timer which control the alarm, so 2 threads, different threads need to update controls, or monitor controls on a different thread process.
- Shows the current time open (which is in case editing time)
- Shows the TOTAL time editing, which is saved, when you start a new session it will show the total time incrementing as well.
- Alarm, set this to be an amount of time and the alarm will go off. There is a stop button that stops the ding sound from running when the alarm goes off.
- Will support a maximum of 4,294,967,295 days (that is 11,767,033, yes 11 million years), so making sure that you don’t leave the timer open that long, then things should be OK.
This is just an initial version and I have plans as well for this.
- Include a recurring alarm which will make the alarm go over every x minutes, seconds and so on.
- Alarm validation, this is a basic one and I haven’t put it in yet but will be top of my list, so entry can be a little more straight forward and enable the user to know if they can enter that information.
- Ability to pause/resume the timers and also to stop and reset them.
As with all my plugins, please let me know if you wish to use them and I can then send you the plugin and information on how to install it. Also if you have any ideas and wish to share them on simple plugins that would make your blogging life easier, let me know and I will see how I can work on it.