Jump to content
  • Advertisement

rpg_code_master

Member
  • Content Count

    790
  • Joined

  • Last visited

Community Reputation

270 Neutral

About rpg_code_master

  • Rank
    Advanced Member
  1. rpg_code_master

    C# - Sending and Receiving using the same TCPClient

    That seems to fix the issue. I guess having a blocking read on one thread and then using the same NetworkStream on another thread was causing issues. I ended up using NetworkStream.BeginRead and NetworkStream.EndRead. (For anybody in the future that has this issue, the (hopefully) working code can be found at: http://code.google.com/p/rpgx/source/browse/trunk/RPGX.Server/Game/GameClient.cs and http://code.google.com/p/rpgx/source/browse/trunk/RPGXEngine/Networking/MessageReader.cs. Revision 25 contains the code refereed to here) Thank you all very much for your kind help, Richard Hughes
  2. rpg_code_master

    C# - Sending and Receiving using the same TCPClient

    Thanks for that. I removed the close after writing to the stream and now I have a different error - progress though. How would you both read and write in the same thread? I thought that when reading, it blocks the current thread? Thanks for your help so far, Richard Hughes
  3. Hello All I am using C# 4 and XNA. I am a bit new to TCP network programming. I have a client and a server. The client can send successfully to the server, but I have am having trouble sending from the server to the client. My question is, using the same TCPClient object, can you both send and receive using it? If I have a loop waiting for messages in one thread and then in another thread I use the same tcp object to send, is this proper? I am guessing not as it does not seem to be working for me. The relevant is hosted in Google Code here (it's only small): http://code.google.com/p/rpgx/source/browse/trunk/RPGX.Server/Game/GameClient.cs Thank you all very much for your help, Richard Hughes
  4. rpg_code_master

    DirectPlay - Now what?

    Hello All I just read that DirectPlay was depreciated in DirectX 8 - what do most people use now - WinSock? C++ i'm thinking of rather than .NET XNA. Thanks for your time, Richard Hughes
  5. rpg_code_master

    How to make a USB doorbell

    I do love the idea of using a mouse - but then I wont be able to use one at the same time :/ The USB button sounds like a cool idea - maybe if I fail... Quote:Original post by benryves *snip* (Of course, if this is intended to be a learning project that does sort of suck out the fun aspect; this is how I'd implement it myself, though). I noticed in the circuit diagram the 10K label - what does that mean? Thanks
  6. rpg_code_master

    How to make a USB doorbell

    Quote:Original post by benryves Using the serial port is an easier route to take; a switch could be connected to the DCD, CTS or DSR pins. When these pins change state, an event can be triggered. If you absolutely must have USB (eg due to a lack of serial ports on your computer) you could use a USB to serial adaptor, which will install a virtual COM port. (Of course, if this is intended to be a learning project that does sort of suck out the fun aspect; this is how I'd implement it myself, though). Sounds interesting - I'll give that a shot. Thanks
  7. rpg_code_master

    How to make a USB doorbell

    Hello All Maybe this is on par to an "I want to make an MMORPG" thread - I have no idea. I would like to make a simple USB door bell - press the button and the computer makes a noise. I my mind this would go one of two ways: press button send signal to PIC PIC sends signal to computer through USB driver picks up signal informs program makes noise OR press button voltage is sent to computer through USB (via battery in doorbell) driver picks up signal informs program makes noise I would love to know how to go about doing this. Can any of you guys give me some ideas? I'm more than happy with programming, so suggestions there good too. Thanks, Richard Hughes
  8. Looking around the web about this issue seems to indicate that a common problem is with code in the Form_Close event. Do you have any code in there, or any threads that need closing? Sometimes the main app will try to close but not leave enough time for the cleanup code to execute/finish executing. What error do you get when the app hangs, and where in your app does it hang? Could it be to do with the file pointer to 'somefile.dat'? Try a plain app just to make sure the Application.Restart() actually works (this sounds silly, but it is what some people suggest). If all else fails, why not try and avoid a complete app restart. Try checking to see if 'somefile.dat' does not exist before it is needed, and if does not exist, create it and continue on with the app. I hope this helps!
  9. For a good example of what can be done, have a look at what is already created. There are many games that are made in Flash, many are made in Java using their 3D API. There are even some which are based on normal postback HTTP methods. Have a hunt and see what you can see.
  10. rpg_code_master

    XNA vs C++

    Quote:Original post by ahung89 How realistic would it be to try to learn both C# and C++ at the same time? I still feel like it's really important that I know C++ by the time I graduate. I could work mostly on the C# and take an online course in C++/take the C++ course at school on the side... I think I can manage it, since I'm a very disciplined and responsible student. Unless the nature of the languages would make it very hard to learn them both at once. Your correct in that the nature of the languages does differ quite a lot. C# is managed and is based upon the .NET framework, C++ is un-managed and uses STL (you don't have too, but it is good too). You will find that from an architecture point of view, both languages, in fact all OO languages are similar - but not the same. It is better to concentrate on one or the other. This way you can learn one language well rather than two OK. Thinking also of the fact that the programming APIs you will use are different too. XNA differs greatly from DirectX and OpenGL. There is nothing wrong with doing both at the same time, but don't let the fact that the languages' syntax are similar fool you into thinking that the languages themselves are similar.
  11. Quote:Original post by dfx_slayer txtItemPrice->Text=reader->GetDecimal(2); This would look like: txtItemPrice->Text=reader->GetDecimal(2)->ToString(); If you want to convert a string into an actual value: String ^myString = "23.5"; Decimal myDecimal = Convert::ToDecimal(myString);
  12. rpg_code_master

    Assembly in C++

    Quote:Original post by Matt_D you pass a pointer via the DWORD. the DWORD's value is then the address of the struct. im not going to paste code, you need to figure it out :) this sort of thing is fundamental to how the CPU actually works. you need to understand it if you want to write things in assembly I think he ment somthing like this: mov ax, word ptr [myStruct] add ax, word ptr [myStruct + 1] add ax, word ptr [myStruct + 2] add ax, word ptr [myStruct + 3] I assume that is correct (the word ptr is because i'm learning good ole' 16-bit asm) etc...
  13. rpg_code_master

    MSVC and Interupts (INT **h)

    OK, that makes sence. Thanks for that. I was wondering why I could do those things when I assembled an app using MASM and run from DOS but not MSVC. I shall look into those things. Thanks guys! :)
  14. Hello All I have decided after many years to finally learn ASM (just for hobby purposes really :)) When trying to put an interupt into my C++ code, I find that it crashes due to an access exception. Looking around these forums and Google, I am getting the impression that you cannot call an interupt from C++ code, only use somthing like int86 from DOS.h. Am I right in thinking that you _cannot_ call an interupt from C++ code? My code: __asm { mov ax, 13h int 10h } OR __asm { mov ax, 4c00h int 21h } etc... Thanks, Richard Hughes
  15. rpg_code_master

    Where to start?

    Quote:Original post by audacious However, I can also program in VB.NET, so I'm wondering whether this would be a good place to start for windows game programming (XNA?) That sounds like a good idea. XNA is a simple way to get into Windows game programming, and XBox 360 if your into that kind of thing. Have a look at some of these resources if you need a hand: http://www.xnadevelopment.com/tutorials.shtml http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Starting_a_project.php http://creators.xna.com/en-US/education/gettingstarted And also, have a look at the GameDev Wiki about beginning game programming - it's a great guide!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!