SFML community forums

General => SFML projects => Topic started by: The Illusionist Mirage on September 06, 2013, 08:14:36 pm

Title: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 06, 2013, 08:14:36 pm
Hello friends!

I just finished creating my first complete game using SFML 2.1 on windows using Code::Blocks 12.11(but game is cross platform, runs on mac and linux too). I am uploading it. Please do run it and tell me what you think of it .
I don't claim that my game is very exciting or anything like that. Hope you like it. :)
If it's not working, please let me know.

CHEERS!

Link to download (http://www.mediafire.com/download/gf0n47f1yt1f0li/Pong.rar) (Windows only)

Here are a few screenshots:

(http://2.bp.blogspot.com/-GK9tDfddExo/UioZW7ll_gI/AAAAAAAAAMQ/UWoy6_dD3_E/s1600/Screenshot_6.png)

(http://1.bp.blogspot.com/-3x-B4cBciQA/UioZXLRuceI/AAAAAAAAAMY/nhz3aVSJ6Q0/s1600/Screenshot_8.png)

(http://1.bp.blogspot.com/-WmEoelrwVOk/UioZXLnAIpI/AAAAAAAAAMc/zmFgK-2NE-U/s1600/Screenshot_7.png)

A gameplay video:
http://www.youtube.com/watch?v=LsGYv2pU_-Y
Title: Re: Created a Pong clone
Post by: Sorokya on September 07, 2013, 10:55:12 pm
The project looks nice, it would be cool if you uploaded the source code, so I could try it out.
Title: Re: Created a Pong clone
Post by: Clockwork on September 08, 2013, 05:53:51 am
Yeah, I would also like to see the source code please!

It looks like a nice remake and I'm curious how you did it, as I'm pretty new to SFML.

Thanks!
Title: Re: Created a Pong clone
Post by: The Illusionist Mirage on September 08, 2013, 09:05:45 am
The project looks nice, it would be cool if you uploaded the source code, so I could try it out.

Yeah, I would also like to see the source code please!

It looks like a nice remake and I'm curious how you did it, as I'm pretty new to SFML.

Thanks!


I'd be very glad if you would first download and see if my game is running because it may contain glitches and bugs. If there are indeed errors please report them to me, I'd fix them and then I'll definitely post the source. :)

CHEERS!
Title: Re: Created a Pong clone
Post by: MadMartin on September 08, 2013, 09:40:39 am
I'd be very glad if you would first download and see if my game is running because it may contain glitches and bugs.
There are some people who can't do anything with a windows executable and therefore are asking for the source  ;)
Title: Re: Created a Pong clone
Post by: The Illusionist Mirage on September 08, 2013, 02:47:53 pm
I'd be very glad if you would first download and see if my game is running because it may contain glitches and bugs.
There are some people who can't do anything with a windows executable and therefore are asking for the source  ;)

What about you, did you run my game? I am insisting that someone run my game since in a lot of computers that I tried to run it, the game either didn't run or was very slow.
Title: Re: Created a Pong clone
Post by: FRex on September 08, 2013, 03:16:24 pm
There are people running Linux and OS X, they can't run Windows programs(we actually can, and I've yet to encounter SFML or GL game that doesn't run on WINE, this one included) so he's asking for source code to compile it on his machine.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: TeaBag on September 08, 2013, 11:12:53 pm
I'm trying to create my own Pong game too! It'd be great if you could upload your source code so I could check it out when (if) I encounter a problem.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: G. on September 09, 2013, 12:01:40 am
You can also take a look at the official pong example (https://github.com/SFML/SFML/tree/master/examples/pong).
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: Clockwork on September 09, 2013, 05:04:26 am
Sorry, I wasn't able to download it before as I was busy.

I just tried it though and it runs fine, really smoothly actually, you have a nice remake on your hands! 
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 09, 2013, 07:54:49 am
Hey guys

Sorry for being really rude and not posting the source before.  :-[

Well I have created a repository (https://github.com/TheIllusionistMirage/Pong) on GitHub where you can find the source and the resources(images, fonts and sounds) used and what's amazing is it is fully documented!

Sorry, I wasn't able to download it before as I was busy.

I just tried it though and it runs fine, really smoothly actually, you have a nice remake on your hands!

I am glad you liked it since this is my first ever complete game project. :)

And one more thing I'd like to ask everyone - how to I license my program as open source, freely distributive and modifiable(probably under GPL I guess).

CHEERS! :)
Title: AW: A very nice Pong clone using SFML - 2.1
Post by: eXpl0it3r on September 09, 2013, 10:54:52 am
You might want to put it under something like libpng/zlib or MIT license. With GPL you restrict the use to GPL projects only.
Title: Re: AW: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 09, 2013, 11:19:15 am
You might want to put it under something like libpng/zlib or MIT license. With GPL you restrict the use to GPL projects only.

Okay, thanks! :)

And did you by any chance see or run my game? Please tell me how it is. A lot of my real life friends say it sucks.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: DarkYoung on September 09, 2013, 12:19:56 pm
Hi!

Game looks really good. Only font is a bit unreadable.

But i found some bugs :( :
-i can't start a new game with AI after finishing one. Looks like you don't reset level.
-when i choose play vs human, the humancontrols screen appear and it say "press any key to continue" but when i press any key, nothing happen. Only when i press enter im back to menu. This problem appear after i finish a game with AI so it could be connected with first problem
-not a bug but: ball is not center at the start.
-not a bug again but: ball always go in same direction after start
-collisions looks weird
-when point go to 10 number overlay on middle line


After all, game looks good, i like that GUI system. But you need to work more with it. Not much, but still a bit. Good work!
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 09, 2013, 12:38:23 pm
Hi!

Game looks really good. Only font is a bit unreadable.

But i found some bugs :( :
-i can't start a new game with AI after finishing one. Looks like you don't reset level.
-when i choose play vs human, the humancontrols screen appear and it say "press any key to continue" but when i press any key, nothing happen. Only when i press enter im back to menu. This problem appear after i finish a game with AI so it could be connected with first problem
-not a bug but: ball is not center at the start.
-not a bug again but: ball always go in same direction after start
-collisions looks weird
-when point go to 10 number overlay on middle line


After all, game looks good, i like that GUI system. But you need to work more with it. Not much, but still a bit. Good work!

Actually, I've already fixed the following bugs you pointed out but have not yet updated the source on my repos and not re-uploaded the exe:
-> problem with resetting the level.
-> problem with play vs human option
-> ball going in same direction
-> overlaying of score with middle line

And regarding the collision, I'll try to reconsider my approach again.

Thank you very much DarkYoung! I am really encouraged by your corrections to make it more better. I'll fix them as soon as I can. :)
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 09, 2013, 02:17:47 pm
Okay, I've fixed all the bugs reported by DarkYoung(except that wired collision part), updated the repo (http://github.com/TheIllusionistMirage/Pong) and also the exe download link (http://www.mediafire.com/download/gf0n47f1yt1f0li/Pong.rar). And now the game is good as ever. :D

And in my opinion the collision part is written that way so that the speed of the ball after collision is much faster after collsion with the end of the paddles than collision with the center.

Thanks!  ;)
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: DarkYoung on September 09, 2013, 05:14:05 pm
Im getting error when i try to run:

"The procedure entry point __gxx_personality_v0 could not be located in the libstdc++-6.dll"

I'm not using windows in EN language, but i hope translation is good.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: Ixrec on September 09, 2013, 08:51:05 pm
I get an error about libgcc_s_dw2-1.dll missing.

Just from googling stack overflow it looks like both of these errors have to do with what libraries MinGW links to.
http://stackoverflow.com/questions/4702732/the-program-cant-start-because-libgcc-s-dw2-1-dll-is-missing
http://stackoverflow.com/questions/17410718/the-procedure-entry-point-gxx-personality-v0-could-not-be-located-in-the-dynami

My guess is the -static-libgcc and -static-libstdc++ options mentioned in the first thread could potentially solve both of these problems, hopefully not just the first, so try that.

P.S. Don't use "Final" as your version number.  That's tempting fate =P
Title: AW: A very nice Pong clone using SFML - 2.1
Post by: eXpl0it3r on September 09, 2013, 09:41:14 pm
The first error means that the application uses the wrong runtime lib and the second one means that no runtime dll is found.
That means the new version didn't get shipped with runtime dll and for the first user a different runtime dll was "somewhere" (in PATH) found.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 10, 2013, 05:21:20 am
Hello guys

I just discovered that I compiled it wrongly, will re-upload again in a few hours...I am very busy at the moment...Thanks.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 10, 2013, 07:38:59 am
Hello

Fixed now. Game download link (http://www.mediafire.com/download/gf0n47f1yt1f0li/Pong.rar).
Link of repo (https://github.com/TheIllusionistMirage/Pong) is the same as before.

Hope it works.

CHEERS! :D
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: Ixrec on September 10, 2013, 07:57:33 am
No dll errors!

I can score against the Easy and Intermediate AIs but not the Hard one, so the difficulty levels seem to work too.

I did find what might arguably be a bug: If the ball is directly above my paddle and I move the paddle up, the ball gets caught in it for several frames, making the bounce noise several times, then gets spit out at a sharp angle (so I usually scored when this happened).  Not sure how much of this is intended.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 10, 2013, 12:57:44 pm
No dll errors!

I can score against the Easy and Intermediate AIs but not the Hard one, so the difficulty levels seem to work too.

I did find what might arguably be a bug: If the ball is directly above my paddle and I move the paddle up, the ball gets caught in it for several frames, making the bounce noise several times, then gets spit out at a sharp angle (so I usually scored when this happened).  Not sure how much of this is intended.

I'll try to fix that too. Actually, the problem is I don't have real life friends or people who can test or debug the program for me and nor does my school teacher help me, so every time I think that my program is error and bug free something new pops up. So, I sincerely beg pardon if I am pestering people too much with my simple and humble program.

I am really glad that I received so many feedbacks regarding my game. So I'd like to express my heartfelt gratitude to the community and of course SFML and its creator, Laurent sir.

Thanks again :D
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: TeaBag on September 10, 2013, 05:52:37 pm
Hey. So I just tried your game and these are 2 things I saw:
I'd say the ball is going too fast. It could be slower.
Playing on easy computer never hits the ball. I can easily win.
Also, I'd be a great idea to choose a more simple font.
Title: Re: A very nice Pong clone using SFML - 2.1
Post by: The Illusionist Mirage on September 10, 2013, 07:27:04 pm
Hey. So I just tried your game and these are 2 things I saw:
I'd say the ball is going too fast. It could be slower.
Playing on easy computer never hits the ball. I can easily win.
Also, I'd be a great idea to choose a more simple font.

Thanks for your tips. :)