123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|646|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> Breakout demo in C++.

Tue, 16 Aug 2011, 20:16
steve_ancell
Hotshot gave me the challenge a few days ago to get his Breakout/Pong demo working, so I decided to recode it from the ground up. I managed to do it, but it crawls with bugs LOL. I had lots of fun doing it.

Graphics are the work of Hotshot, hope you didn't mind me putting it on here Bud.

socoder.net/uploads/51/BreakOut.zip
Includes source and VC++ 2008 Express project file.
Wed, 17 Aug 2011, 05:26
Hotshot
Nice one Man
Code Block Suck

I have to download either VC++2008 or VC++2010 even thought my Register for it have been screw up as it wont let me start the program

Mircosoft Suck! LOL
Wed, 17 Aug 2011, 11:16
steve_ancell
I'm putting together some VC++ SFML setup instructions for you, I will post them here as soon as it's done.
Wed, 17 Aug 2011, 11:34
Hotshot
Nice one

Wed, 17 Aug 2011, 12:07
steve_ancell
There y' go, hope this simplifies things a bit.


This is my simplified version of the instructions for setting up SFML with VC++ 2008, this part only needs to be done once.

First download the SFML SDK for VC++ 2008 Express from www.sfml-dev.org/download.php.

Assuming you alread have Visual C++ Express installed, do the following.


1) Open: Microsoft Visual C++ 2008 Express Edition.

2) In the menu bar, Click: Tools -> Options: In the left part pf the "Options" panel, expand the "Projects and Solutions" part and click on "VC++ Directories".

3) In the top-right of the "Options" panel you will find a dropdown menu, click on it and select "Include files". In the box just under the dropdown menu, click twice underneath the last entry and click the little browse button to the right of the textfield that appears. Navigate the file selector to the path where you unzipped the SFML files. The path may vary on your machine, but should generally be something like: "SFML\VC++2008\1.6\SFML-1.6-sdk-windows-vc2008\SFML-1.6\include".

4) Click on the dropdown menu again and select "Library files", click twice again beneath the last entry in the box below and click that little browse button again. Navigate to the same path as last time, but this time replace the "SFML-1.6\include" part of the path with "SFML-1.6\lib".

5) Click OK. Now for the next part, scroll down for more...




This next part needs to be done for every project that you create, so I will give you a tour of the Breakout project that I posted as an example.

1) Within the VC++ IDE, open the solution file of the project that I posted at the beginning of this topic.

2) In the menu bar, click View -> Solution Explorer.

3) In the Solution Explorer panel, check that the Solution 'Breakout' (1 project) tree is expanded. Click the right mouse button on the next line down (titled "Breakout") and select "Properties" A window that is titled "Breakout Property Pages" should pop up.

4) In the left panel, check that the "Configuration Properties" part of the tree is expanded.

5) Expand "Linker" and click "Input".

6) Click on the Configuation dropdown menu at the top left, select Debug, look for "Additional Dependencies" in the right hand panel and click it. Click the little browse button that appear at the end, a window titled "Additional Dependencies" should pop up. The libraries that I've included are the only ones needed for the project. If you are going to be using network or audio, you will need to add those too. You may notice that the library names have "-d" in them, these are the ones that you use for debugging, you also need to copy the "*-d.dll" (DLL) files into the "Debug" folder of your project.

7) Click on the Configuration dropdown menu again and select Release. If you get a pop up box asking if you want to save, just click "Yes".

8) Click on "Additional Dependencies" and click that little button again. You will see that pop up window again with the same entries, but this time with "-s" included in the names. If you use the "-s" part, you wont need to copy any DLL files to the Release folder of your project.

9) Click Apply/OK when you're done.
Wed, 17 Aug 2011, 12:35
Hotshot
I have quite follow it well but I get the error saying

1>------ Build started: Project: BreakOut, Configuration: Debug Win32 ------
1>Linking...
1>Embedding manifest...
1>Project : error PRJ0003 : Error spawning 'cmd.exe'.
1>Build log was saved at "file://c:\Users\myname\Desktop\BreakOut\BreakOut\Debug\BuildLog.htm"
1>BreakOut - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

what is causing it?

UPDATE:- I got it FIXED

Good Tutorial for everyone who want do SFML on VC++

Thanks steve_ancell


Wed, 17 Aug 2011, 13:33
steve_ancell
Welcome Bud.