Little Help Fellow Programmers ?

Miscellaneous. No spam or advertisements, constructive discussion encouraged.
User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-
Re: Little Help Fellow Programmers ?

Post by Iv121 » Sat Jun 01, 2013 1:34 pm

God save us all, my fking mind is melting ... I had to sit and add the final touch to it all - winning condition and switching turns, how hard can it be ? So many fking exceptions I haven’t seen in my life, god I hate that server stuff ! I can swear I input one thing on one end and get a totally another on the other, if in most parts of the program I can just watch over the var and see if something that is going in is wrong here I'm not even sure the program does what I tell it to, the wins looses appear randomly or do not appear at all, messages that I send in a specific order get their order messed up and the turn changes go crazy ! Sometimes even the delay between transmit and receive is a second or two (I'm freaking testing it on the SAME computer) ... and I have only 2 days left to fix it all ! I want to cry , really I want to cry now ... I think if it all goes to s*** I just sack it all and tell the turns to go to hell it will be a tech presentation ...

Are there any golden rules or guidelines regarding to working with servers and clients ? Any things I should follow ?
They're watching ... Image

"I am forbidden tag" -CvN

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Little Help Fellow Programmers ?

Post by fr0stbyte124 » Sat Jun 01, 2013 10:40 pm

WCF doesn't fully load all its resources until the first time the channel is used, so it is not unusual for it to take a few moments on the first transmission, even on a localhost. Every transmission afterwards on that channel should be instant, though. As far as guidelines, it is going to come down to experience. Custom network communication is almost always the most difficult aspect of any project.

If you want help, you should let me look at the project. There is only so much I can do from descriptions alone.

In fact, my day is free tomorrow on account of Oklahoma barfing a nasty storm on us and knocking out my power. We could do a skype chat.

User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-

Re: Little Help Fellow Programmers ?

Post by Iv121 » Sat Jun 01, 2013 11:04 pm

Oh well to get into my mind and my project in such a short notice ? Well I guess the problem is that I try to make a universal framework that will work for 2 or 3 or 1000 people playing, I should probably instead just focus on making it work and allow communication between 2 comps only. When will you be online ?
They're watching ... Image

"I am forbidden tag" -CvN

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Little Help Fellow Programmers ?

Post by fr0stbyte124 » Sun Jun 02, 2013 1:16 am

Dunno, probably around 15:00 UTC. Will that give you enough time?

User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-

Re: Little Help Fellow Programmers ?

Post by Iv121 » Sun Jun 02, 2013 1:32 am

Well prob at this time I go for another exam that I have today -.- , NVM actually I managed to fix it. If I learned something from this project is that if the problem is so hard to find it is so simple you'd like to kill yourself - I missed a flush, one freaking flush , it messed the whole transmission order and made my server go nuts (well relatively speaking, could be worse).

Now as I have some time left over I add an in-game map editor - what can go wrong ? :tongue:
They're watching ... Image

"I am forbidden tag" -CvN

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Little Help Fellow Programmers ?

Post by fr0stbyte124 » Sun Jun 02, 2013 3:16 am

Yeah man, what sort of game would it be without an in-game map editor?

But why are you dealing with flushing? You aren't writing your own sockets, are you?

User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-

Re: Little Help Fellow Programmers ?

Post by Iv121 » Sun Jun 02, 2013 3:43 am

Well I don't go further than defining a socket and a stream , then using StreamWriter sw.WriteLine ("text"); which should be followed by sw.Flush (); for the message to actually be sent to the server, don't even use binary formatters as I can deal with simple code words such as "move,1,1" (with move being the action I want and the following are the parameters, in our case move tank No. 1 to the right( right code = 1) ) and do everything I need client-side. The only things I do server side is define win-loose, who gets the next turn and transmitting the MSGs forward.
They're watching ... Image

"I am forbidden tag" -CvN

User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-

Re: Little Help Fellow Programmers ?

Post by Iv121 » Sun Jun 02, 2013 3:09 pm

Ok, what's done is done. Have to present my project tomorrow.

Summary of features:

