Challenge #1

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Challenge #1

Post by philippeqc »

Answering another post http://guru3.sytes.net/viewtopic.php?p=18407#18407 I got quite carried away. I've made some changes in the challenge, so only consider this one.

So here is the first Challenge. (In its own thread)
If you're a member of the developers team, read carefully. Your participation is mandatory. All others are also welcome to try it.

It was quite spontaneous, so it might not be to everybody's taste. But indulge me for this once, and send me your ideas for future Challenges.

-----
Part 1:
SSH

I have written a small tutorial of cool things to do with ssh in this forum.

Question 1) Find the tutorial and read it . REMOVED: Check the examples. Are there any code samples that have a mistake? If so, how can you correct them?
EDIT: Try the examples on your own. Did you have difficulties with some of the instructions? Extras: Point out any mistake I might have done in the examples.

Note: Windows users may need either putty (google for putty directly) which is a ssh client, or cygwin. I do not know of any ssh servers for windows. Consider it part of your assignment to ask on the forum for a kind soul to fix you an account on a linux machine they control.

Question 2) I've given a complex example where music files are streamed over ssh and played directly. Come up with your own example where data is transmitted from a remote source and processed locally. Extra points if it is not a multimedia example. Extra-Extra points if it involves a "windows only" application.
EDIT: Let me insist on the fact that I wrote "transmitted from a remote source and processed locally". Dont let your mind be blinded by the "streaming" aspect of the final example.

Part 2:
Dedicated Server:

Question 3) Patch and run the dedicated server locally to figure out at what sampling rate it operates (well, FPS can't apply here as no frames are generated). Compare this value to the FPS of a client run locally on the same machine. Try disabling your local 3D acceleration and compare again. Post a diff of your source code vs the version 2.7 along with your analysis.

Question 4-a) The dedicated server runs at full speed, offering the best "resolution" possible for the game. What sampling rate would make sense if all the players had a rtt (Round Trip Time) of 100 ms. Removed: Show detailed equations.
EDIT: Show how you arrive to your conclusion
Question 4-b) Generalise your previous solution for all rtt.
Question 4-c) In the scenario proposed in 4-a, imagine one player having a rtt of 100ms, and another of 200ms. Compare the impact on their local client state. I would try calculating the "efficient" FPS for each players, but you might have better ideas.
Question 4-d) What would happen if the server resolution was based on the highest rtt rather than the lowest?

Question 5) Implement/patch the dedicated server according to your result in 4 (or 4-b or 4-c) and verify your assumptions. Team participation is highly encouraged for this point.

Your answers should be posted to my private email account before 00:01 of your local time on the 22 november 2004 (so you have until midnight of sunday the 21 november). Participation is volontary, feel free to answer as many questions as you like, partial answers are accepted, so do not be shy. For all the members of the developers team, participation is mandatory and so is question 4-a.

Ladies, Gentlemens, sharpen your minds and pencils/keyboards. Challenge #1 is open.

-ph

Fell free to help each other in this discussion.
Last edited by philippeqc on Sun Nov 14, 2004 10:43 pm, edited 1 time in total.
Canis meus id comedit.

User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6709
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

fwa hahahahhahahaha... hahahahahaha...

hahahahaha...

hahahaha...

i don't think i can do that
Image

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Hi all,

My girlfriend just commented that I was pretentious and bossy to post such a challenge. Do you share her point of view? Or more important, even if you totally agree with her, will that stop you from trying?

I feel I might have set up a steep first Challenge. That the phrasing is pretty much inspired from my own engineering bachelor and that it will scare many away. But I feel it is still within the reach of most of you.

-ph

Next one will be more considerate.
Canis meus id comedit.

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

As usual, it's not a question of whether or not I can, it's only a question of how long it would take. Unfortunately, I have to decline to take this challenge, as much as I'd love to. Busybusybusy.

But I will likely tackle part of it in the near future, the parts about ssh, in my alarm clock. :) Almost there....

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Tank Program wrote:fwa hahahahhahahaha... hahahahahaha...

hahahahaha...

hahahaha...

i don't think i can do that
Ok, some rephrasing: In 4-a

Code: Select all

Show detailed equations. 
to

Code: Select all

Show how you arrive to your conclusion
For thoses afraid of question 4, I dont expect perfect answers. In the real world, thoses are few. The way engineers solve problems is to approximate, find the important details, and build reasonnable assumptions around them.

If somehow you need the number of times a duck fart every day, and you cant get that information, just say, "lets assume a duck fart 13 times a day." and go on using 13 in your process. If it is reasonnable, it will probably allow you to solve your problem. If someone dissagree with you, or know how many times a duck fart each day, he only need to change that value.

For those who dont want any help to solve it, my message ends here.




















http://www.bluesnews.com/articles/latency_vs_ping.shtml could help you see the relation between rtt (Round Trip Delay, incorrectly called ping time) and FPS/sampling rate. Dont consider the FPS that the video card gives to the user, but rather, count how many information exchange they can have with the server.

-ph
Canis meus id comedit.

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Lucifer wrote:As usual, it's not a question of whether or not I can, it's only a question of how long it would take. Unfortunately, I have to decline to take this challenge, as much as I'd love to. Busybusybusy.

But I will likely tackle part of it in the near future, the parts about ssh, in my alarm clock. :) Almost there....
Your alarm clock already has been counted as your answer for question #2. If you want to be formal, write one of the commands you used in your project in your answer email.

FOR ALL
Is the time allocated really too short for you? If I give more time, will there really be more people attempting the challenge? Or is it a problem of difficulty, that no amount of time seems to be sufficient to come up with an answer?
Who thinks the time limit should be kept, but that the level should be addressed?

-ph
Canis meus id comedit.

