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 2 [3] 4 5 ... 9
take these

#include <SFML/System/Time.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Graphics/RenderWindow.hpp>

out of PongGame.cpp

and put them in PongGame.hpp

PongGame.cpp includes  PongGame.hpp so it will still see those lines

and once they're in PongGame.hpp there is no need for
class Event;
class Time;
class RenderWindow;

so just delete them

General / Re: Program immediate closes
« on: March 04, 2017, 02:32:54 pm »
just a guess

but somewhere I think you're supposed to set the compiler subsystem to

it may show that somewhere in the tutorials

when I create an sfml program in codeblocks, I set the subsystem to console even though I'm creating a windowed application

the window displays just the way you expect (like a normal window with min / max buttons and so on)
but codeblocks also opens a command line window where it puts the output of cout 

you probably have the the subsystem set to

but you aren't calling a "create window" function
so the program just exits

SFML projects / Re: TwoCars - A simple endless survival game
« on: March 03, 2017, 01:41:22 pm »
nice concept

its like that dancing game, but with cars

very cool

SFML projects / Re: 2D RPG/ARPG Game
« on: March 03, 2017, 01:40:03 pm »
Thank you Ironbell! As for ARPG/RPG - this game will be similar to Diablo 2, Diablo 3, and Path of Exile. I really want the player to have the feeling of character progression from an RPG perspective, but also have the 'action' feeling of dodging, attacking, and itemizing from an ARPG perspective.


I love Diablo 2

and I'll be playing the new PoE league tonight when I get home from work 

he must be referring to


"STP is an extension library for SFML2 designed to read the Tiled map format. It uses the new C++11 standard features, so be sure to have a C++11 compatible compiler like g++ 4.7, clang 3.3 or Visual Studio 2013 compiler."

but I've never heard of it either

I don't know why he thinks its the most popular

General / Re: Unable to query registry key for joystick at index 0
« on: February 28, 2017, 08:53:28 am »
go here


scroll down to the section named
Bringing the window to life

use that sample code instead and see  what happens

Feature requests / Re: Binary downloads built with newer MinGW?
« on: February 21, 2017, 08:27:39 am »

I'd suggest using MinGW-w64 (GCC 6.3.1) and compiling the latest SFML from the GIT repository.


what is the advantage of doing that compared to just downloading the prebuilt GCC 6.1.0 MinGW (SEH) - 64-bit

General / Re: Hi, I want to write a game.
« on: February 09, 2017, 10:11:12 pm »
there are plenty of books on SFML that go into those details

there's plenty of videos on SFML -- many won't go into the detail you want, but they will show how to make games 

I think these are great videos

he crams every game into one file
they are simple games so they don't use an entity manager

but you lean the basics of SFML and how much you can do with just a few lines of code

General / Re: How to use SFML with MinGW in the simplest way possible
« on: February 08, 2017, 12:03:48 am »
for static debug you need this file

of course you link it like this

for static release you need this file

and you link it like this

same with all the other sfml files


you always need this
#include <SFML/Graphics.hpp>

your program uses certain sfml functions, methods and classes

your program needs to know what those functions, methods and classes look like 
what parameters do they take ? what do they return ?
an integer ? a float ?

the compiler needs to look up these definitions
so it looks in a .hpp or .h file

otherwise it would have no idea what an sf::RenderWindow is

so this line
#include <SFML/Graphics.hpp>

literally does a copy of this code
and pastes it into your file

now your compiler knows what each function, method and class looks like 

from my noob understanding linking is like giving your compiler an address book

the lib (or .a file) tells your compiler the address of the functions and methods you're using

so the .hpp gives it a definition
then the dll gives it the actual code
but its just one huge block of code, so the linking tells the compiler to use an import library to look up the address of each function in the dll (or in the static lib)



so EVERY time you build an sfml program you must include and link and tell your compiler the location of everything

like the commands here show you

or do it in codeblocks or visual studio (but you still have to do it every time)

but now once your program is running it needs the sfml code (if it was compiled dynamically) 
so you put the dlls somewhere in your path or in the same folder as your .exe

General discussions / Re: Is SFML still actively developed?
« on: February 07, 2017, 09:26:57 pm »
if any SFML-related bugs/issues arise during my development, will there be any kind of support to fix them?

There is no official support for anyone, at least not that I know of. After all, you paid nothing for using SFML. Having said that, the volunteers in the community that has emerged around SFML do try to solve the issues as soon as possible.

You see, if you haven't paid for an actual support, don't be an ass if your issue is not being worked on the moment you post in on Github or maybe even tagged as "wontfix". I stress the people here are working on SFML for free.

he just asked a question

he even said "Sorry for such a harsh first message,"

and I think his question is a valid one
have you ever been to the SDL forums ?
the place is practically deserted 

as far as "official" support goes ... we have the SFML dev team posting here daily and the author of an sfml book posts quickly in response to questions

so I'd say you get "official" support

I'm sure the devs would be happy if iOS and Android had as many testers and projects as the MS and linux versions
you can always help out

anytime you have a problem (that you have tried fixing yourself, but still can't) post a question here in the proper forum

maybe you'll even be the one to make fixes for the iOS version

General / Re: How to use SFML with MinGW in the simplest way possible
« on: February 07, 2017, 06:42:03 pm »
getting SFML setup on codeblocks is ridiculously easy


"leaves some things entirely unexplained, such as where to find / how to link to opengl32, winmm and gdi32, and where to put those files in relation to the sfml libraries."

codeblocks links all those things for you automatically
you don't have to touch them, move them or even think about them

General / Re: Polling for events drastically lowers frame rate
« on: February 07, 2017, 09:57:53 am »
you have to tell cmake to generate a ms solution or project or something
the link I gave is telling cmake to generate a ningw solution 

you'll have to look at the cmake tutorial to figure out how to generate ms solution

once cmake generates a ms solution you compile that solution to create your dll

go here

"With Visual C++, you can either run CMake from the "Visual Studio command prompt" available from the start menu, or run the vcvars32.bat batch file of your Visual Studio installation in the console you have open. The batch file will set all the necessary environment variables in that console window for you."

and the sections after that

Graphics / Re: Problem with the draw & display methods
« on: February 05, 2017, 04:52:42 am »
just use an
and a boolean

Code: [Select]

 bool firstTime = false;
 while (screen.isOpen())
      blah blah blah

      // Operate with the window
      if ( firstTime )
         firstTime = false;

Pages: 1 2 [3] 4 5 ... 9