2D intractable graphics: Large moveable map, animated tank movement , animated tank shooting.
Intractable projectiles - Shooting range, shooting trajectory, wind effects, Shooting path blocking.
Intractable environment: destructible objects, impact marks.
Multiplayer: LAN party, existing framework for unlimited number of players.
Save function: Allows to pause and resume the game from the same point saving the map into CMAP format (contains Tile[,] array)
Map Loading: Multiple map choices, loading of prev games.
Map preview: Bitmap preview of the map in selection menu.
In-Game map editor: Allows to change and export new maps.
Sound: 3 soundtracks including menu, ambient and battle.

Overall the biggest project in the class, I think. Wish me luck, I'm off to get some sleep!
Last edited by Chairman_Tiel on Sun Jun 02, 2013 4:01 pm, edited 1 time in total.
Reason: errors
They're watching ... Image

"I am forbidden tag" -CvN

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Little Help Fellow Programmers ?

Post by fr0stbyte124 » Sun Jun 02, 2013 5:20 pm

If we had more time, I would have liked to introduce you to WCF message contracts. I think they might have saved you a lot of grief.

Still, what you've done is seriously impressive and certainly sounds cooler than any comp sci project I ever encountered in high school.

User avatar
Iv121
Vice Admiral
Vice Admiral
Posts:2414
Joined:Fri Dec 07, 2012 3:40 pm
Affiliation:UTN
Location:-> HERE <-

Re: Little Help Fellow Programmers ?

Post by Iv121 » Mon Jun 03, 2013 10:04 am

Ok I can call it a success. The program didn't crash when I presented it though accidently one of the clients got disconnected as a result of a wrong map selected (Anti-cheat measure). Well it seems like I well impressed him and my classmates and pretty much anyone who saw it even though preliminary tests on the school comps showed it is quite buggy still , just had to plan my presentation to dodge those bugs. Had only one real problem that was for some weird reason my shot miscalculated, I quickly mentioned that the wind effects the trajectory (even though I disabled it for easier presentation -.- ) which lead to explanation how I tried to make the wind change naturally which also seemed to impress him. Overall went all nice :) , I will take some screenshots for you to see but I wont upload the game as it weights 80 MB and also it is highly probable it won't work properly on your comps (compatibility with other comps is indeed an issue with projects of my nature)
They're watching ... Image

"I am forbidden tag" -CvN

Professor Fenway
Texture Artist
Texture Artist
Posts:1506
Joined:Wed Dec 05, 2012 10:47 pm
Affiliation:Novus Roma
Location:Neither Here nor There

Re: Little Help Fellow Programmers ?

Post by Professor Fenway » Mon Jun 03, 2013 5:03 pm

Upload it! 80 MB is nothing. I WANNA SEE

ACH0225
Vice Admiral
Vice Admiral
Posts:2312
Joined:Sun Dec 09, 2012 10:21 pm
Affiliation:Strigiforme
IGN:ACH0225
Location:Cuuyth

Re: Little Help Fellow Programmers ?

Post by ACH0225 » Mon Jun 03, 2013 5:22 pm

The lack of owls is disturbing, but seems interesting. Can you publish it as a flash game to make the big money?
Image
fr0stbyte124 wrote:5 months from now, I will publish a paper on an efficient method for rendering millions of owls to a screen.
mfw brony images
Spoiler:
Image
Image
Image
Image

Chairman_Tiel
Rear Admiral
Rear Admiral
Posts:1890
Joined:Sat Dec 01, 2012 9:39 am
Affiliation:GLORIOUS REPUBLIC

Re: Little Help Fellow Programmers ?

Post by Chairman_Tiel » Mon Jun 03, 2013 5:51 pm

Yes, because converting from C# to Flash is simple as pie. Iv is silly.
[spoiler]Image[/spoiler]

User avatar
fr0stbyte124
Developer
Posts:727
Joined:Fri Dec 07, 2012 3:39 am
Affiliation:Aye-Aye

Re: Little Help Fellow Programmers ?

Post by fr0stbyte124 » Mon Jun 03, 2013 6:51 pm

Silverlight wouldn't be to difficult.

...lol, jk, nobody uses silverlight.

blockman42
Lieutenant
Lieutenant
Posts:478
Joined:Thu Dec 06, 2012 8:04 pm
Affiliation:Voxel Co.
IGN:Blockman42
Location:Holocene

Re: Little Help Fellow Programmers ?

Post by blockman42 » Mon Jun 03, 2013 7:20 pm

fr0stbyte124 wrote:Silverlight wouldn't be to difficult.

...lol, jk, nobody uses silverlight.
kthxby

Post Reply