• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

138 Neutral

About Fallen_Angel

  • Rank
  1. Currently in the market for some fun multiplayer games on either gamecube or PS2 to play with my wife. Preferably something that isn't overly complex or requires too much skill as she's not an avid gamer and would get frustrated easily. Games she's currently played have been things like Mario Kart or Mario Party however we're both getting bored of those.
  2. [.net] Multi-threading web services in C#

    Well I've tried moving the Monitor.Enter/Exit around and it seems to work. My code now looks like this: //MessageBox.Show("pre"); Monitor.Enter(this); strMethod = cboMethods.Items[nItem].ToString(); nItem++; strFilename = "Data\\test.asmx - " + strMethod + ".txt"; strURL = "http://testurl/test.asmx"; Monitor.Exit(this); strResult = InvokeService(strFilename, strURL, strMethod); LoadViewList(strResult); //MessageBox.Show("post"); The problem that I have now is that my five initial threads are started and simply seem to hang doing nothing. However if I uncomment the "pre" & "post" message boxes it all seems to run correctly. Any way of getting this running without the message boxes in place as it's not going to be practical having to click 4000 of them?
  3. Biggest and Best Game Idea...EVER

    Quote:Original post by Trapper Zoid From what I've read, for computer science students fresh out of the college, the average starting salary is approximately A$40,000 a year in Australia ... I'm not sure what the average starting salary is these days for new grads moving specifically into computer game programming, but when I was job hunting five years ago it was around A$5,000 p.a. less than the average Grads starting here this year were on about AU$45k I think. Going by these figures, I think I'll be leaving game dev as a hobby rather than a career option
  4. Biggest and Best Game Idea...EVER

    Quote:Original post by Trapper Zoid Of course, the pay might be slightly lower than the industry average, and the hours will be long and sometimes insane, but it seems that's what commercial game dev is like (unfortunately [smile]). Just curious, but what is the "industry average" here in oz?
  5. I'm currently developing an app for work which is to be used to test the connectivity to web services in order to verify new environment builds. This section of it is working correctly, however there is over 2000 web methods that need to be tested and this takes around an hour to execute. I'm hoping to cut down this time by multi-threading my app but am not having too much success with it (haven't done this sort of coding since university). I have managed to get basic threading working with just using the Thread.Sleep() method however when trying to convert this logic to invoking web methods I am not seeing any performance gain. This is my current code: public class Form1 : System.Windows.Forms.Form { DateTime d1, d2; TimeSpan ts; int nItem, nThreads; ThreadStart asdf = null; public Form1() { nItem = 0; nThreads = 0; asdf = new ThreadStart(ThreadFunc); InitializeComponent(); } private void cmdExecuteThreaded_Click(object sender, System.EventArgs e) { d1 = DateTime.Now; nItem = 0; listView1.Items.Clear(); nThreads = 5; Thread t1 = new Thread(asdf); t1.Name = "asdf1"; t1.Start(); Thread t2 = new Thread(asdf); t2.Name = "asdf2"; t2.Start(); Thread t3 = new Thread(asdf); t3.Name = "asdf3"; t3.Start(); Thread t4 = new Thread(asdf); t4.Name = "asdf4"; t4.Start(); Thread t5 = new Thread(asdf); t5.Name = "asdf5"; t5.Start(); } public void ThreadFunc() { string strMethod = "", strFilename = "", strURL = "", strResult = ""; Monitor.Enter(this); strMethod = cboMethods.Items[nItem].ToString(); strFilename = "Data\\test.asmx - " + strMethod + ".txt"; strURL = "http://testurl/test.asmx"; strResult = InvokeService(strFilename, strURL, strMethod); LoadViewList(strResult); nItem++; Monitor.Exit(this); if (nItem < cboMethods.Items.Count - 4) { Thread tNew = new Thread(asdf); tNew.Name = Thread.CurrentThread.Name; tNew.Start(); nThreads++; } nThreads--; if (nThreads == 0) { ThreadFuncDone(); } } public void ThreadFuncDone() { d2 = DateTime.Now; ts = d2 - d1; MessageBox.Show(ts.TotalSeconds.ToString()); } public void LoadViewList(string strData) { string[] arrData = strData.Split('$'); ListViewItem item = new ListViewItem(arrData[0]); item.SubItems.Add(arrData[1]); item.SubItems.Add(arrData[2]); item.SubItems.Add(arrData[3]); item.SubItems.Add(arrData[4]); listView1.Items.Add(item); } public string InvokeService(string strFilename, string strService, string strMethod) { string strResult = ""; try { //Generate XML request here... strResult = "PASS$" + strService + "$" + strMethod + "$" + "Execution Status$" + currentNode.text; } catch (Exception e) { strResult = "FAIL$" + strService + "$" + strMethod + "$" + "Exception$" + e.Message + " - " + e.ToString(); } return strResult; } } Any ideas where this is going wrong?
  6. Biggest and Best Game Idea...EVER

    Quote:Original post by bikola_p Its a Merge of Command ANd conquer, the sims, some MMOGame, Sim City, and a whole lotta other cr@p. What? No hockey?
  7. Automatic login broken?

    Quote:Original post by superpig Have you tried deleting the Gamedev cookie? If you've not been around for a year or so you might have a stale cookie that is breaking things. Shouldn't have been an issue as I am now using a new laptop (my motivation to start coding again). But from your other post it sounds like I'll just need to be patient and wait this one out...
  8. Automatic login broken?

    Windows XP SP2 IE 6
  9. I've just started coming back here regularly after taking a year or two off from coding and am noticing that the auomatic login isn't working properly for me anymore (pretty sure it used to last time I was here). I'm finding that I stay logged in for the day that I do sign in no matter how many times I open and close the browser, however when I visit the next day I'm logged out again. When I log in I'm selecting to remember my password and to log in automatically but when I come here a day later it's doing neither. Is there anyone else having this issue or am I just lucky?
  10. I've been working on writing an MSN client as a way to get back into programming after taking a break for a while. I've been able to get the client to talk and authenticate to the server without any problems however I am now looking for the best way to go about putting my client in a ready state waiting for server messages (users coming online, receiving messages etc) and am not sure how to go about this in C#. The only networking code I have done was about 3 years ago using C. My client currently talks to the MSN server using the TcpClient class however I am not seeing any obvious way to stick it into a ready state once I'm done logging in. I'm thinking that it'd be possible to simply read the NetworkStream at timed intervals and check for any new messages although this doesn't seem overly practical. I've looked at the TcpListener class however the examples for this seem to be more geared towards setting up a server rather than a client listener. Can anyone point me in the right direction to get started with this. I'm using C# 2005 Express with the MSNP9 protocol if that matters.
  11. Job Security vs Morals/Ethics

    Quote:Original post by capn_midnight if you implement the time saving script, then there will be more time to do other tasks. automation does not reduce the number of workers needed, it increases the number of tasks that can be completed. This is exactly the case where I am working. I am currently in a test automation role and have created regression scripts for all of he existing applications here, meaning that the manual testers no longer have to retest anything from the last release. Despite this, the manual testing team is still growing so that more scenarios can be run that cover even more areas of the applications. So despite the fact that the data entry has been automated, in my experience there will be plenty of other tasks that will arise. If not...well that's the nature of contracting.
  12. Oh yeah, I remember that thing now. Sorry then...can't think of a solution for you.
  13. Have finally managed to get this working by setting my turn variables back to false on my frame update after quite a few trial-and-error attempts. Thanks guys for pushing me in the right direction.
  14. What about a simple get/set method? private int nBlah; public int Blah { get { return nBlah; } set { nBlah = value; } } Although I must admit that I don't recall the exact use of the friend modifier...haven't done C++ in quite a while now so I don't know if this will solve your problem.
  15. I'm using absolute coordinates, and I don't think the tolerance is an issue. I moved my code into a new project and output the values getting the following results: However this is wrong as the difference should be 0 since there has been no movement and the moved also should be set to false. I'm still thinking that it has to do with me not setting the turn variables back to false at the right place, however I'm not quite sure where to be doing that now. In my GetInput function is pointless as I've realised since it doesn't get called when there is no input. And in my OnPaint function doesn't work either as it overrides the values and every frame and prevents all movement.
  • Advertisement