<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4463665967905224519</id><updated>2024-12-03T02:39:57.506-08:00</updated><category term="Maya 2011"/><category term="bugs"/><category term="Qt"/><category term="lame"/><category term="Photoshop"/><category term="Unity3d"/><category term="&quot;Quality Settings&quot;"/><category term="Rotate canvas"/><category term="UI"/><category term="Unity3d meta data prefabs"/><category term="android"/><category term="brushes"/><category term="game design"/><category term="kinect hacking"/><category term="menu"/><category term="stupid"/><title type='text'>badkangaroo</title><subtitle type='html'>Im blogging about all the stuff I find broken in my daily work making games using Unity or Unreal, Maya 2011, Modo, Photoshop and more. by the way, I love to hate &amp;gt;:)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>67</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-3223489182446497150</id><published>2013-08-23T15:27:00.002-07:00</published><updated>2013-08-23T15:27:42.499-07:00</updated><title type='text'>An old timers view on crunch time.</title><content type='html'>&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;It&#39;s been 20 years of working on video games.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;20 years... two damn decades.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The only advice I have for a newbie to the games industry:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: x-large;&quot;&gt;Value your life more than work...&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;i&gt;Your life is yours, not the property of whatever company you work for, America is NOT a communist country so don&#39;t act like it is one.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Sure when you have a hard set deadline you should put in a bit of extra work toward your goal, but realistically here&#39;s what happens in a regular work day versus a crunch time work day has little effect on the aggregate total work -- if you crunch for more than a few weeks. After about three weeks of crunching productivity tends to bottom out, at worst you&#39;re losing the actual productivity you&#39;d normally be able to put in.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;You&#39;re groggy from staying at the office till 2 am. You&#39;re getting up later and getting to the office later. This means you&#39;re taking lunch later, and leaving later. Basically, all you&#39;ve succeeded at doing is moving your working day to a different part of the clock.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;This means you&#39;re missing out on what you used to do when you normally got home. Worst of all, you&#39;ve lost motivation. The death march is the worst state for a game studio to be in. Everyone is on edge, creativity is gone, and hostility between co-workers rises; stop it.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/3223489182446497150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2013/08/an-old-timers-view-on-crunch-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3223489182446497150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3223489182446497150'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2013/08/an-old-timers-view-on-crunch-time.html' title='An old timers view on crunch time.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-1643348958831241416</id><published>2013-04-12T17:03:00.002-07:00</published><updated>2013-04-12T17:05:54.990-07:00</updated><title type='text'>The real reason for PC sales decline.</title><content type='html'>&lt;br /&gt;
There&#39;s an idiotic blame game going on with the current &quot;slump&quot; in PC sales. The blame is being cast on either mobile devices or operating systems, but no body is pointing a finger at the folks ultimately responsible for making the hardware that is the PC.&lt;br /&gt;
&lt;br /&gt;
There are some writers who have pointed out that their computer from a few years ago doesn&#39;t need upgrading. This is half of the truth. They feel that there&#39;s no reason for upgrading the hardware because it&#39;s still fine.&lt;br /&gt;
&lt;br /&gt;
We were promised real time ray tracing in games in 2008, and now, 5 years later we&#39;re still seeing forward rendering or deferred rendering systems at best. We were promised 2560x1440 monitors would be the new standard in monitor resolution, but 1920x1080 is still the &quot;high end&quot; with 1366x768 still on the top of the heap as far as browsers seem to be concerned. I want a 4k monitor, like three years ago.&lt;br /&gt;
&lt;br /&gt;
If i could get a trio of 27&quot; 4k monitors for 700 a piece, sure I&#39;d get that, but then I&#39;d need a set of video cards that don&#39;t exist. I&#39;d like to run them in 3d, with physics, and the real time ray tracing with sub-surface scattering, refractions, and all of the &quot;film&quot; like qualities that could be done, if CPUs and GPUs could handle it. But there&#39;s the problem. None of the hardware exists for doing these things, and your &quot;just fine&quot; computer has no chance in hell of being able to do even half of this.&lt;br /&gt;
&lt;br /&gt;
Intel, AMD, nVidia, IBM, you guys have been slacking! You&#39;re the real bottle neck for the desktop advancement and the reason for the sales slump. Offer up a 10ghz 128core 16GB L3 cache running at 10 watts, I&#39;d be there. Give me a trio of 24GB video cards with millions of cores I&#39;d put them in. If i could get a 20TB SSD sure, I&#39;d put that in my new system as well, but I can&#39;t it doesn&#39;t exist.&lt;br /&gt;
&lt;br /&gt;
Between 1993 and 2003 CPUs were practically doubling in speed and power, then electrons started giving transistors problems. But we&#39;ve discovered many different solutions, many different alternatives and new methods to overcome the limitations.&lt;br /&gt;
&lt;br /&gt;
We&#39;ve been promised graphene wafers, single atom thick germanium wafers to solve these problems, but so far nothing has hit the market. Every day I read about IBM making headway into quantum computers, but I can&#39;t buy anything from that research, so why should I care?&lt;br /&gt;
&lt;br /&gt;
I&#39;ve been reading about super cheap manufacturing methods for making gigantic high res OLED screens, so why aren&#39;t there any 300.00 2560x1440 monitors out there?&lt;br /&gt;
&lt;br /&gt;
Common, folks, PCs aren&#39;t getting better, that&#39;s why no one is buying them. Your old pc sucks, it seriously does. It&#39;s just even more unfortunate that nothing better has come out.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/1643348958831241416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2013/04/the-real-reason-for-pc-sales-decline.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1643348958831241416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1643348958831241416'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2013/04/the-real-reason-for-pc-sales-decline.html' title='The real reason for PC sales decline.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-7966727444528475699</id><published>2013-01-04T12:32:00.000-08:00</published><updated>2013-01-04T12:32:04.244-08:00</updated><title type='text'>Standing Desks</title><content type='html'>Okay, so on the first week of a standing desk at the office.&lt;br /&gt;
Distinct advantages have come to light, the first one is to visit someone at their desk.&lt;br /&gt;
When more than one or two people are visiting your workstation at a sitting desk you have to find a lot of chairs. Then the chairs need to roll around and&amp;nbsp;re position&amp;nbsp;for someone to face your computer and do something on your keyboard. This is almost always a slow process involving a lot of awkward chair rolling, and in the rare case, a chair might get stuck and fall spilling a programmer to the floor.&lt;br /&gt;
With standing desks you&#39;re all standing. Moving around for someone to use your computer is fast, easy and rarely ever involves any effort. Stepping to the side to let someone access your computer is easy. This ease of access is more likely to lead to more people using your computer. It&#39;s great!&lt;br /&gt;
&lt;br /&gt;
Aside from being on my feet all day this standing desk thing is great. I feel better, and I think my legs are happier for it. Aside from the usual health benefits, the standing desk is great for your work environment and task sharing.&amp;nbsp;As an engineer it&#39;s great for someone to come by, show me where i broke something and fix it, or at the very least point to a line of errant code that I need to fix.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s another vote for you getting a standing desk. I&#39;m glad I did.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/7966727444528475699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2013/01/standing-desks.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/7966727444528475699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/7966727444528475699'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2013/01/standing-desks.html' title='Standing Desks'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-3293549632929559556</id><published>2012-12-12T16:14:00.001-08:00</published><updated>2012-12-12T16:14:59.932-08:00</updated><title type='text'>lua string to table</title><content type='html'>I couldn&#39;t find a clear way to do this... the entire bullshit that everyone always does is just reference the damn wiki. Which is about as clear as mud.&amp;nbsp;I hate it when programmers assume you&#39;re already a programmer.&lt;br /&gt;
&lt;br /&gt;
in anycase given a string like&lt;br /&gt;
myString = &quot;this is a long string&quot;&lt;br /&gt;
and you want to turn this into an array of letters&lt;br /&gt;
like myArray = {t,h,i,s, ,i,s, , a, ,l,o,n,g, ,s,t,r,i,n,g}&lt;br /&gt;
for reasons of being able to do things based on each letter.&lt;br /&gt;
&lt;br /&gt;
you should do this:&lt;br /&gt;
&lt;br /&gt;
myArray = {} -- make empty array&lt;br /&gt;
for i = 0, #myString do -- #myString is the length of the string&lt;br /&gt;
&amp;nbsp; &amp;nbsp; local s = string.sub(myString,i,i) -- gets the character at location i in the string&lt;br /&gt;
&amp;nbsp; &amp;nbsp;myArray[i] = s -- assigns the table[i] to the character which was returned to s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
that&#39;s it... a clear example with, imagine that!</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/3293549632929559556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/12/lua-string-to-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3293549632929559556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3293549632929559556'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/12/lua-string-to-table.html' title='lua string to table'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-1773324623735314885</id><published>2012-11-06T14:36:00.000-08:00</published><updated>2012-11-06T15:38:03.298-08:00</updated><title type='text'>String^ to const char* C++/CX</title><content type='html'>So today I was looking to convert a textBox text field into a const char to use as an IP address to send data to. This wasn&#39;t exactly easy to find any info on so I had to write this post.&lt;br /&gt;
&lt;br /&gt;
First I needed to get the String^ from the textBox xaml object like this&lt;br /&gt;
String^ s = IPAddress-&amp;gt;Text;&lt;br /&gt;
this assumes that the textBox is named &quot;IPAddress&quot;.&lt;br /&gt;
then make a size_t object and i&#39;ll call it i, this was needed to set the data size for the wcstombs_s function at the end. Not exactly sure what this is used for, but this is working, so if anyone has any good understanding of this function then please fill me in down in the comments below.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;String&lt;/span&gt;^ s =&amp;nbsp;IPAddress-&amp;gt;Text;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;size_t&lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt; &amp;nbsp; &lt;/span&gt;i;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;const wchar_t&lt;/span&gt;* cw = s-&amp;gt;Data();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;char &lt;/span&gt;*c= &lt;span style=&quot;color: #0b5394;&quot;&gt;new char&lt;/span&gt;[s-&amp;gt;Length()+1];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;memset(c,0,s-&amp;gt;Length()+1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;wcstombs_s(&amp;amp;i,&amp;nbsp;c, (&lt;span style=&quot;color: #38761d;&quot;&gt;size_t&lt;/span&gt;)s-&amp;gt;Length()+1, &amp;nbsp;s-&amp;gt;Data(), (size_t)s-&amp;gt;Length()+1 );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SomeClientFunction.SetIPAddress(c);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
then I make the const wchar_t* pointer and use the s-&amp;gt;Data() to satisfy that.&lt;br /&gt;
then i make a new char[] array with the length of the String^ this is pretty simple. so char[s-&amp;gt;Length() + 1] is how that&#39;s done.&lt;br /&gt;
then I have to allocate the memory for the char*c using memset, pretty easy here.&lt;br /&gt;
then the weird wcstombs_s which is needed since wcstombs was depricated, so i needed to use the safe version of it to get past the WinRT checks. I guess this is a memory security thing.&lt;br /&gt;
now the new safe version of the function asks for the &amp;amp;i which im not sure what does, then you add in the target char array then set a size, then give it a source using s-&amp;gt;Data(), then tell it how long that array is.&lt;br /&gt;
and that&#39;s that, worked for me!&lt;br /&gt;
&lt;br /&gt;
I&#39;ll also note that my SomeClientFunction was expecting (const char * ip) in it&#39;s args.&lt;br /&gt;
&lt;br /&gt;
I just use this blog to help remind me how I did things in general.&lt;br /&gt;
&lt;br /&gt;
hope this helps someone.&lt;br /&gt;
&lt;br /&gt;
edit:&lt;br /&gt;
So the &amp;amp;i is a returned value that&#39;s the size of the actual c in this case. Since c could actually be shorter than the original size allocated for it when using some other methods to create the size of c.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/1773324623735314885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/11/string-to-const-char-ccx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1773324623735314885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1773324623735314885'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/11/string-to-const-char-ccx.html' title='String^ to const char* C++/CX'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-5491500345519362256</id><published>2012-10-05T16:08:00.000-07:00</published><updated>2012-10-05T16:08:25.766-07:00</updated><title type='text'>Dealing with create_task in WinRT using C++/CX</title><content type='html'>&lt;br /&gt;
Getting into Windows8 C++/CX&lt;br /&gt;
&lt;br /&gt;
Tutorials and introductions to C++/CX&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/apps/hh465045.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/windows/apps/hh465045.aspx&lt;/a&gt;&lt;br /&gt;
from that link:&lt;br /&gt;
&quot;When you use Windows Runtime objects, you&#39;re (typically) using C++/CX, which provides special syntax to create and access Windows Runtime objects in a way that enables C++ exception handling, delegates, events, and automatic reference counting of dynamically created objects. When you use C++/CX, the details of the underlying COM and Windows architecture are almost completely hidden from your app code. For more information, see C++/CX Language Reference. However, you can also program directly against the COM interfaces by using the Windows Runtime C++ Template Library.&quot;&lt;br /&gt;
&quot;You&#39;re primarily programming against a new, easy-to-navigate, object-oriented API, the Windows Runtime, although Win32 is still available for some functionality.&quot;&lt;br /&gt;
Some functionality has me concerned as the threading and concurrency namespaces are useful for what we were doing in the previous C# version.&lt;br /&gt;
This continues into a tutorial about what the different components in a new project are. The partial ref and auto keyword are also mentioned in breif detail.&lt;br /&gt;
in the first paragraph of that page there were a couple of links to the C++/CX language reference including...&lt;br /&gt;
as a note the example shows Grid^ grid = ref new Grid(); the ^ is used when dealing with anything that uses ref new to create;&lt;br /&gt;
I guess this feels sort of like&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int s = int(0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int *i = &amp;amp;s;&lt;br /&gt;
&lt;br /&gt;
where when a pointer is used you need to use a reference operator to get the value at the address of a pointer.&lt;br /&gt;
in my test i wrote the following.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;auto grid = ref new Grid();//this is the same as Grid^&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grid-&amp;gt;Width = 600;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grid-&amp;gt;Height = 500;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;auto red = ref new SolidColorBrush(Colors::Red);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grid-&amp;gt;Background = red;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(grid-&amp;gt;Parent == nullptr)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LayoutRoot-&amp;gt;Children-&amp;gt;Append(grid);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
One important thing is that Colors::Red is not Colors-&amp;gt;Red. As -&amp;gt; points to properties of a class and :: points to static members of a class.&lt;br /&gt;
&quot;In the most basic sense, a ref class is a COM object that implements the IInspectable interface and whose lifetime is managed by a smart pointer.&quot;&lt;br /&gt;
&quot;The partial keyword tells the compiler that the declaration of this class is continued in another code file.&quot;&lt;br /&gt;
good to know, sort of nice you can break up a big source file into a few small ones.&lt;br /&gt;
&lt;br /&gt;
&quot;If you, the programmer, have to add variables or functions to the MainPage class, do so in MainPage.xaml.h and MainPage.xaml.cpp.&quot; As you normally would.&lt;br /&gt;
&quot;If the XAML editor has to add variables or other boilerplate code, it does so in the *.g.h and *.g.hpp files.&quot;&lt;br /&gt;
&lt;br /&gt;
I&#39;ve got to find where the .g. files are hiding in our project, I&#39;m pretty sure I saw them somewhere, but i&#39;ll check if adding things into these files will allow for better cross talk between the C++ and C++/CX stuff.&lt;br /&gt;
&lt;br /&gt;
&quot;In general, you can safely ignore the *.g.* files. That&#39;s why Solution Explorer hides them by default.&quot;&lt;br /&gt;
Hey, hiding them by default? What if we, the programmer, need to edit the xaml?? WTF. Weird I can&#39;t find these files. oh well, moving on...&lt;br /&gt;
further down in the post there&#39;s a special include for&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;#include &amp;lt;ppltasks.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I didn&#39;t catch this include before, wasn&#39;t in any documentation other than the tutorial. Things like this can&#39;t be missed so I think something that important should be a bit more highlighted.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;auto grid = ref new Grid();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grid-&amp;gt;Width = 600;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grid-&amp;gt;Height = 500;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;auto red = ref new SolidColorBrush(Colors::Red);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grid-&amp;gt;Background = red;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;create_task([grid]{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;grid-&amp;gt;Height = 100; //this throws an error&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}).then([grid]{});&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(grid-&amp;gt;Parent == nullptr)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LayoutRoot-&amp;gt;Children-&amp;gt;Append(grid);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
In the previous test code I found that this throws an error when trying to execute anything inside of the lambda in the create_task function. The red squiggle under the [grid] says a local lambda is not allowed in a member function of a WinRT class. Not sure why that is.&lt;br /&gt;
expanding on the create_task function. In&lt;br /&gt;
&lt;br /&gt;
I created the following code to stick a wait timer.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;auto i = 0.5;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;create_task([this, i]{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;auto thispage = this;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;thispage-&amp;gt;Dispatcher-&amp;gt;RunAsync(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CoreDispatcherPriority::Normal,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ref new DispatchedHandler([thispage,i]()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;thispage-&amp;gt;GridControlElement-&amp;gt;Opacity = i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;wait(SomeRandomInteger); //a static global variable.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}).then([this, i]{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;auto thispage = this;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;thispage -&amp;gt;Dispatcher-&amp;gt;RunAsync(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CoreDispatcherPriority::Normal,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ref new DispatchedHandler([thispage]()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;thispage-&amp;gt;GridControlElement-&amp;gt;Opacity = 1.0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}));&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;});&lt;br /&gt;
&lt;br /&gt;
So this is scoped as the page that the create_task lives within. It&#39;s then passed through the lambda into the create_task function I also added an number value to see how that will work when passed into the [this,i] part of the create_task.&lt;br /&gt;
&lt;br /&gt;
Then I created another auto so that this can be used as thispage. so now the create_task has access to elements on the page. so then we can create a new DispatchedHandler and pass along another referenced task.&lt;br /&gt;
&lt;br /&gt;
Elements in the thispage reference can be accessed and modified asynchronously from the rest of the UI.&lt;br /&gt;
So after some amount of time while the wait is running, the UI element will be mostly translucent. then after the timer is up it goes back to being fully opaque.&lt;br /&gt;
&lt;br /&gt;
all the while the wait is running the rest of the interface is doing just fine.&lt;br /&gt;
&lt;br /&gt;
Adding this into a touch event...&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/apps/hh699871.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/windows/apps/hh699871.aspx&lt;/a&gt;&lt;br /&gt;
from that link:&lt;br /&gt;
&quot;Visual C++ component extensions (C++/CX) is a set of extensions to the C++ language that enable the creation of Windows Store apps and Windows Runtime components in an idiom that is as close as possible to modern C++. Use C++/CX to write Windows Store apps and components in native code that easily interact with Visual C#, Visual Basic, and JavaScript, and other languages that support the Windows Runtime. In those rare cases that require direct access to the raw COM interfaces, or non-exceptional code, you can use the Windows Runtime C++ Template Library (WRL).&quot; and &quot;Windows Store DirectX games and graphics-intensive apps. For more information, see Create your first Windows Store app using DirectX.&quot; the DirectX + Xaml are the core of what we&#39;re doing. also, that page has a &quot;quick reference&quot; for the other components for C++/CX&lt;br /&gt;
&lt;br /&gt;
A collection of links to various C++/CX documentation dealing with the new extensions for WinRT&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/vcblog/archive/2012/08/29/cxxcxpart00anintroduction.aspx&quot;&gt;http://blogs.msdn.com/b/vcblog/archive/2012/08/29/cxxcxpart00anintroduction.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sridharpoduri.com/2012/08/13/programming-windows-8-applications-using-c-cxan-update-on-the-book/&quot;&gt;http://sridharpoduri.com/2012/08/13/programming-windows-8-applications-using-c-cxan-update-on-the-book/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/5491500345519362256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/10/dealing-with-createtask-in-winrt-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/5491500345519362256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/5491500345519362256'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/10/dealing-with-createtask-in-winrt-using.html' title='Dealing with create_task in WinRT using C++/CX'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-3662362204890498033</id><published>2012-10-04T12:25:00.005-07:00</published><updated>2012-10-04T12:26:01.469-07:00</updated><title type='text'>Timers in windows8 using c++</title><content type='html'>&lt;br /&gt;
Just getting a basic timer in c++ isn&#39;t as easy as in C#.&lt;br /&gt;
So I&#39;m stepping myself through this and documenting my findings.&lt;br /&gt;
I just want to start a timer on a touch event to fade out a control when the finger leaves the screen.&lt;br /&gt;
So to do this I want that control to wait for a few seconds before going back to it&#39;s home position.&lt;br /&gt;
I could use wait, but then the rest of the screen locks up till after the wait.&lt;br /&gt;
Since I want to use multi touch features this is bad.&lt;br /&gt;
The best way to do this *I think* is concurrency and the call function, but finding a good example for this has been really hard.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd504870.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd504870.aspx&lt;/a&gt; I started here to get a start on the concurrency run time.&lt;br /&gt;
Also writing a windows 8 metro app in WPF, so that&#39;s adding some little hitches here and there with various features that I can and can&#39;t use.&lt;br /&gt;
Also can&#39;t use 3rd party libs like boost.asio which is because the client doesn&#39;t like those things, doh.&lt;br /&gt;
Google for running multuple tasks and I get to&lt;br /&gt;
this link &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd728065.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd728065.aspx&lt;/a&gt;.&lt;br /&gt;
In here was the following code snippet...&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;int wmain()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Create a call object that prints a single character to the console.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call&amp;lt;wchar_t&amp;gt; report_progress([](wchar_t c) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;wcout &amp;lt;&amp;lt; c;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Create a timer object that sends the dot character to the &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// call object every 100 milliseconds.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;timer&amp;lt;wchar_t&amp;gt; progress_timer(100, L&#39;.&#39;, &amp;amp;report_progress, true);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;wcout &amp;lt;&amp;lt; L&quot;Performing a lengthy operation&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Start the timer on a separate context.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;progress_timer.start();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Perform a lengthy operation on the main context.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;perform_lengthy_operation();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Stop the timer and print a message.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;progress_timer.stop();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;wcout &amp;lt;&amp;lt; L&quot;done.&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This looked pretty helpful. There&#39;s the call and the timer functions that look pretty good.&lt;br /&gt;
Unfortunately in report_progress([] (wchar_t c) {...} there&#39;s a lambda and I get the following error&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Error: a local lambda is not allowed in a member function of a WinRT class.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
damn.&lt;br /&gt;
&lt;br /&gt;
So now what? Dig around more for timer class in WinRT and I find&lt;br /&gt;
&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/fd9c3010-484b-4881-88c8-765473fd5b1e&quot;&gt;http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/fd9c3010-484b-4881-88c8-765473fd5b1e&lt;/a&gt;&lt;br /&gt;
What&#39;s going on here?&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Instead of SetTimer(), you should use Windows::UI::Xaml::DispatcherTimer.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;See the MSDN article here: &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.dispatchertimer.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.dispatchertimer.aspx&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Okay, so lets go there.&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.dispatchertimer.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.dispatchertimer.aspx&lt;/a&gt;.&lt;br /&gt;
and...&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Server Error in &#39;/&#39; Application.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The resource cannot be found.Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &amp;nbsp;Please review the following URL and make sure that it is spelled correctly. Requested URL: /en-us/library/windows/apps/windows.ui.xaml.dispatchertimer.aspx.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Crap, so look up xaml dispatch timer and get to &amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.dispatchertimer&quot;&gt;http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.dispatchertimer&lt;/a&gt;&lt;br /&gt;
I think im getting closer. This is looking a bit better, something that seems to be useful, finally.&lt;br /&gt;
I just used this in C# for the previous version of the interface I was building in C#, perfect!&lt;br /&gt;
I think I can use this. The example is in C# so i need to find a C++ example,&lt;br /&gt;
get to this &lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/edff3bf2-4223-49fe-b66b-119702458700&quot;&gt;http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/edff3bf2-4223-49fe-b66b-119702458700&lt;/a&gt;&lt;br /&gt;
The thread goes through a few iterations. I get to what I think is really close but get stuck at.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;timer-&amp;gt;Tick += ref new &amp;nbsp;Windows::Foundation::EventHandler&amp;lt;Object^&amp;gt;(this, &amp;amp;DispatcherTimer_Tick);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I get an error:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;object not needed for the specified function&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
So I delete &quot;this&quot; and the following &quot;,&quot; and that seems to do the trick.&lt;br /&gt;
No more errors...&lt;br /&gt;
So I start my vars with...&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Windows::UI::Xaml::DispatcherTimer ^SomeTimer;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and then add in a way to count ticks...&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;int Ticks;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and when the xaml page is initialized i add in&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;XAMLPage()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;InitializeComponent();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//other init stuff...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SomeTimer = ref new DispatcherTimer;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SomeTimer-&amp;gt;Tick += ref new &amp;nbsp;Windows::Foundation::EventHandler&amp;lt;Object^&amp;gt;( &amp;amp;Timer_Tick);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;TimeSpan t;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;t.Duration=1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SomeTimer-&amp;gt;Interval = t;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Then I&amp;nbsp;precede&amp;nbsp;the page initialization with my Timer_Tick function that looks something like...&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;void Timer_Tick(Platform::Object^ sender, Platform::Object^ e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;OutputDebugString(L&quot;TIMER!!!&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Ticks++;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(Ticks&amp;gt;10)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SomeTimer-&amp;gt;Stop();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
so after 10 ticks the timer stops.&lt;br /&gt;
&lt;br /&gt;
I&#39;m far from a super c++ programmer, and mostly a C# or unrealscript game programmer guy.&lt;br /&gt;
I&#39;ve been doing this stuff for a while and I learn fast, and that&#39;s pretty important.&lt;br /&gt;
I do these little process blog entries to help myself out.&lt;br /&gt;
It&#39;s like a breadcrumb trail I can follow to avoid backtracking.&lt;br /&gt;
Hope this helps someone.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/3662362204890498033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/10/concurrency-in-windows8-using-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3662362204890498033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3662362204890498033'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/10/concurrency-in-windows8-using-c.html' title='Timers in windows8 using c++'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-2983957762807485914</id><published>2012-09-11T15:09:00.000-07:00</published><updated>2012-09-11T15:18:28.313-07:00</updated><title type='text'>Working in Windows 8</title><content type='html'>So the first weird thing that&#39;s bugging me is the mix of windows desktop and windows8 metro apps. When i alt tab i get all of the different apps running. Chrome has two versions, one for wen i use the metro icon to launch it, then another when i launch it from the task bar in the desktop. With a few different desktop apps and a single metro app running you can do this weird split desktop thing. I&#39;m not sure that it makes a whole lot of sense just yet. Especially since you can use both sides at the same time.&lt;br /&gt;
&lt;br /&gt;
Really weird. This is going to need some more development time by everyone involved. The apps need to have a sort of scrunched up in a margin mode so they can remain useful. Something to think about when making a metro app I guess.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX3zKOjXFqoIUHO73Bv2WPQwEHObpnIRA7ZtUC5tgycxyMCvnPApQuw1UVeBbXieNjcYwNqR-Qyj4wb8k-HH4gC6pe23viZrl91J-BGMahmzeHWcqHBbqPRs6g3xwrCnadG7nYtmJRz1s/s1600/Snap2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX3zKOjXFqoIUHO73Bv2WPQwEHObpnIRA7ZtUC5tgycxyMCvnPApQuw1UVeBbXieNjcYwNqR-Qyj4wb8k-HH4gC6pe23viZrl91J-BGMahmzeHWcqHBbqPRs6g3xwrCnadG7nYtmJRz1s/s400/Snap2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The little column on the right is some other app... since it&#39;s all white, i don&#39;t know what it is...</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/2983957762807485914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/09/working-in-windows-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/2983957762807485914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/2983957762807485914'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/09/working-in-windows-8.html' title='Working in Windows 8'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX3zKOjXFqoIUHO73Bv2WPQwEHObpnIRA7ZtUC5tgycxyMCvnPApQuw1UVeBbXieNjcYwNqR-Qyj4wb8k-HH4gC6pe23viZrl91J-BGMahmzeHWcqHBbqPRs6g3xwrCnadG7nYtmJRz1s/s72-c/Snap2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-6296369779778013955</id><published>2012-05-24T17:59:00.001-07:00</published><updated>2012-05-24T17:59:22.704-07:00</updated><title type='text'>FarseerPhysicsXNA, just getting things to work.</title><content type='html'>So almost all of their documentation on codeplex.com refer to version 2.0, and using 3.0 a lot of functions seem to have been changed. Also, they forgot that a part of a release is documentation, so imo, they&#39;re far from done.&lt;br /&gt;
&lt;br /&gt;
DebugView, why doesnt debugview work?&lt;br /&gt;
oh because their example refers to their sample project. Which would be great, if I had started with their project.&lt;br /&gt;
&lt;br /&gt;
So now i have to either incorporate my project into their project or take parts of their overly complex sample project and incorporate it into mine.&lt;br /&gt;
&lt;br /&gt;
Damnit.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/6296369779778013955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/05/farseerphysicsxna-just-getting-things.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/6296369779778013955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/6296369779778013955'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/05/farseerphysicsxna-just-getting-things.html' title='FarseerPhysicsXNA, just getting things to work.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-7111984133699380787</id><published>2012-05-14T12:41:00.002-07:00</published><updated>2012-05-14T12:41:39.914-07:00</updated><title type='text'>xna file updates in windows phone 7.1</title><content type='html'>getting models to load into the content&lt;br /&gt;
So i managed to get the model into the phone at least once, but from there on out when I update the fbx the model doesn&#39;t get updated. Having this issue is pretty annoying. Even more awkward, if I load in a different model, nothing is displayed at all, but the load function doesn&#39;t error. So what&#39;s going on? Is the model too big, too small, not enough documentation on how the fbx should be setup for me to figure out what&#39;s wrong with the model.&lt;br /&gt;
so&lt;br /&gt;
&lt;br /&gt;
Debug.WriteLine(&quot;mesh info&amp;gt;&amp;gt; &quot; + ball.Meshes.Count.ToString());&lt;br /&gt;
&lt;br /&gt;
tells me that&lt;br /&gt;
&lt;br /&gt;
mesh info&amp;gt;&amp;gt; 0&lt;br /&gt;
&lt;br /&gt;
So even more annoying is that Visual Studio doesn&#39;t always like to re-process the model into it&#39;s xnb when the file is updated. I think it&#39;s deciding that the fbx&#39;s time stamp hasn&#39;t changed enough for it to bother. Annoying so i have to use an A and B to keep switching between the two so it&#39;ll pick a different file altogether to load to force it to load the model as a new model.&lt;br /&gt;
&lt;br /&gt;
So it&#39;s running fine, I&#39;m just finding that visual studio has a bad habbit of ignoring file updates when building the xnb files from the fbx files. annoying to say the least.&lt;br /&gt;
&lt;br /&gt;
Interestingly enough though a primitive that&#39;s 1000 units across seems to be about the correct size to take up most of the center of the screen on the phone. 100 units is a small object on the screen. but my camera was 5000 units away, moving it to about 1000 units away from the origin made a big difference but the object is also a bit more distorted with perspective.&lt;br /&gt;
&lt;br /&gt;
In anycase, if you&#39;re having issues with models updating then try changing the name of the file you&#39;re loading. seems like the file doesn&#39;t always update. when the fbx is changed.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/7111984133699380787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/05/xna-file-updates-in-windows-phone-71.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/7111984133699380787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/7111984133699380787'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/05/xna-file-updates-in-windows-phone-71.html' title='xna file updates in windows phone 7.1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-5046402203973839819</id><published>2012-05-11T14:54:00.000-07:00</published><updated>2012-05-11T14:54:05.213-07:00</updated><title type='text'>2D and 3D content in XNA</title><content type='html'>&lt;br /&gt;
Drawing layers of 2D and 3D content in XNA on the Windows Phone.&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;private void OnDraw(object sender, GameTimerEventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SharedGraphicsDeviceManager.Current.GraphicsDevice.Clear(Color.CornflowerBlue);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;spriteBatch.Begin();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;spriteBatch.Draw(background, mainFrame, Color.White);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;elementRenderer.Render();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;spriteBatch.Draw(elementRenderer.Texture, Vector2.Zero, Color.White);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;spriteBatch.End();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;Draw3DContent();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;spriteBatch.Begin();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;spriteBatch.Draw(cursorImage(), cursorPos, Color.White);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;spriteBatch.End();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;So this is a modified versuion of some code that i came to when drawing 2d stuff and 3d sutff using silverlight and xna for both 2d and 3d elements. The first chunk is going to be a begin and end for the background and some UI elements that are drawn in silverlight. then I have another function that has all of the 3d elements each chunk ending in mesh.Draw();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;the last bit is to draw a silverlight cursor using xna sprite stuff since the cursor is animated and has several states.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;I wasn&#39;t able to find an example of this anywhere so im posting it here.&lt;/span&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/5046402203973839819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/05/2d-and-3d-content-in-xna.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/5046402203973839819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/5046402203973839819'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/05/2d-and-3d-content-in-xna.html' title='2D and 3D content in XNA'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-1790848743654447650</id><published>2012-05-01T15:58:00.001-07:00</published><updated>2012-05-01T17:48:55.457-07:00</updated><title type='text'> generics and types</title><content type='html'>So today I came across&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg31O6Sn0fec0TBfRnWOOePwOZuB23u9IMFM-JBHmKxf_us_9y1TcL4hctV9cOAIUw_ar6gsJmG5ea6hjuYv1qCTC0IFdOfmLDrUSicA3GTsBNw-SHVLouOa9eatSUYEVjJDkCcToxhAkw/s1600/snap3276.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg31O6Sn0fec0TBfRnWOOePwOZuB23u9IMFM-JBHmKxf_us_9y1TcL4hctV9cOAIUw_ar6gsJmG5ea6hjuYv1qCTC0IFdOfmLDrUSicA3GTsBNw-SHVLouOa9eatSUYEVjJDkCcToxhAkw/s1600/snap3276.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
And to be honest, I have no idea what T really was. I assumed it had to do with typecasting, but wasn&#39;t sure exactly how it was used here. So it seems like it&#39;s a &quot;name&quot; and not a keyword, which is good since it&#39;s just a letter. But still, it seems like it&#39;s something that I needed to learn a bit more about.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Looking into my C# book I find a section on Generics which seems promising. My book says something about Generics offering better static typing, but from my past experience static typing just makes using variables more strict. I hate putting limitations on how easily i can use a letter or number.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Both of these things infer that you need to add&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
using System.Collections.Generic and possibly System.LINQ, but I commented the two statements, and the code still compiles fine with the &amp;lt;T&amp;gt; in the function. Not sure why that is since it&#39;s inferring that &amp;lt;T&amp;gt; is something that comes out of one of those two references. Am I missing something? why is this working without those two references?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public Diddly something&amp;lt;Diddly&amp;gt;(Diddly someValue)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Diddly squat;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;squat = someValue;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;return squat;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
why, exactly, is that chunk of code valid C#? I&#39;m not completely clear as to how Diddly is used and why squat can be Diddly. This all seems a bit weird to me. I&#39;ll have to experiment with that it all means. Microsoft says to use &amp;lt;T&amp;gt; and not &amp;lt;Diddly&amp;gt; just out of using standards, but to me T is no more descriptive than Diddly. I suppose they&#39;re trying to say that it&#39;s a T for Type, but why not just use &amp;lt;GenericType&amp;gt; instead of &amp;lt;T&amp;gt; for the sake of being descriptive or expressive as people like to say about C# and F# and the other # languages.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Adding in a debug line i get this...&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvoPIYAgyH6isFPUpyMQAQMJBeY_JGfkP8u5fYbWNQsU0mXHlmxtTkCtT7EK6VOi9Ahyphenhyphen-6U81C8-VmfINotqpXsC2ESP5CTzlh-pRE51BJ5Q6mht2Ah_5sbEsVDuVa_mDufsISBBp5Qmw/s1600/snap3277.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvoPIYAgyH6isFPUpyMQAQMJBeY_JGfkP8u5fYbWNQsU0mXHlmxtTkCtT7EK6VOi9Ahyphenhyphen-6U81C8-VmfINotqpXsC2ESP5CTzlh-pRE51BJ5Q6mht2Ah_5sbEsVDuVa_mDufsISBBp5Qmw/s1600/snap3277.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So T is a string. a string type of string, which i&#39;d imagine it should be. But why the &amp;lt;T&amp;gt; ?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So what if i turn all of the Ts into string?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHy8hdU1OSbN0GCiedkb_3LPeU_TnEdhDe_stcSiUliPr5gTBItGvooAikkoIXhlghVbm8SbOrhyphenhyphennBvb1-i1YQO0QPXwtk9Ff7IPFaYRiIQ5lVGQApj_WF_D3UOTptOv6sEIuATCSFS1o/s1600/snap3278.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHy8hdU1OSbN0GCiedkb_3LPeU_TnEdhDe_stcSiUliPr5gTBItGvooAikkoIXhlghVbm8SbOrhyphenhyphennBvb1-i1YQO0QPXwtk9Ff7IPFaYRiIQ5lVGQApj_WF_D3UOTptOv6sEIuATCSFS1o/s1600/snap3278.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This gives me this error and it tells me it doesn&#39;t like types as identifiers. So, that tells me that C# is actually looking at all of the instances of the T as a variable of some kind. But why? how are all of these things being used?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Visual studio has a helper that would like to tell me that to fix this the first place where T should be it&#39;s asking:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFxf7d-XK1IZoEya6hfZ0hud3bJ5cC5bN0qRh6SK-9sbg_kAaQoLYokeRbAoz1b0rcgxxXXVOQEoHuLdbeZxIt5WXHG8BAgACb0DK8gloPqi8f3qtLqA85UPMh0BeTy6CHX-pC1I03jn0/s1600/snap3279.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFxf7d-XK1IZoEya6hfZ0hud3bJ5cC5bN0qRh6SK-9sbg_kAaQoLYokeRbAoz1b0rcgxxXXVOQEoHuLdbeZxIt5WXHG8BAgACb0DK8gloPqi8f3qtLqA85UPMh0BeTy6CHX-pC1I03jn0/s1600/snap3279.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If it would like the T to be a class or type, but it just said it didn&#39;t want types. Either way, neither of those generated objects were valid.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS0s8X75dSJXkxj3u92Xhn7uu9-0Ri532bG-lM-Yasxr1dFLcrmVTIOciK3CtzO0WnzoXAsQsffhbRc9O9yRiMloCoHWQavvSL-Ph94T7CutQTaTtyZee3QN5Ro1dmz56t4KSUQBKb3SM/s1600/snap3280.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS0s8X75dSJXkxj3u92Xhn7uu9-0Ri532bG-lM-Yasxr1dFLcrmVTIOciK3CtzO0WnzoXAsQsffhbRc9O9yRiMloCoHWQavvSL-Ph94T7CutQTaTtyZee3QN5Ro1dmz56t4KSUQBKb3SM/s1600/snap3280.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is confusing though, somehow this is valid? Why? &amp;lt;int&amp;gt; and &amp;lt;string&amp;gt; what are these and how do they work? Thought I was trying to learn something today, instead so far I&#39;m just getting confused.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/1790848743654447650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/05/generics-and-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1790848743654447650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1790848743654447650'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/05/generics-and-types.html' title='&lt;T&gt; generics and types'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg31O6Sn0fec0TBfRnWOOePwOZuB23u9IMFM-JBHmKxf_us_9y1TcL4hctV9cOAIUw_ar6gsJmG5ea6hjuYv1qCTC0IFdOfmLDrUSicA3GTsBNw-SHVLouOa9eatSUYEVjJDkCcToxhAkw/s72-c/snap3276.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-3574408890023852121</id><published>2012-05-01T00:35:00.000-07:00</published><updated>2012-05-01T00:35:32.583-07:00</updated><title type='text'>email sucks.</title><content type='html'>Oops&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5cEzdc7pYUOCnA4-_ovXaqBFv_Rnf4wqwYZtDmOBmCVR9OAei3yQKvNv4HXZn56Dklpz1N0w1xYJSp7j7MiZ0gsjo0M4OsaB4UXH4dgZB7E8nEc7GT73CRe1fUHm7ff7kJEl_WizeLoQ/s1600/snap000030.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5cEzdc7pYUOCnA4-_ovXaqBFv_Rnf4wqwYZtDmOBmCVR9OAei3yQKvNv4HXZn56Dklpz1N0w1xYJSp7j7MiZ0gsjo0M4OsaB4UXH4dgZB7E8nEc7GT73CRe1fUHm7ff7kJEl_WizeLoQ/s1600/snap000030.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
so i managed to forget that i still have an old email account. it&#39;s on my old server okita.com and it&#39;s really neglected. basically, it&#39;s rendered itself useless. And it&#39;s impossible to get the server to sort through the files so i can even clear out the in box.&lt;br /&gt;
I&#39;m trying to get their tech support to clear the server&#39;s files for me.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/3574408890023852121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/05/email-sucks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3574408890023852121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3574408890023852121'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/05/email-sucks.html' title='email sucks.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5cEzdc7pYUOCnA4-_ovXaqBFv_Rnf4wqwYZtDmOBmCVR9OAei3yQKvNv4HXZn56Dklpz1N0w1xYJSp7j7MiZ0gsjo0M4OsaB4UXH4dgZB7E8nEc7GT73CRe1fUHm7ff7kJEl_WizeLoQ/s72-c/snap000030.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-2636129358198466851</id><published>2012-04-27T14:30:00.003-07:00</published><updated>2012-04-27T14:30:39.492-07:00</updated><title type='text'>Audio Recording on Windows Phone7.1</title><content type='html'>Audio recording from the windows phone mic uses the XNA framework.&lt;div&gt;
So when I added the audio calls it requires a GameTimer update which has a FrameAction function. This wasn&#39;t already in my app when i started because I didn&#39;t use the XNA game template.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So I&#39;ll have to add one, But I already added a Tick update function for updates. I wonder if this will overlap in a bad way...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
right now im using:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer = new DispatcherTimer();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer.Interval = TimeSpan.FromMilliseconds(30);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer.Tick += new EventHandler(Tick);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer.Start();&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
for updates. so, possibly, i can switch that to being a GameTimer instead? giving that a try...&lt;/div&gt;
&lt;div&gt;
So, it looks like the dispatchTimer can be replaced with GameTimer and the functions in it do the same thing&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer = new GameTimer();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer.UpdateInterval = TimeSpan.FromMilliseconds(30);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer.Update += Tick;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;_timer.Start();&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
This is the new code, GameTimer() replaced DispatcherTimer() and UpdateInterval replaces Interval, and Tick was replaced with Update and rather than a new EventHandler i just add the name of the function thats going to be updated. Then I start the timer.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Does the same thing it seems.&lt;/div&gt;
&lt;div&gt;
BUT now im getting this crappy error:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;A first chance exception of type &#39;System.InvalidOperationException&#39; occurred in Microsoft.Xna.Framework.dll&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;An unhandled exception of type &#39;System.InvalidOperationException&#39; occurred in Microsoft.Xna.Framework.dll&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Additional information: FrameworkDispatcher.Update has not been called. Regular FrameworkDispatcher.Update calls are necessary for fire and forget sound effects and framework events to function correctly. See http://go.microsoft.com/fwlink/?LinkId=193853 for details.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
seems like I need to add something... a short bit of reading I find I need to call it manually for some reason...&lt;/div&gt;
&lt;div&gt;
in my tick I added:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;void Tick(object sender, GameTimerEventArgs e)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;FrameworkDispatcher.Update(); // this was needed?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
And that seems to have fulfilled what i need for calling the framework dispatcher... whatever that is.&lt;/div&gt;
&lt;div&gt;
so now it looks like i can get a buffer filled with mic stream data bytes. Golly, in the last four days I&#39;ve only written about 480 lines of code. but every method was something I had to learn about.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
hopefully, someone, other than me, found a line of code in this blog useful.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/2636129358198466851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/04/audio-recording-on-windows-phone71.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/2636129358198466851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/2636129358198466851'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/04/audio-recording-on-windows-phone71.html' title='Audio Recording on Windows Phone7.1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-5409196664505208382</id><published>2012-04-26T11:17:00.001-07:00</published><updated>2012-04-26T17:47:56.354-07:00</updated><title type='text'>Timers and Ticks in Windows Phone 7</title><content type='html'>So I&#39;ve come to the conclusion that this code&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;font-family: Consolas, Courier, monospace; font-size: 13px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; word-break: break-all; word-wrap: break-word;&quot;&gt;Timer stateTimer = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; Timer(tcb, autoEvent, 1000, 250);&lt;/pre&gt;
&lt;pre style=&quot;font-family: Consolas, Courier, monospace; font-size: 13px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
Sucks. The Timer Class gets garbage collected far too quickly.&lt;br /&gt;
I had added a timer.Start() and the function just debug.writeline to an int that counted up 30 times a second.&lt;br /&gt;
So after a few seconds it would count to about 213 or so, then it would stop. Nothing stopped it, i just disappeared even though the function wasn&#39;t told to stop. So I think it was garbage collected. And i found a few places that talked about the timer having to be called in a way that prevented it from being garbage collected. LAME!&lt;br /&gt;
&lt;br /&gt;
However!&lt;br /&gt;
&lt;br /&gt;
using System.Windows.Threading;&lt;br /&gt;
this line gives you a different way to do the exact same thing, and it&#39;s a lot more readable.&lt;br /&gt;
&lt;br /&gt;
in the class define a nice variable&lt;br /&gt;
public class SomeClass&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;DispatcherTimer _timer;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public MainPage()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//this timer works way better.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;_timer = new DispatcherTimer();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;_timer.Interval = TimeSpan.FromMilliseconds(30);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;_timer.Tick += new EventHandler(Tick);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;_timer.Start();&lt;br /&gt;
&amp;nbsp;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;InitializeComponent();&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;void Tick(object sender, EventArgs e)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//updating in a tick&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
}&lt;br /&gt;
that&#39;s it, that&#39;s all, nothing else needed.&lt;br /&gt;
&lt;div&gt;
The tick is called 30 times a second, and it never stops!&lt;/div&gt;
&lt;div&gt;
The other Timer() function gives me problems, this one doesn&#39;t I don&#39;t know why. But I am doing things on the windows phone, so that might have something to do with it.&lt;br /&gt;
&lt;br /&gt;
Update 5pm&lt;br /&gt;
Moving into other things on the Phone, basically if you can access the MotionController vs the Gyro or the Accelerometer, you&#39;re better off. Things like getting Yaw Pitch and Roll or even Quaternion are way more useful than gyro and accelerator alone. Something I&#39;d say you should do is just ignore phones that don&#39;t use motion controller. It&#39;s obvious, those phones will suck anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/5409196664505208382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/04/timers-and-ticks-in-windows-phone-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/5409196664505208382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/5409196664505208382'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/04/timers-and-ticks-in-windows-phone-7.html' title='Timers and Ticks in Windows Phone 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-8746434722044962149</id><published>2012-04-25T13:02:00.001-07:00</published><updated>2012-04-25T13:02:15.730-07:00</updated><title type='text'>Comparing data from the iPhone and the Lumia 900, and moving on to recording sound.</title><content type='html'>So firstly I&#39;m seeing that the acceleration data is more muted on the Lumia, or rather maybe the iPhone is more&amp;nbsp;sensitive. The overall values coming out of the Nokia are smaller in comparison. But they are consistent, so it seems like I just need to add a&amp;nbsp;multiplier&amp;nbsp;to make it more like the iPhone data.&amp;nbsp;Also, is it me or are the X and Y switched on the Lumia from the iPhone.&lt;br /&gt;
&lt;br /&gt;
Also, i need a better office chair...&lt;br /&gt;
&lt;br /&gt;
My next trick will be sending recorded audio over the websocket.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/8746434722044962149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/04/comparing-data-from-iphone-and-lumia.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/8746434722044962149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/8746434722044962149'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/04/comparing-data-from-iphone-and-lumia.html' title='Comparing data from the iPhone and the Lumia 900, and moving on to recording sound.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-6157953602743538551</id><published>2012-04-24T14:18:00.001-07:00</published><updated>2012-04-25T10:58:00.582-07:00</updated><title type='text'>WebSockets on the windows Phone 7.1 day 3</title><content type='html'>Okay, so im sending what I think is a websocket connection attempt. The server logs this out:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Client Connected!!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;==================&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Client IP 127.0.0.1:60929&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;TimeStamp: 11:10:14.288&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;0&amp;gt; GET&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;1&amp;gt; /&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;2&amp;gt; HTTP/1.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;3&amp;gt; Upgrade:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;4&amp;gt; WebSocket&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;5&amp;gt; Connection:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;6&amp;gt; Upgrade&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;7&amp;gt; Sec-WebSocket-Version:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;8&amp;gt; 13&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;9&amp;gt; Sec-WebSocket-Key:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;10&amp;gt; N2M4OWQ3MDgtOGYwNC00MQ==&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;11&amp;gt; Host:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;12&amp;gt; 10.10.10.221:11111&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;13&amp;gt; Origin:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;14&amp;gt; 10.10.10.221&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;15&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;lt;16&amp;gt; SERVING FILE: ../../../www/index.html TO: 127.0.0.1:60929&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So i think it&#39;s a http port I&#39;m connecting to, but I&#39;m pretty sure that it might be a web socket since there&#39;s all that sec-websocket-version: stuff thats in there. Rather confusing, but I think im getting closer. On the phone side of things I&#39;m checking the websocket status and it&#39;s saying &quot;connecting&quot; so i think that&#39;s getting closer.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Update: 12pm&lt;/div&gt;
&lt;div&gt;
Reading up on &quot;subProtocol&quot; i find an RFC which states in the first line in the subProtocol section &quot;&lt;span style=&quot;font-size: 1em;&quot;&gt;&amp;nbsp;_This section is non-normative._&quot; so... This is going to be a very difficult read being that I don&#39;t even have any idea what the fuck that sentence even means. Even so, it&#39;s saying a sub-protocol is a sub-protocol, which explains nothing. This is why I hate talking to other programmers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;lunch break...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;So I managed to notice that the app im sending things to was updating with funny error codes, and it was a bunch of errors coming from the websocket, so that&#39;s a good sign. I just have to format the out going stream to something that the websocket message receiver can understand.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;the websocket() function is weird.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ws = new WebSocket((&quot;ws://&quot; + hostName + &quot;:&quot; + portNumber));&lt;/span&gt;&lt;br /&gt;
or&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ws = new WebSocket((&quot;ws://&quot; + hostName + &quot;:&quot; + portNumber),&quot;&quot;,null,null,&quot;&quot;,&quot;&quot;,WebSocketVersion.DraftHybi00);&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 1em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Update 3pm&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;Trying to set the websocket version isnt easy, I have to fill in the rest of the garbage that the method expects. So i&#39;m hoping that the first version works since the more detailed version requires a ton of crap that I don&#39;t feel like filling in. AH mother f*cker... so the phone wants to talk in Rfc6455 and server is Hybi00 so i do have to fill in the rest of that shit. damnit...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;Update 4:30pm&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Yay, managed to fulfill the damn full version of the websocket function. You using string.empty and null you can fill in the junk that doesn&#39;t need to be filled right now for testing.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;WebSocketVersion ver = WebSocketVersion.DraftHybi00;// &amp;lt;-- need to switch to this mode.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;string subProt = &quot;HTTP / 1.1&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ws = new WebSocket((&quot;ws://&quot; + hostName + &quot;:&quot; + portNumber), subProt, string.Empty, null, string.Empty,string.Empty,ver);&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 1em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-size: 1em;&quot;&gt;
Finally got the version of the prototcol to be DraftHybi00 which is what the server is expecting. Now im only getting one weird error... but I can at least test the other versions of the websocket. For one thing, subProtocol is a string. What it expected in that string was difficult to find. So just randomly guessing I found on some RFC.&lt;/div&gt;
&lt;div style=&quot;font-size: 1em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: 1em;&quot;&gt;On your own you can replace&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;(&quot;ws://&quot; + hostName + &quot;:&quot; + portNumber) &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;with a regular url&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;as long as you use&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt; ws:// &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;instead of&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt; http:// &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;then follow the ip address or web address with a : and a port number that makes sense, web is 80 sometimes on your local area network you might use 8181 or soemthing that your websocket server is listening to.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 1em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;newpage&quot; style=&quot;font-size: 1em; page-break-before: always;&quot;&gt;&quot;CONNECT example.com HTTP/1.1&quot;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 1em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
so i just tried putting &quot;HTTP/1.1&quot; into the subprotocol, nothing complained, so I&#39;m just going to go with that as the subprotocol. Until I can find a better string to use than that I&#39;ll stick with it.&lt;br /&gt;
&lt;br /&gt;
horray! looks like the server side is at least saying&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;RECEIVED NO DATA&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;RECEIVED NO DATA&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;RECEIVED NO DATA&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When I send a string through my websocket. that means i just need to format a string to send to it!&lt;br /&gt;
&lt;br /&gt;
it&#39;s working!&lt;br /&gt;
&lt;br /&gt;
So now i just gotta format my socket data into a form that the server can understand. and in my case it&#39;s a custom server thing so there&#39;s nothing i can share about it here.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/6157953602743538551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/04/websockets-on-windows-phone-71-day-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/6157953602743538551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/6157953602743538551'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/04/websockets-on-windows-phone-71-day-3.html' title='WebSockets on the windows Phone 7.1 day 3'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-4623698433767949050</id><published>2012-04-23T11:34:00.002-07:00</published><updated>2012-04-23T18:50:50.358-07:00</updated><title type='text'>Silverlight websockets and windows phone day 2</title><content type='html'>Unproductive weekend is over, now I have to get back to websockets on the phone.&lt;br /&gt;
Downloaded the source for websockets4 from&amp;nbsp;&lt;a href=&quot;http://websocket4net.codeplex.com/&quot;&gt;http://websocket4net.codeplex.com/&lt;/a&gt;&amp;nbsp;but the example code still gives me errors after adding various things to the project.&lt;br /&gt;
&lt;br /&gt;
Tried to use the nuGet plugin from visual studio and I get an error&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;PM&amp;gt; Install-Package WebSocket4Net&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Attempting to resolve dependency &#39;Json.Net (≥ 4.0.5.14411)&#39;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Install-Package : Unable to resolve dependency &#39;Json.Net (≥ 4.0.5.14411)&#39;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;At line:1 char:16&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;+ Install-Package &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;nbsp;WebSocket4Net&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; + CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: NotSpecified: (:) [Install-Package], InvalidOperationException&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageComman&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;d&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;PM&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
So that failed. And there&#39;s no obvious way to get help, damnit. First experience with nuGet sucks. first experience with websockets4 sucks. So i try to get Json from somewhere else, and try to use that, and nothing new happens with the dependencies other than I have more references added in the directory.&lt;br /&gt;
&lt;br /&gt;
So im going to try&amp;nbsp;&lt;a href=&quot;http://html5labs.interoperabilitybridges.com/prototypes/websockets/websockets/download&quot;&gt;http://html5labs.interoperabilitybridges.com/prototypes/websockets/websockets/download&lt;/a&gt;&lt;br /&gt;
the sort of official implementation of websockets.&amp;nbsp;from the Microsoft site I find that I need to include &quot;using System.Json&quot; which I don&#39;t have. So I also need to go get that. So after more reading I find that Json is not supported by Windows Phone, so another dead end.&lt;br /&gt;
&lt;br /&gt;
None of those projects worked with sockets as the functions that I needed like TcpClient dont exist for Windows Phone. So WebSocket4Net doesn&#39;t do much without the TcpClient, or things like Listen... looking at that again to see if there&#39;s something I missed...&lt;br /&gt;
&lt;br /&gt;
update 6pm&lt;br /&gt;
further investigation leads me to believe that websocket4net might still have some solutions, it&#39;s just undocumented and opaque. WebSocketSamples.zip from their site should shed some light on how the functions are used. I hope.&lt;br /&gt;
&lt;br /&gt;
So, im doing something liket this...&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ws = new WebSocket((&quot;ws://&quot; + hostName + &quot;:&quot; + portNumber));&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ws.Opened += new EventHandler(ws_Opened);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;ws.Open();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Debug.WriteLine(&quot;state?&quot; + ws.State.ToString());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: x-small;&quot;&gt;So the Output for that ends up like&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;state?Connecting&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;So im guessing that there&#39;s something missing on the server side.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;But it is doing something... I think im getting closer.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/4623698433767949050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/04/silverlight-websockets-and-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/4623698433767949050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/4623698433767949050'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/04/silverlight-websockets-and-windows.html' title='Silverlight websockets and windows phone day 2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-8100906073900195197</id><published>2012-04-20T17:16:00.001-07:00</published><updated>2012-04-20T19:04:14.628-07:00</updated><title type='text'>Silverlight Windows Phone and Sockets part 1 of an on going learning experience.</title><content type='html'>So im going to be learning how to write a silverlight app on a windows phone to send gyro data to a pc. Sounds simple, but from the get go I found that the http version of socket is really damn slow, so I&#39;m supposed to use websocket so i&#39;ve been told. Right now I have an HTTP version of this working which is really slow.&lt;br /&gt;
&lt;br /&gt;
so here it goes. I&#39;m going to read&lt;br /&gt;
&lt;a href=&quot;http://www.rajneeshnoonia.com/blog/2010/12/silverlight-websockets-duplex-communication/&quot;&gt;http://www.rajneeshnoonia.com/blog/2010/12/silverlight-websockets-duplex-communication/&lt;/a&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;a href=&quot;http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2010/07/27/silverlight-and-websockets.aspx&quot;&gt;http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2010/07/27/silverlight-and-websockets.aspx&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
so hopefully I&#39;ll be able to wrap my head around sockets in general by the end of the day.&lt;br /&gt;
So websockets allow TCP over a single socket. and Wiki says that any client can use websockets not just browsers. Which is good since im writing a silverlight client. Wiki also mentions &quot;realtime games&quot; which is good since I need to send gyro data as fast as possible from the phone to the pc to use the phone as a controller.&lt;br /&gt;
&lt;br /&gt;
So the wiki technical overview mentions that some browsers dont support this for security reasons, im hoping that the latest version of silverlight im running does support websockets, or im SOL.&lt;br /&gt;
&lt;br /&gt;
Wiki mentions something about a handshake, which is what my fellow programmer mentioned, so it seems like im on the right track. Okay so enough with the wiki, onto the URLs i mentioned.&lt;br /&gt;
&lt;br /&gt;
first with&amp;nbsp;&lt;a href=&quot;http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2010/07/27/silverlight-and-websockets.aspx&quot;&gt;http://mtaulty.com/&lt;/a&gt;&amp;nbsp;he mentions TCP being full duplex and open and closes a connection only at the beginning and end of a session. I want to do this, so again seems like im on the right track. This is better than the http version of the app im working with right now with &quot;using System.Net.Sockets;&quot; in my C# app so far.&lt;br /&gt;
&lt;br /&gt;
he also mentions that i should read&amp;nbsp;&lt;a href=&quot;http://www.whatwg.org/specs/web-socket-protocol/&quot;&gt;http://www.whatwg.org/specs/web-socket-protocol/&lt;/a&gt;&amp;nbsp;but really? it&#39;s a gigantic unformatted txt file... WTF? it does mention a lot of UTF8 looking bytes that are line breaks and stuff. so i&#39;ll just stick to that being something about the sorts of characters to send to make websockets do specific things.&lt;br /&gt;
&lt;br /&gt;
but what? Now he&#39;s talking about http polling and other &quot;tricks&quot; and how great http is making use of sockets. No, i dont want http, it&#39;s slow!&lt;br /&gt;
&lt;br /&gt;
okay, hes going back into websockets now. so it&#39;s looking like things are back on track....&lt;br /&gt;
&lt;br /&gt;
reading about checking if your browser supports websockets, i&#39;ll skip this shit... and he just says use WebSockets open send close methods to use websockets... fucker, that didnt help worth shit.&lt;br /&gt;
&lt;br /&gt;
after further research on msdn I find&amp;nbsp;&lt;strong style=&quot;color: #5d5d5d; font-family: &#39;Segoe UI&#39;, Verdana, Arial; font-size: 13px; text-align: left;&quot;&gt;.NET Framework 4.5&amp;nbsp;&lt;/strong&gt;has system.net.websockets, which is what I need, and it&#39;s a beta... so lets see if i can get it to work in visual studio 2010 found it here&amp;nbsp;&lt;a href=&quot;http://www.microsoft.com/download/en/confirmation.aspx?id=28978&quot;&gt;http://www.microsoft.com/download/en/confirmation.aspx?id=28978&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
i read somewhere that it&#39;s not side-by-side compatible with 4.0 so lets hope that the beta mostly works for what I need. since the WebSocket part of the framework is new I&#39;m hoping that they spent a lot of time on this part to make it work right. crossing my fingers...&lt;br /&gt;
&lt;br /&gt;
update ~4pm:&lt;br /&gt;
ah! so i found that mtaulty guys video posts which seem a lot more informative&amp;nbsp;&lt;a href=&quot;http://channel9.msdn.com/blogs/mtaulty/silverlight-4-beta-networking-part-9-udp-multicasting&quot;&gt;http://channel9.msdn.com/blogs/mtaulty/silverlight-4-beta-networking-part-9-udp-multicasting&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I installed .NET 4.5 and there&#39;s no system.net.winsockets reference to add. I&#39;m not sure what else might have been added but I can&#39;t really tell if there&#39;s a way to check if 4.5 installed correctly since it just over wrote 4.0 stuff. So I&#39;m going ahead and Installing Visual Studio 2011 beta, so I hope that perhaps that might have the websocket thing I need to add to the project so I can write this client for the phone &lt;i&gt;if&lt;/i&gt; the phone can even make use of the new .net libs through silverlight.&lt;br /&gt;
&lt;br /&gt;
update ~7pm:&lt;br /&gt;
After installing the Visual Studio 2011 beta I&#39;m met with a rather start grey everything. Kinda neat, but also pretty flat and it feels awkward with the windows 7 glassy frames. And, starting up a project I find I have to go to the on-line templates to find a Windows Phone template that might have what I need. And once I got that up I check for System.Net.Websockets and &lt;i&gt;NOTHING &lt;/i&gt;I can&#39;t find the reference to add to my phone project. So I&#39;m pretty much dead in the water.&lt;br /&gt;
&lt;br /&gt;
looks like I&#39;ll have to write a small javascript web app to websocket data from silverlight to the PC.&lt;br /&gt;
We&#39;ll take a look at how that might work on monday. For now I&#39;m going to go home and enjoy some Unrealscript and shoot things.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/8100906073900195197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/04/silverlight-windows-phone-and-sockets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/8100906073900195197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/8100906073900195197'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/04/silverlight-windows-phone-and-sockets.html' title='Silverlight Windows Phone and Sockets part 1 of an on going learning experience.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-3211407475339338719</id><published>2012-02-08T16:19:00.000-08:00</published><updated>2012-02-08T16:25:57.489-08:00</updated><title type='text'>Starting to get into Game Maker</title><content type='html'>Just figuring out how to build scripts in Game Maker.&lt;br /&gt;
&lt;br /&gt;
So far it&#39;s pretty simple. Almost over simplified. However, it&#39;s got a lot of clever things.&lt;br /&gt;
The timeline editor seems like a pretty simple way to control flow of action.&lt;br /&gt;
Add in a step0 and call some script.&lt;br /&gt;
Then add in Step at position 1, and then make it sleep &quot;Zzz&quot; for 1000 ms, or a second.&lt;br /&gt;
then add in a step at 2, resume timeline.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht91XpxhWeEaMhI2CjRRwFu1pZIXpgJ4oP47-sX1gIz1_k7FgqKUI9B41ztZTbcrpZ8fCirYEnZ4e6oAHt6LKk3K9dZBsAYNLoDz2QyLL6QZ7CRwAAYjpf-2GLOPUTr2B1L9X3RoSpiZI/s1600/snap0021.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht91XpxhWeEaMhI2CjRRwFu1pZIXpgJ4oP47-sX1gIz1_k7FgqKUI9B41ztZTbcrpZ8fCirYEnZ4e6oAHt6LKk3K9dZBsAYNLoDz2QyLL6QZ7CRwAAYjpf-2GLOPUTr2B1L9X3RoSpiZI/s320/snap0021.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Set the timeline to loop and you have a script that executes once a second on the object the script is applied to.&lt;br /&gt;
I have an object which on create sets it&#39;s timeline and then starts it.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQWcqozR8uUFMxWf23A1MXJn0hjXHCB-pTQnWltSIqTi1a92f0HfrjEDowlmRHRTSFMNsCJB6tXFuaeWu4InGlS3aOK_7quN9wJulFJxIl8xRV_qf5f_o1sxnKZ5C3b-FYDbgE3eQ2iNg/s1600/snap0020.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;137&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQWcqozR8uUFMxWf23A1MXJn0hjXHCB-pTQnWltSIqTi1a92f0HfrjEDowlmRHRTSFMNsCJB6tXFuaeWu4InGlS3aOK_7quN9wJulFJxIl8xRV_qf5f_o1sxnKZ5C3b-FYDbgE3eQ2iNg/s320/snap0020.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
then my script looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;globalvar someVar;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;cfTime = 1.0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;cfTime += someVar;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;show_debug_message(cfTime);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;someVar += 1.0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
with this script applied to the timeline to execute, the messages increment +1 every second. pretty simple.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ9ONCPU8QIyjnxy6Swwh6eaJbSRWZ426kEFHTc2a9nIudQEYalNMlNYlOi6PfYDRJnyWXf2vtIqmEZTtSZ59XPwt_dSWPTt36SsDbJMO32TOOg7_GZj8dCHyewu6Ugy9x9PuaMj5vBDk/s1600/snap0019.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ9ONCPU8QIyjnxy6Swwh6eaJbSRWZ426kEFHTc2a9nIudQEYalNMlNYlOi6PfYDRJnyWXf2vtIqmEZTtSZ59XPwt_dSWPTt36SsDbJMO32TOOg7_GZj8dCHyewu6Ugy9x9PuaMj5vBDk/s320/snap0019.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
in the messages window when running in debug i get a nice counter. I&#39;ll be using this for a lot of things, Just getting all of my globalvar&#39;s to be easily remembered is going to be a big part of the organization of this project.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/3211407475339338719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2012/02/starting-to-get-into-game-maker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3211407475339338719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/3211407475339338719'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2012/02/starting-to-get-into-game-maker.html' title='Starting to get into Game Maker'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht91XpxhWeEaMhI2CjRRwFu1pZIXpgJ4oP47-sX1gIz1_k7FgqKUI9B41ztZTbcrpZ8fCirYEnZ4e6oAHt6LKk3K9dZBsAYNLoDz2QyLL6QZ7CRwAAYjpf-2GLOPUTr2B1L9X3RoSpiZI/s72-c/snap0021.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-1205976815848868064</id><published>2011-12-19T10:22:00.000-08:00</published><updated>2011-12-19T11:01:20.545-08:00</updated><title type='text'>colons are full of...</title><content type='html'>comparing unreal script and javascript&lt;br /&gt;function declaration in unity3d vs Unreal&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;javascript:&lt;br /&gt;&lt;br /&gt;function SomeCondition():boolean&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    return false;&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;what&#39;s the ():&quot;somereturn value?&quot;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;unrealscript:&lt;br /&gt;&lt;br /&gt;function bool SomeCondition()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    return false;&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;for some reason, I prefer using :&#39;s a lot less. the formatting of putting the return value after the arguments makes less sense to me for some reason.&lt;br /&gt;even in C# you have&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public bool SomeCondition()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    return false;&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;Not sure I&#39;ll be into this js stuff in unity, or at least it&#39;s abundance of colons.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/1205976815848868064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2011/12/colons-are-full-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1205976815848868064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/1205976815848868064'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2011/12/colons-are-full-of.html' title='colons are full of...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-4461596922235412043</id><published>2011-12-15T18:15:00.000-08:00</published><updated>2011-12-15T18:15:26.317-08:00</updated><title type='text'>SOPA keeps going on!!</title><content type='html'>Now there is a debate on how an amendment doesn&#39;t need a court order to take down a site. Mel Watt, says &quot;I&#39;m not convinced there doesn&#39;t need to be a court order to take down a site&quot; and in fact, there is no recourse if an ISP takes down a web site for the web site&#39;s owner. The owner will not be notified and poof, their web site is gone, simply because there&#39;s no need by the amendment to inform or allow for any notice to the web site owner. And there&#39;s no court order required if the ISP is asked to take it down.&amp;nbsp;Issa is asking to add a requirement for a court order before any legal action is taken.&lt;br /&gt;
&lt;br /&gt;
And now the vote, and the result is the same as it&#39;s been all day, NO. So far all of the amendments that break the terror that is the SOPA are not being broken down. The bill is going to remain venomous and onerous as it started off. If anything it&#39;s getting worse. The voting has been consistently 10 for freedom of speech and 24 for&amp;nbsp;squelching the right to fair use rights.&lt;br /&gt;
&lt;br /&gt;
Jared Polis is making everyone aware that anyone could issue a website take down. And he&#39;s asking that a court order is required before issuing any take down notice, and there has to be some merit before the order is issued.&lt;br /&gt;
&lt;br /&gt;
Smith insists that the &quot;media publishers&quot; cannot take down web sites if there is a court order required. He&#39;s got all of his reasons written for him. Berman is also on the side of the chairman. Stating that &quot;good faith&quot; is the only thing that&#39;s required for a take down. DMCA offers a counter notice. SOPA tosses out the notice. Lofgren is still pushing toward adding some court order to limit the ease of any company &quot;Like Comcast&quot; who could take down any site just because it might compete with their services.&lt;br /&gt;
&lt;br /&gt;
Polis chimes back in to remind people that only a letter is required without any checks or balances to take down someone&#39;s business.&amp;nbsp;&lt;a href=&quot;http://chaffetz.house.gov/&quot; style=&quot;color: #2a548c; font-family: sans-serif; font-size: 12px; line-height: 18px; text-decoration: none;&quot;&gt;Chaffetz, Jason&lt;/a&gt;&amp;nbsp;is reminding people that any web site that&#39;s taken down can be someone&#39;s work, their business, and their lively hood. Reminding the&amp;nbsp;committee&amp;nbsp;that all it takes is a paper to reduce the competitive nature of the internet as a business. And we need to protect peoples rights, not take them away.&lt;br /&gt;
&lt;br /&gt;
OMG Mel Watt says a compromise with a notice is worth amending.&lt;br /&gt;
&lt;br /&gt;
However, it seems like the hearing tonight will end with no free speech or internet business positive amendments being made. All of the votes are failing 2 to 1 with the minority being the only people speaking and making any moves to change the bill.&lt;br /&gt;
&lt;br /&gt;
so frustrating.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/4461596922235412043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2011/12/sopa-keeps-going-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/4461596922235412043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/4461596922235412043'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2011/12/sopa-keeps-going-on.html' title='SOPA keeps going on!!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-386401536541811721</id><published>2011-12-15T14:52:00.000-08:00</published><updated>2011-12-15T14:52:35.827-08:00</updated><title type='text'>more SOPA</title><content type='html'>Issa points out a flaw in the amendment in that there is a part of the bill that allows for enforcing copyright from any other nation in our nation. This is only US law, not international law, it&#39;s way too far reaching. So we need to limit the copyright law to just this country. 6 - 24 Copyright loses... so angry about that. Why do we need to enforce copyrights from china here? China don&#39;t enforce our copyrights over there.&lt;br /&gt;
&lt;br /&gt;
So dumb.&lt;br /&gt;
&lt;br /&gt;
So far every amendment to an amendment has been voted NO, so basically this bill will pass through the justice without any changes to it&#39;s venomous idiotic ways. Looks like free speech is going to have to go to dark net forums, like it&#39;s the french underground hiding from the SS. Yep, I said it. the DOJ is now the copyright nazi party.</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/386401536541811721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2011/12/more-sopa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/386401536541811721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/386401536541811721'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2011/12/more-sopa.html' title='more SOPA'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-2093149339576520701</id><published>2011-12-15T13:17:00.000-08:00</published><updated>2011-12-15T13:18:36.665-08:00</updated><title type='text'>SOPA coverage continued.</title><content type='html'>The chairman is being asked by Ms Waters to tell them to shut up because he&#39;s already convinced that the bill should pass, so all of the&amp;nbsp;arguments&amp;nbsp;by the reps will be ignored.&lt;br /&gt;
&lt;br /&gt;
Mr Poe is also suggesting we delay. Lungren is asking for a closed conference with the NSA and other security govt groups to talk about the DNS filtering threat. A classified&amp;nbsp;Briefing.&lt;br /&gt;
&lt;br /&gt;
Sanchez asks for 7 days of legislative review. He also points out the original draft had ISP defined incorrectly, so they need to make sure that everything is at the very least written correctly.&amp;nbsp;&lt;a href=&quot;http://jacksonlee.house.gov/&quot;&gt;http://jacksonlee.house.gov/&lt;/a&gt;&amp;nbsp;Said mr king of iowa was being offensive by not attending and simply surfing the net instead of being at the hearing.&lt;br /&gt;
&lt;br /&gt;
... someone asked to remove that &quot;offensive&quot; line from the record... she called him incapable of multi-tasking :D&lt;br /&gt;
wow this is taking a long time to strike a word from the record... oh my gawd, she&#39;s asking for a parlamentarian to assist with the rules of the house&#39;s records... fawk...&lt;br /&gt;
&lt;br /&gt;
alright, looks like this isnt going anywhere any time soon. I&#39;ll read the transcript later tonight when all this shit is done...</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/2093149339576520701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2011/12/sopa-coverage-continued.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/2093149339576520701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/2093149339576520701'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2011/12/sopa-coverage-continued.html' title='SOPA coverage continued.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4463665967905224519.post-522453508472296332</id><published>2011-12-15T13:00:00.000-08:00</published><updated>2011-12-15T13:00:48.856-08:00</updated><title type='text'>posting about the hearing in the house of reps covering SOPA</title><content type='html'>Darrell Issa says the bill sucks and ammends that search engines and dns filtering wont work, this is supported by Lofgren, Sanchez, and Chafetz at the beginning of the hearing. Chafetz calls the people on the internet &quot;the nerds of the world,&quot; LOL.&lt;br /&gt;
&lt;br /&gt;
Issa continues to educate the house that &quot;hyperlinks are words, and you cant stop the printed word&quot; he&#39;s saying that the bill should be handled more like patent reform. and wants to at least have more hearings not just default to one hearing.&lt;br /&gt;
&lt;br /&gt;
Mel Watt&amp;nbsp;is a slow speaker. and admits he doesn&#39;t know anything about technology. And thinks that the bill will not stop criminal action, but still wants to pass the bill just to reduce the criminal actions. He thinks the DMCA wasnt effective, so thats why there needs to be a more dramatic bill. He likes to remind people that he&#39;s &quot;not a nerd&quot; Still uses a typewriter I&#39;m sure. He&#39;s completely ignorant on the internet and is allowed to pass legislation on technology he knows absolutely nothing about.&lt;br /&gt;
&lt;br /&gt;
Mr. Berman another slow speaker thinks that the people who work on the internet haven&#39;t been coming forth to tell the house that they are being dumb.&amp;nbsp;&lt;a href=&quot;http://sensenbrenner.house.gov/&quot;&gt;http://sensenbrenner.house.gov/&lt;/a&gt;&amp;nbsp;tells berman that he&#39;s only got a copy of the bill a few days ago, and hasn&#39;t been able to analyze it. Berman is talking about the length of time that this bill has been put forward, but also admits that there should have been ample time to think about the issues.&lt;br /&gt;
&lt;br /&gt;
Sanchez is putting forward a suggestion to delay the hearing to bring in more experts. Berman is saying he&#39;s been trying for years to bring them in, but they haven&#39;t shown up. Sanchez is saying that they will now. Berman doesn&#39;t care.&lt;br /&gt;
&lt;br /&gt;
Mr. Goodlatte has&amp;nbsp;&lt;a href=&quot;http://www.innovationpolicy.org/&quot;&gt;http://www.innovationpolicy.org/&lt;/a&gt;&amp;nbsp;as a site that supports SOPA, who the heck are these guys? says DNS filtering is fine and it&#39;s an innovation. This guy sucks.&lt;br /&gt;
&lt;br /&gt;
Mr. Perlusi notes that we should respect &quot;nerds&quot; suggests that to continue the markup and to delay the passing of the bill. Sanchez asks for a technical hearing to cover the bill. Lofgren says the Goodlatte&#39;s arguements are supported by people funded by the MPAA (zing!) and is saying they&#39;re paid&amp;nbsp;liars. (poking at&amp;nbsp;Mel Watt)&lt;br /&gt;
&lt;br /&gt;
California Lungren rep says that there is controversy and offers to delay the hearing as well, expecting that there would be technical people present at this hearing. He also puts forward that the facts are incomplete. He&#39;s telling the chairman that saying &quot;because you don&#39;t have a better answer, you can&#39;t stop the bill&quot; which is &quot;a red herring&quot; so we should change his opinion and wait for a better way to rule on the bill. He also opts to not pass the bill if you dont understand it.&lt;br /&gt;
&lt;br /&gt;
Mr. Issa is asking for experts to show up. Computer IT folks should pay more attention to this shit...&amp;nbsp;&lt;a href=&quot;http://www.netcoalition.com/&quot;&gt;http://www.netcoalition.com/&lt;/a&gt;&amp;nbsp;was mentioned by Issa to show up
Mel Watt&amp;nbsp;is talking again, about who&#39;s been bought off. and talking about a lot of money floating around, and is being defensive about his position. So, he&#39;s being defensive because he&#39;s obviously been in his own words: &quot;been bought off&quot; He also passed laws on derivatives (responsible for the crash of 2008) so Mel Watt has a history of bad decisions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rxokita.blogspot.com/feeds/522453508472296332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rxokita.blogspot.com/2011/12/posting-about-hearing-in-house-of-reps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/522453508472296332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4463665967905224519/posts/default/522453508472296332'/><link rel='alternate' type='text/html' href='http://rxokita.blogspot.com/2011/12/posting-about-hearing-in-house-of-reps.html' title='posting about the hearing in the house of reps covering SOPA'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04596634479991266692</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>