Jump to content

  • Log In with Google      Sign In   
  • Create Account


Passing Integers through a server C# [help]


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 chris1327   Members   -  Reputation: 80

Like
0Likes
Like

Posted 30 April 2011 - 07:24 PM

Hello guys,

I am trying to develop some basic networking skills using C#, i want to design a small game, not anything fancy or big.

I have a chat server going, that works over the network, and internet if i could open my ports.

I need some basic tutoring on how to assign an int to a player.

meaning

Player1 has joined the game... --- player 1 now has the default of 100 health.
Player2 has joined the game... --- player 2 now has the default of 100 health

player1 looses 20 health.

so now player1 has 80 health, and player2 has 100 health still, and this is reading through the server.

I have looked for Numerous demonstrations for things like this, and cannot find any, so if anybody can help me with this, i am willing to pay up to $20.

Sponsor:

#2 ravengangrel   Members   -  Reputation: 346

Like
0Likes
Like

Posted 01 May 2011 - 04:05 AM

Hello, Chris,

I guess (and hope) you are quite young. Your $20 dollar offer seems quite funny to me. People around here will gladly help you for free if you ask questions the right way (and if you act like an asshole it's probably that someone will help you anyway). If I wasn't willing to help you for free, I wouldn't do it for $20 anyway; knowledge is hard to acquire and if I was to sell it it wouldn't be cheap.
But I digress. What I'm trying to say is that someone could even get offended by your offer, no matter how good-intended it is, and, even if it's not my case, I would understand anyone who did. We are not your programming whores, keep it in mind.

Now about your question, what's exactly our problem? Show us your code, and explain what you are trying to achieve and what problems you are encountering. AFAICT sendind an int throught he network is everything you need and you say you already have done that.

Could you please clarify a bit?

#3 froop   Members   -  Reputation: 636

Like
0Likes
Like

Posted 01 May 2011 - 08:28 AM

i wouldn't even open visual studio for 20$

#4 nfries88   Members   -  Reputation: 259

Like
1Likes
Like

Posted 01 May 2011 - 08:52 AM

It sounds like the problem is that your "Player 1" is still receiving that he has 100hp, or that your "Player 2" is still receiving that your "Player 1" has 100hp.

The solution is that you need to send your players a packet that says "Player 1 now has 80hp" or "Player 1 lost 20hp".
Looking for paid or open-source C++ programming work. Been programming since 2005. No degree.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS