Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jamesL

Pages: 1 ... 3 4 [5] 6 7 ... 9
61
Window / Re: Setting up on Codeblocks
« on: December 16, 2016, 06:58:16 pm »
go here
http://www.codeblocks.org/downloads/binaries

download this
codeblocks-16.01mingw-nosetup.zip

put it in a folder
C:\New_folder\codeblocks-16.01mingw-nosetup.zip

unzip it
C:\New_folder\codeblocks-16.01mingw-nosetup

go here
http://www.sfml-dev.org/download/sfml/2.4.1/

download this
GCC 4.9.2 TDM (SJLJ) - 32-bit

put it in a folder
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit.zip

unzip it
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit

go to your codeblocks folder
C:\New_folder\codeblocks-16.01mingw-nosetup

run
CbLauncher.exe

it will ask you which compiler you want to use
it will tell you it has detected
GNU GCC Compiler

select and highlight that compiler and click the
Set as Default
button

then click
OK

now it may ask you if you want to set codeblocks as the default application for C and C++ files
choose any option you want - it does not matter
if it doesn't ask, that's ok

click the OK button

click the
Create a new project
option

a window will pop up with Project templates

scroll down and find
SFML project

select it and press Go

it will say
"Welcome to the SFML project wizard"

Click Next >

it will give you a choice for SFML 1.6 and SFML 2.0

make sure 2.0 is highlighted
press Next >

It will ask you which type of library to add

Choose Dynamic Link Library
press Next >

Project title = project_1
Folder to create project in = C:\New_folder\
press Next >

