Page 1 of 2

Official Unoffcial Topic of my Multiplayer Shootout

Posted: Tue Mar 08, 2005 8:38 pm
by Guest
Okay, I've decided not to do that whole Mario thing. Aight? Partially because I am trying to learn C++ and do not want to get TOO involved in a blitz thing, and partially because this new project will be far more challenging and fun.

Anyway, this is now the official "Unofficial Topic of my Multiplayer Shootout!"

Posted: Wed Mar 09, 2005 7:23 am
by JS Lemming
Since when were you making a mario game?

Posted: Wed Mar 09, 2005 4:13 pm
by Guest
Since I posted about it in Arce's Side Scrolling Breakthrough. o_0

Posted: Wed Mar 09, 2005 6:08 pm
by TiredSikTwisted
Alright, enough with the 'official's and 'unofficial's.... The only the official is an admins rule. And I rule that I will -blam!- the word official and unofficial if this keeps up.

Whew, that one feels better.

Posted: Wed Mar 09, 2005 9:29 pm
by Guest
3/9/05: 9:13 P.M.

Today I worked on my tag game, which will help me to find the best and most convient ways to recieve/send data to and from the game host in my multiplayer shootout.

Basically, what my tag game will be, is a dinky little program that allows you to connect with another using LAN or IPX or something. Then, after they are connected, the "Game of tag" begins. Player 1 (The host) is a blue circle, and player 2 is a red one. On the top of the screen, it display's who's 'it.' Then, you chase eachother around. If you're it, and you collide with the other player, nothing will happen. You must hit the space bar to "Tag" them, and they become it in 5 seconds. Kinda pointless, but it'll be multiplayer none the less. I am debating over having a run button or not (A button to hold to increase speed.) And I may or may not make it in an arena type thing with obsticles and mazes. That depends on how much a "game" I want to make it.

And, I'm also thinking about a freze type thing when you're tagged. Your charactor freezes, giving the other person a chance of 5 or so seconds to run. Again, it depends on how involved I want to get in this project. I am not yet going to decided until I have complete the basics of it.

Right now, I consider myself about half done with the main and simple parts. Maybe less. It allows you to connect, checks the connection, gives player ID's, and does everything required to initialize the game. Basically, all I must do is actually program the tag thing. :)

Oh, and I HATE programs where the host must use a differnt program than the player, and that's DEFINATELY NOT what this'll be, so far the same program runs both.

Oh, yeah, how I plan to make it move the charactor and stuff on both streams is just send the x and y coords of the charactor from one computer to the other everytime something happens. If there's a better way of doing it, TELL ME NOW.

Questions? Comments? Advice? Don't hesitate to post, unless you're a dumbfuck who's just going to say something stupid. Oh, and if you use a game creator, I don't want to fucking hear it.

Posted: Thu Mar 10, 2005 7:28 am
by JS Lemming
So.... are you doing this c++ or blitz? Which is it?

And what would be the point of a run button if the main objective is to keep away or tag, you would always be holding it.

Posted: Thu Mar 10, 2005 4:03 pm
by Falco Girgis
Blitz, of course. :roll:

I also recommend not making players circles, unless you've got a pretty nifty "circle collision function" in there somewhere.

Posted: Thu Mar 10, 2005 5:47 pm
by Guest
Blitz, of course.

I also recommend not making players circles, unless you've got a pretty nifty "circle collision function" in there somewhere.
It's in blitz.

Anyway, you’re right; I'm probably not going to use circles. More for the reason of them looking like shit than anything. I Actually DO have a pretty nice circle collision function I could use, but I'm going to stick with squares.

I cannot believe that shit we learned in math is actually useful, lol. If I was to use circles, I'd have to use the Pythagorean Theorem, thus proving that my math class isn't useless.

For circle collision, all you must do is use the Pythagorean Theorem to find the distance from the center of one circle to the center of the other, and then check if either of the circle's radii is larger than the distance between the two. If so, there's a collision.

Posted: Thu Mar 10, 2005 7:27 pm
by DJ Yoshi
Uh...no? Pythagorean Theorem is for triangles...if you're talking about collisions on the edge, you'd have to go into fairly complex mathematics, and in the middle, it'd be even harder, I assume.

Posted: Thu Mar 10, 2005 7:28 pm
by Falco Girgis
I've got news for you, using the pythagorean theorum, you'd be getting DIAMETER not RADIUS. You'd have to half the diameter.

I still fail to see how that'd make a respectable collision function...

Posted: Thu Mar 10, 2005 8:33 pm
by JS Lemming
PPPFPFFFFTTT!!!! Pythagorean Theorum!!! :lol: :lol:

Sorry, I just had to laugh at that. With that logic, why not just use the distance formula.

Posted: Thu Mar 10, 2005 9:17 pm
by Guest
DUMBFUCK DJ Yoshi wrote:Uh...no? Pythagorean Theorem is for triangles...if you're talking about collisions on the edge, you'd have to go into fairly complex mathematics, and in the middle, it'd be even harder, I assume.
Go back to 7th grade, dumbass. No shit it's for triangles. a^2 + b^2 = c^2.

THE SAME FUCKING THING YOU USE FOR DISTANCE:

Distance = SQRT((x2-x1)^2 + (y2-y1)^2))

