gunning

Members
  • Content count

    1831
  • Joined

  • Last visited

Community Reputation

749 Good

About gunning

  • Rank
    Contributor
  1. Best Fast Food

    [quote name='coderx75' timestamp='1329854119' post='4915243'] Man, let's just say that I won't eat anything of which that question would even need to be asked. [/quote] From what I can tell most restaurants are pretty bad for you overall not just fast food. We'd all do better to cook more healthy meals at home and then not feel guilty eating out once in a while.
  2. Staying up all night.. how often? healthy?

    [quote name='way2lazy2care' timestamp='1329833216' post='4915166'] I think getting something like this ([url="http://www.myzeo.com...ger-mobile.html"]http://www.myzeo.com...ger-mobile.html[/url]) might give me something a little more scientific. I really like the idea of it waking you up when you're ready to wake up also. For $99 it seems like it might be worth a try. [/quote] I can vouch for Zeo. The way I describe SmartWake is it's not so much being woken up as it is "Hey, you're already kinda awake so get out of bed." It generally works great. Some days though I'll stay in deep sleep for all 40 minutes, but at least then you can see that on the graph. The reason I bought it was because I was forced to catch a 6:50am bus to work when I'm used to being at work before 10am... and I had enough trouble getting to work then!
  3. using the kinect sensor + pc for motion capture

    [quote name='noisecrime' timestamp='1326253111' post='4901517'] However their justifications make no sense. They claim the cost on xbox is off-set by purchase of kinect games, well wont that be true on PC too?[/quote]I think the direction they want for the PC kinect is different than the xbox. It probably won't be gaming/entertainment-centric, and in that case, less likely to be subsidized by games. [quote]Anyway unless they stop producing single kinect units for xbox ( can't see that being possible), or they add some secuirty to prevent them being used on PC's, its just easier to buy the xbox version for now to learn the ropes, then any commerical usage buy the full price one.[/quote]See below. The xbox kinect isn't practical for PC uses. [quote]Sadly their current approach just seeems so shortsighted.[/quote]Only time will tell. I think the idea to bring kinect to PC has a lot of potential though and it could end up being brilliant. With 3D monitors coming in our future, I could imagine video chatting in 3D with the depth camera. Or double blinking to double click. Or all kinds of gestures/pointing that make more sense than using keyboard and mouse. Ultimately we won't know what is possible and practical until they open it up to the market, but the idea itself has quite a bit of potential if you think about it. [quote]It mentions a new 'near mode' via a firmware update, working at 50cm, yet i'm sure the original was working at around 50-80 cm, so either no real change or a minor one. Besides the main issue for using the kinect isn't the closeness, but the fov (for which a company has manufactured a lens kit to aid in that). [/quote]Actually the original didn't work at all in the 50-80cm range. I think the nearest you could be was ~140cm. The depth camera just isn't accurate and also has a strange double-vision as you get close. I did some experimenting with the kinect sdk and always had to move way back in the room to test anything.
  4. What Does Everyone Think About The New Site Layout?

    While we're at it, can we change the slogan to "GDNet, following the crowd since 2011."? GDNet has lost it's identity. Bland. Boring. Web 2.0. For a game development site, where's the creativity? Where's the do-it-yourself attitude? Let the new generation enjoy this site.
  5. The right direction for a student?

    Quote:Original post by CirdanValen I don't NEED the job. I got it because mom was pushing me to get a job, not sure why...probably just to get me off my butt. This was(is?) my first real job. I've learned a lot by it, and have become a lot more sociable with people I've never met before (I was VERY shy before this job) so this job has improved me as a person. At this point I've learned everything that this job can teach, so I think I'm ready to move on.It sounds like you already know what you should do. Just do it. College is already a full-time job. Unless you're in a bad situation financially, it's crazy to work on top of that. Education is far more important. I always worked hard during the summers and saved enough money so I never had to work during school.
  6. What do you listen to while programming?

    Quote:Original post by et1337 Pandora One rocks for this! It was well worth the $30/yr for me. Pandora does rock. So does Slacker (my preference). I think slacker has a bit more variety within the stations which can be a good thing or a bad thing.
  7. Quote:Original post by alvaro This is what old-timers call a coroutine. There are a couple of implementations of coroutines available for C++, but I haven't tried them myself. You can always launch the operation in its own thread and then communicate between threads. I imagine what those coroutines libraries provide is some sort of cooperative multithreading (see fiber).Sweet. Coroutine was the term I was looking for. I just spent an hour on wikipedia and another hour reading the documentation for boost::coroutine. Yes the boost::coroutine lib (not officially a part of boost) does use Win32 fibers for the windows implementation. There was a forum post from last year that said it was unfinished and buggy, but I'm not convinced because there are so many examples so I'm going to give it a try and find out if it's true. Thanks. Quote:To be pedantic, C# (via the .Net platform) provides generators, not full coroutines. (Yes, yes, you can mimic coroutines with generators, blah blah blah, but as I said I'm being pedantic ) Well actually ... don't you mean you can mimic semi-coroutines with generators? [smile] (I don't claim to know what I'm talking about) Quote:I'd do some evil operator overloading magic for this one. Ideally the resultant code should look like this: Cool. This looks interesting. Where would you place the custom code to run between steps? Inside ActionChain? Quote:std::vector<std::pair<boost::function, boost::function>> functions_; I've never used the boost::function or std::pair templates before. When you bind the two functions together, does that guarantee that they always run together? And boost::function can generalize to any function with any parameters? Thanks for the help so far.
  8. Quote:Original post by Captain P You'll need to retain some state, so wrapping the function into an object would make sense here. This object could have (or reference) a container of function pointers and a counter that indicates what operation it's at. Yep a map of function pointers is one way to do this. However, it's still not as ideal as I would like. The suboperations may have different parameters so it's difficult to generalize. As a comparison, I saw a nice solution for this problem in C# that used a method that returns IEnumerable to yield the results of the sub-operations. Then the caller used the method in a foreach statement. After each yield, the caller has a chance to run its code. It looked similar to this: class MyObject { IEnumerable<bool> Operation() { yield return SubOperation1(...); yield return SubOperation2(...); ... yield return SubOperationN(...); } } // To use the operation foreach (bool success in myObject.Operation) { if (!success) break; // Custom code } Here the caller doesn't have to know anything about the suboperations or the parameters they take. Come to think of it, I don't need to pause and resume the operations. Just running code between each of the steps is good enough. Quote:But, what exactly is the context you're working in? Win32 program automation. I'm writing a program that automates actions in a GUI application and between each action I need to perform several tests. Also, I may want to sleep for a certain period of time to slow the automation code down for debugging purposes. Edit: Fixed the C# example. [Edited by - gunning on November 11, 2010 3:28:55 PM]
  9. I have a function in C++ that runs many sub-operations. Each sub-operation returns a boolean of whether it succeeds. It looks like this: void Operation() { return SubOperation1() && SubOperation2() && ... && SubOperationN(); } If any of the sub-operations fail along the way, the main operation terminates immediately. Simple. Here's where it gets complicated. I want to be able to pause Operation() at any step along the way and resume it. I want to be able to run custom code between the SubOperations if necessary. Obviously, one way to do this is with a big switch statement that takes the current step as input and returns the next step. int Operation(int i) { switch(i) { case 0: if (SubOperation1()) return 1; else return END; case 1: if (SubOperation2()) return 2; else return END; ... case N: SubOperationN(); case END: return END; } } But it's not very clean. Adding new sub-operations requires a lot more work than before. Can you think of a better way to implement this? [Edited by - gunning on November 11, 2010 2:37:24 PM]
  10. What do you listen to while programming?

    Anything with strong vocals and noise distracts me. I try to vary it up, but usually it's either Slacker Radio's Classical Light Hits, Chill or Trance playlists, or some relaxing music of my own like Death Cab, Coldplay or Imogen Heap.
  11. Look into StreamReader and StreamWriter.
  12. Carmack on government

    Quote:Original post by Prefect So to make it very plain, the US$-denominated means of the government are infinite. It cannot possibly exceed its means. Don't believe me? Just look at the Fed: it is clearly totally possible for the US government to spend 600 billion US$ just like that.Not disagreeing, but every time the Fed produces money the value of the dollar goes down. It has the same monetary effect as a universal tax but people don't think of it like that.
  13. Thanks, and thanks. If the PCIe bus is the bottleneck, then I guess it's true it wouldn't matter much whether I use glDrawPixels or DirectDraw or DirectX Graphics. Pixel shaders are an interesting suggestion. I'm testing out some software renderer ideas.
  14. Five years ago, if I wanted to write directly to the frame buffer on a Windows machine, DirectDraw was fastest choice. With DX10 and Direct2D, is that still true today? Also, will DirectDraw always work? What I mean is five years from now could graphics card manufacturers stop writing drivers for it or something like that?
  15. I want to break

    Scariest game of 2010: Amnesia the Dark Descent