ishAdmin
Match Winner
Posts: 625
Joined: Sun Jul 04, 2004 12:11 am
Contact:

Post by ishAdmin »

Whenever I read the word "mandatory" I hit "next". Perhaps that's little shortcoming of mine.
Image

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

ishAdmin wrote:Whenever I read the word "mandatory" I hit "next". Perhaps that's little shortcoming of mine.
Well, for the people that arent afraid by a single word, keep working hard! The deadline is today, but dont desesperate. I'll be flexible on your submissions. Just anser as much of the question as you can.

The Challenge #2 is already available. I've tried to make it more open. So go and check it up.

-ph
Canis meus id comedit.

User avatar
SuPeRTaRD
Round Winner
Posts: 300
Joined: Fri Nov 05, 2004 11:53 pm
Location: bedlam
Contact:

Post by SuPeRTaRD »

I can probably build a contraption to measure how many times a duck farts per day, but the rest of that stuff is WAY outta my league..

that said, the device wouldn't be very kind to the duck, perhaps I will rethink my design.

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

SuPeRTaRD wrote:I can probably build a contraption to measure how many times a duck farts per day, but the rest of that stuff is WAY outta my league..
Question 1 can be resumed to "read a small tutorial I wrote". Out of your league? I doubt that coming from someone mastering the use of complex 3d software

Question 2 can be resumed to "now that you've read the tutorial, find one use for the material presented".

Ignore question 3 and 5

Question 4 (all of them), well you have to want to think with pen and paper. If that feels like the bad side of school/work for you, then dont do it. If that feels like a math puzzle for you, then have some fun. Work on 4-a first. Ignore the rest. Once you have it, the rest should come easily.

If you need some hints, or maybe a way to work on the problem, just ask and I'll pm you.

Good luck

-ph
Canis meus id comedit.

User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

philippeqc: are u serious when u post these things or is a kind of humor sense that I don't get? :o

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Ignore the questions about implementations, those are too hard.
klax wrote:philippeqc: are u serious when u post these things or is a kind of humor sense that I don't get? :o
I'm actually quite serious when I say that ppl of this forum are smart and have the potential for great things.

I'm quite serious when I say that question 4 is not obvious, but that anyone who is willing to sit on it can actually solve it. I'm ready to help anyone who feel ready to take the challenge. It may required a few hints. It may require some good coaching. But those who take on that challenge will gain a lot.

---

I havent given any clues yet because... well because nobody asked for any help yet. If you want some, ask for it. Try to say what you think you need, so I know better how to help you. I _beleive_ that pm's should be better as they would let everyone work on it at their own speed, understanding their own part, but I'll give an answer in public for any public request.

Dont be intimidated by my tortured english. Sometimes I try to give you information that _I_ find relevant, to guide you in a process that _I_ think would help you. But _I_ can be quite wrong. At the same time, I try to let you some freedom, trying not to say too much because it would guide you resonning process too much, and the only path possible would be the one that I imagined.

And sometime its just badly written. So here is an updated question 4-a)

Code: Select all

The server operate in a loop. At the begining of the loop it collects the new messages received from the network, if there are any, and process them. After this, it moves all the cycles and deals with all the collisions. Once this is done, it sends the results, such as bots turning, players decisions and who got killed, if there is any, to all the clients. And then starts over.

At the moment, the server runs this loop continuously. This is done in an attempt to give the best resolution possible, ie: the most number of times this loop is run within a second. [i]On the client, this happens also to be the Frames per Seconds (FPS).  The client need to take the input from the player, compute all the actions in the game (moving cycles, testing for collisions) and then draw it in 3D before starting all over again.[/i]
So, on a faster machine, the whole loop will execute in less time. Bots decicions will be checked more often, cycle collisions will be tested more often and so it lots of other stuff.

Now, assume that we have an infinitely powerfull computer for the server. The loop would run infinitely fast. But that would be unnecessary. If a bot is only going to make its decision to avoid a wall somewhere between one or 2 meters away, there is no need to call the bot code everytime a nanometer is traveled.

Now, also assume that the only thing that matters is the players actions. They need to be recieved, processed, and the result if any sent back. Just consider that everytime the server receive a player action, it runs the loop exactly once, in an infinitly short time, and then waits for the next action. So disregard collision detection and bot code running between 2 events.

Question 4-a) 
What sampling rate (equivalent to fps) by the server is required if all the players connected have a rtt (ping) of exactly 100 ms (milli seconds).
4-b)
Can you generalise for any rtt value?
4-c)
What happen if you hace one client with a rtt of 100 ms and another of 200 ms?
The following are items that you could also discuss:
-Compare the impact on their local client state, 
-Try calculating the "efficient" FPS for each players,
-Any of your ideas/observations about this situation.
4-d)
With the situation in 4-c, should the server resolution/sampling rate be based on the fastest connection or on the slowest? Present both cases.

You should observe how elements where "discarded" until what is left is only the network constraint. I placed it in the question here. On any of your answers, feel free to state any elements you want to discard, and state why you feel its ok to ignore it.

FIY: I needed to make one such assumption to solve 4-a.

And no, I havent justified why I discard theses elements. Can you tell me why I did it? It _may_ help if you answer question 4 and re-read question 3 and/or 5.

-ph
Canis meus id comedit.

User avatar
iceman
Reverse Adjust Outside Corner Grinder
Posts: 2448
Joined: Fri Jan 09, 2004 9:54 am
Location: Yorkshire, England. Quote: Its the fumes, they make one want to play
Contact:

Post by iceman »

im working on getting the gameloop and graphics on an menu adjustable % in an attempt to smooth things out but im not getting much spare time as its nearing christmas
Image He who laughs last, probably has a back-up
Image
Image
sorry about the large animated gif

Post Reply