Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
  • Loading branch information
ingframin committed Jul 27, 2019
1 parent 6cfc755 commit 3f771e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#*Debug*
#*bin*
#*.exe*
#bin/Debug/Pong.exe
#bin/Debug/Pong.exe
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# CPongC

Pong clone written in C and SDL2.

It requires GCC and SDL2.
Expand All @@ -16,25 +17,23 @@ Player 1 moves with E and D, player 2 moves with the directional arrows Up and D

In order to build the project, run from the main folder:

c:\yourfolder\ > gcc main.c ball.h ball.c player.h player.c text.h text.c utils.h utils.c -L./SDL2/lib -I./SDL2/include/ -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -o./bin/Debug/pong.exe -w -Wextra -Wfatal-errors
c:\yourfolder\ > gcc main.c ball.c player.c text.c utils.c -L./SDL2/lib -I./SDL2/include/ -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -o./bin/Debug/pong.exe -w -Wextra -Wfatal-errors -O3

On Linux and Mac OS, you can use the same command, just remove "-L./SDL2/lib -I./SDL2/include/ -lmingw32", you normally don't need this.
On Linux you need to install libSDL2-dev, libSDL2_image-dev, libSDL2_mixer-dev packages.
On Mac you also need the development packages; you can install them with Homebrew or Mac Ports.
On Linux and Mac OS, you can use the same command, just remove "-L./SDL2/lib -I./SDL2/include/ -lmingw32", you don't need this.
On Linux and Mac you need to install libSDL2-dev, libSDL2_image-dev, libSDL2_mixer-dev packages.
On Mac, you can install them with Homebrew or Mac Ports.
If you install them from the SDL2 website you need the -L/path/ and -I/path/ directives for gcc, pointing to the correct subfolders in the Framework folder.

The easiest is to edit the task.json file and use Visual Studio Code.
No editors war, if you like Vim, Emacs, Sublime, whatever, I don't care. My build is editor/ide agnostic.

I am bad at writing make files, I may consider writing one at some point.

## Additional information and license

If you need help, send me a message: framin2 at gmail.com.

I got the sounds and font for free. I added the font licence file in the fonts folder but I cannot find the audio source anymore. If you recognize it, please, drop me a message so that I can give proper attribution.

I made the sprites myself with Microsoft Paint. They are a perfect example of programmer art :p
I got the sounds and font for free. I added the font licence file in the fonts folder. The music comes from Patrick De Arteaga: <https://patrickdearteaga.com/>
He is awesome, visit his website and enjoy!
I made the sprites myself with Affinity Designer. They are a perfect example of programmer art :p
Feel free to reuse them at your will.

My code is provided with MIT license, use it at your will.
All my code is provided with BSD license.

0 comments on commit 3f771e0

Please sign in to comment.