You're a moron, and I wish you not post here anymore...at least until you learn what you're talking about. -.-

Okay, you know what; I have a math test tomorrow. I'm in the mood to pwn you and study at the same time, so I'll give you a lesson on the relation to the distance formula and the Pythagorean Theorem. Here it goes:

Image

In the above grid, you see a right triangle, with two legs, each with the sides of two units, and a green hypotenuse. Assume that we want to find the DISTANCE between the start and finish point. We'll use the "distance" formula to decide it.

The start point is (4,1)
The end point is (2,3)

The "distance" formula says we do SQRT((x2-x1)^2 + (y2-y1)^2)).]

So, lets plug in some numbers.

SQRT((x2-x1)^2 + (y2-y1)^2))
SQRT((2-4)^2 + (3-1)^2))
SQRT((-2)^2 + (2)^2))
SQRT(4 + 4)
SQRT(8)
Approx. 2.82427125

Okay, I showed all my work and made it idiot proof (We may have an exception with you...) and that shows that the distance is approximately 2.82427125 using what you call the "distance" formula. Now, as you said, the Pythagorean Theorem deals with TRIANGLES. That is correct, but the distance formula was created FROM the Pythagorean Theorem.

The theorem stats that A^2 + B^2 = C^2, assuming that A and B are the distance of the legs and C is the distance of the hypotenuse, correct? If you do not know that, go back to the 7th grade; I'm too lazy to post links to some proofs of it.

Anyway, please refer back to the grid I drew so perfectly. Notice the imaginary red line that is added to form a right triangle? One can be added to ANY set of coordinates, so long as it's set EXACTLY where two axis meet. Example, if I had the coordinates, (10,2) and (13,1) I'd plot the imaginary point on (13,2) or (10,1) to form a right triangle, making the distance you're figuring the hypotenuse.

Now, back to our example:

The start point is (4,1)
The end point is (2,3)


Distance of leg 1 is the distance between point (2,3) and (2,1), which you can count as 2 units.

Distance of leg 2 is the distance between point (4,1) and (2,1), which you also can count as 2 units.

Now, the Pythagorean Theorem states that now you must square them, to receive the distance of the hypotenuse (The distance you're trying to figure in the first place) also squared. Then, you must unsure it, or take the square root of it.

(2)^2 + (2)^2 = (Hypotenuse/Distance)^2
4 + 4 = (Hypotenuse/Distance)^2
8 = (Hypotenuse/Distance)^2
SQRT(8) = Hypotenuse/Distance

Approx. 2.82427125 = Hypotenuse/Distance

There you do. The distance formula is nothing more than the Pythagorean Theorum written as an equation. NOW GET THE FUCK OUT OF MY GRILL, MORON!

:asshole:
Gyrovorbis wrote:I've got news for you, using the Pythagorean theorem, you'd be getting DIAMETER not RADIUS. You'd have to half the diameter.

I still fail to see how that'd make a respectable collision function...grill:
Maybe we're looking at this different, because I dunno what you mean.

I FIRST find the radius:

(((image width) \ 2) + ((image height \ 2))) \ 2

And test collision by using the Pythagorean Theorem to determine the distance from the center of one image to the center of the other, and then see if the distance is less than or equal to the radius. If so, one circle is in the other's grill, and thus they collided. That's a pixel perfect way to make circle collisions; the way I would have used.

Posted: Thu Mar 10, 2005 9:25 pm
by Guest
3/10/05: 9:19 P.M.

Okay, after taking all the time to explain that circle collision even though I didn't use it, I finally get to post about my progress of the day:

I worked on the tag game today. I completed more of the main parts, and got it running to where you can move around on each other’s screens, and it's VERY user friendly. BUT, I did it a gay ass way I'll have to change tomorrow. Instead of sending the player's X and Y in one message, I sent them individually, which causes an awkward lag between the computers. And, I had a safe flag on, slowing them down about 3 times as much. My plans for tomorrow are to fix this gayness, and if I have time, get to work on making it so you can actually tag each other and become "it."

Anyway, if someone wouldn't mind, I'd like to test my programs on a computer that's NOT on the same LAN as mine. So please, if you get the time, MSN me or something, it won't take long at all; I hope.

Questions? Comments? Advice? Don't hesitate to post, unless you're a dumbfuck who's just going to say something stupid. Oh, and if you use a game creator, I don't want to fucking hear it.

Posted: Thu Mar 10, 2005 9:30 pm
by Guest
Mislead JS Lemming wrote:PPPFPFFFFTTT!!!! Pythagorean Theorem!!!

Sorry, I just had to laugh at that. With that logic, why not just use the distance formula.

THE DISTANCE FORMULA IS BASED ON THE PYTHAGOREAN THEOREM!!! OMFG WHAT'S WITH YOU PEOPLE!?!?!?!?! GO BACK A FEW YEARS PLEASE!!


A x b is the same as Ab

C(4b+d) is the same as C(4b) + C(d)

Distance formula is the same as the Pythagorean Theorem!! :evil:

Posted: Fri Mar 11, 2005 7:31 am
by JS Lemming
It doesn't matter, you should have used "distance formula" in the first place, that was what was really needed. Not some lesson on how the Pythagorean Theorem would corralate to the distance formula. I'm in advanced geometry, I think I know my theorems.