A window pops up asking you to select the location of SFML on your computer
it says
$(#sfml)
change it to
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit\SFML-2.4.1

press Next >

a window pops up asking you about Debug and Release
leave as is
press Finish

A project and C++ file have been created for you

go to the codeblocks menu and press
Build
then
Build

Your program should build with no errors
you will not be able to run your program yet.

first go to
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit\SFML-2.4.1\bin
copy all the files in ^ this folder

and paste them here (this is a copy, not a move)
C:\New_folder\project_1\bin\Debug

go to the codeblocks menu and press
Build
then
Run

this builds a 32 bit executable

going into the Project / Build options and selecting
c++11
or
c++14
will make no difference

this should be enough to get you started

however, you will eventually run into problems with this 

as far as I can tell this version of the compiler leaves out some C++ functions that you might find in some SFML examples

specifically the
to_string
function 

it was broken in MinGW and eventually fioxed in MinGW-w64
as detailed here
http://stackoverflow.com/questions/12975341/to-string-is-not-a-member-of-std-says-g

you can eventually install a correct compiler and corresponding SFML version from the SFML download page

but this should be enough to get you started

oh, if you add
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit\SFML-2.4.1\bin
to your PATH
or copy the dlls to a folder already in your PATH then you won't have to copy them all the time

62
General / Re: libstdc++6.dll error - unable to run tutorial test program
« on: December 16, 2016, 06:56:06 pm »
go here
http://www.codeblocks.org/downloads/binaries

download this
codeblocks-16.01mingw-nosetup.zip

put it in a folder
C:\New_folder\codeblocks-16.01mingw-nosetup.zip

unzip it
C:\New_folder\codeblocks-16.01mingw-nosetup

go here
http://www.sfml-dev.org/download/sfml/2.4.1/

download this
GCC 4.9.2 TDM (SJLJ) - 32-bit

put it in a folder
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit.zip

unzip it
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit

go to your codeblocks folder
C:\New_folder\codeblocks-16.01mingw-nosetup

run
CbLauncher.exe

it will ask you which compiler you want to use
it will tell you it has detected
GNU GCC Compiler

select and highlight that compiler and click the
Set as Default
button

then click
OK

now it may ask you if you want to set codeblocks as the default application for C and C++ files
choose any option you want - it does not matter
if it doesn't ask, that's ok

click the OK button

click the
Create a new project
option

a window will pop up with Project templates

scroll down and find
SFML project

select it and press Go

it will say
"Welcome to the SFML project wizard"

Click Next >

it will give you a choice for SFML 1.6 and SFML 2.0

make sure 2.0 is highlighted
press Next >

It will ask you which type of library to add

Choose Dynamic Link Library
press Next >

Project title = project_1
Folder to create project in = C:\New_folder\
press Next >

A window pops up asking you to select the location of SFML on your computer
it says
$(#sfml)
change it to
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit\SFML-2.4.1

press Next >

a window pops up asking you about Debug and Release
leave as is
press Finish

A project and C++ file have been created for you

go to the codeblocks menu and press
Build
then
Build

Your program should build with no errors
you will not be able to run your program yet.

first go to
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit\SFML-2.4.1\bin
copy all the files in ^ this folder

and paste them here (this is a copy, not a move)
C:\New_folder\project_1\bin\Debug

go to the codeblocks menu and press
Build
then
Run

this builds a 32 bit executable

going into the Project / Build options and selecting
c++11
or
c++14
will make no difference

this should be enough to get you started

however, you will eventually run into problems with this 

as far as I can tell this version of the compiler leaves out some C++ functions that you might find in some SFML examples

specifically the
to_string
function 

it was broken in MinGW and eventually fioxed in MinGW-w64
as detailed here
http://stackoverflow.com/questions/12975341/to-string-is-not-a-member-of-std-says-g

you can eventually install a correct compiler and corresponding SFML version from the SFML download page

but this should be enough to get you started

oh, if you add
C:\New_folder\SFML-2.4.1-windows-gcc-4.9.2-tdm-32-bit\SFML-2.4.1\bin
to your PATH
or copy the dlls to a folder already in your PATH then you won't have to copy them all the time

64
General discussions / Re: SFML Game Development by Example - 4th SFML book
« on: December 16, 2016, 12:44:14 pm »
...Yes, I'm currently working on another book, and it's almost done. I should be done with the last two chapters this weekend, and it should be out in a couple of weeks. It has already been announced on the Packt website. I'd link to it, but their site seems to be down at the moment. :D

Edit: It's back up now: https://www.packtpub.com/game-development/mastering-sfml-game-development
The description doesn't include this, but the last couple of chapters focus on advanced lighting, shadows, and optimizations.

I hope this doesn't adversely affect your income, but the ebook version of that book is currently on sale for 5 dollars



65
SFML projects / Re: 2D RPG/ARPG Game
« on: December 11, 2016, 04:57:06 am »
nice spell effects

66
Network / Re: Problem with Listener.accept
« on: December 08, 2016, 07:35:12 am »

http://www.sfml-dev.org/tutorials/2.4/network-socket.php

"The accept function blocks until a connection attempt arrives (unless the socket is configured as non-blocking)."



67
General / Re: strange behavior in the update function
« on: December 08, 2016, 12:29:58 am »
then take it out

it's not serving any purpose

69
Graphics / Re: undefined reference to sf::Font::loadFromFile
« on: December 05, 2016, 05:16:14 am »
here's one problem


E:\Documents and Settings\CodeBlocks Projects\test\main.cpp|28|warning: suggest parentheses around assignment used as truth value [-Wparentheses]|

if(event.type = sf::Event::Closed)

should be

if(event.type == sf::Event::Closed)

as for the font, make sure you have the correct version of sfml with the correct compiler

sfml here
http://www.sfml-dev.org/download/sfml/2.4.1/

links to the compilers in the bottom of the first gray box


70
General / Re: ERROR
« on: December 03, 2016, 08:46:59 am »
still

C:\Users\myName\Desktop\file\ sfml\main.cpp|1|fatal error: SFML/Graphics.hpp: No such file or directory|

do you actually have a space in your path before sfml ?
\file\ sfml\


72
System / Re: People messing with my programs.
« on: December 01, 2016, 09:51:51 pm »
every windows computer can extract .zip files 

I'm sure every mac and linux can too

if your game is worth cheating then people are going to cheat
they'll just use cheatengine or something else 

putting everything an exe would make it huge
if its even possible

how would you do character saves ?

73
General / Re: Linking problems with Code::Blocks 13.12 (SFML version 2.4.1)
« on: November 28, 2016, 06:13:10 pm »
should look something like this

(click to show/hide)

and read this again
http://www.sfml-dev.org/tutorials/2.4/start-cb.php

74
General / Re: SFML 2.4 bugged?
« on: November 21, 2016, 12:38:27 am »
where are your dlls

did you have any 2.2 dlls in your path or in system32 or anywhere else ?


75
the books are for TOTALLY different audiences

if someone has never programmed then this book is better

chapter 2
2: VARIABLES, OPERATORS, AND DECISIONS – ANIMATING SPRITES

really does explain what a variable is and what operators are (not operator overloading, just operators) and how to do decisions (if / else statements)

this book truly is a beginner's programming book

if someone has never programmed in C++ then this book is much better
the entire first game (tree chopping game) is written without classes

it's not until chapter 6 and the 2nd game that he begins to introduce classes
he explains what classes are and the concept of Encapsulation, Polymorphism, Inheritance and public and private

the book is quite simple to get into and very fast to start creating things

compare that to the SFML Game Development where it has you making Entity classes, SceneNode classes and a generic ResourceHolder template for textures and Fonts before you even make your first game

you absolutely have to know C++ to even get started with the SFML Game Development book
and you have to be happy getting into a lot of background and theory and setup

its like if you wanted to learn to build a car
the Beginners book would have you building a simple working go kart in a couple of chapters

the Game Dev book would teach you how to build a more advanced go kart, but first it would teach you how to build some basic car parts and even give you some theory on why you make the parts that way

the result being I'm driving around having fun in my go kart while you're still learning how to paint yours

when you finally get yours finished will it be more solid than mine ?
yeah

but then you already knew the basics of auto mechanics before you started so you could jump into the more advanced stuff

but I didn't even know what a wrench is so I just wanted to learn the basics and get something up and running

that's really how these two books compare

the beginners book even has some pretty detailed pictures and instructions on setting up projects in Visual Studio

so yeah, if you're brand new to C++ or brand new to programming the Beginners book would be a 10

but if you've got some basic knowledge of C++ then you'll end up skipping so many pages
variables ?
if /else statements ?
classes ?

you already know all that
you'd probably think you wasted money on such a beginner's book

also, an experienced C++ programmer would be SO upset with the Beginners book treatment of pointers 
the Beginners book uses old C style pointers with new and delete

so a C++ programmer would probably give the Beginners book a 5 or maybe even a 3

they would be happy with the game examples and the explanations of SFML, but would be bothered by the lack of modern and advanced C++ features and all the time spent on the basics

I'd say the Beginners book would be better suited for anyone new to programming or even for someone with some experience in C or Python or javascript

but for someone with knowledge of C++ or familiar with another game library (like SDL) the Game Dev book might be better

Pages: 1 ... 3 4 [5] 6 7 ... 9
anything