SFML community forums

General => SFML projects => Topic started by: zsbzsb on November 01, 2013, 08:53:20 pm

Title: Roung [Version 0.1]
Post by: zsbzsb on November 01, 2013, 08:53:20 pm
Introducing..... [drum roll].... Roung!

Well OK, it is not that big of a deal. Roung is your standard Pong game, except the paddles move in a circular direction instead of straight up and down. I started this just yesterday when it came to me how simple it would be to implement collision for this type of movement. As you can see in this thread (http://en.sfml-dev.org/forums/index.php?topic=13007.0) Jycerian wanted to implement a circular Pong game, but was having issues with collision.

The way my collision works is simple, To determine if the ball has collided I follow these steps

Since I wrote it more as an example than anything, you can get the full source code from here (https://bitbucket.org/zsbzsb/roung/).
https://bitbucket.org/zsbzsb/roung/ (https://bitbucket.org/zsbzsb/roung/)

Roung was written using SFML.NET (for graphics/window/input) and NetEXT (http://en.sfml-dev.org/forums/index.php?topic=12819) (for input handling/vectors/time/math). The controls are the 'Left' and 'Right' arrow keys for player 1, 'A' and 'D' keys for player 2. If you want to toggle AI on and off use the 'Asterisk' and 'Num+' / 'Num-' for changing the AI difficulty.

You can get some precompiled binaries from here (http://hashcookie.net/uploads/32da249a87_Roung.zip) if you just want to try it out.

If you have any questions or comments please let me know.  :)


(http://hashcookie.net/uploads/aa9d4fd7a8_newgamescreen.PNG)
Title: Re: Roung [Version 0.1]
Post by: eXpl0it3r on November 02, 2013, 01:24:37 pm
Luckily I didn't fell asleep while playing, so I can still give some feedback... ;D

Make the ball faster! ::)
Some AA would make the circles look a bit nicer.

It seems like you didn't fix one of the issues mentioned in the other thread, but maybe you consider it as "intended" game play, but you can essentially make a certain point for yourself, because the other player can't reach the ball. If it's intended then one would have to given points regarding location, e.g. if it goes out on my side the other gets a point and the other way around. Or allow full movement freedom, so there isn't any "my side" or "your side". ;)
(http://i.imgur.com/7Vkbn2T.png)

Nice that you followed up on the idea though, I quite liked it from the other post. :)