Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Jul 2013
Offline Last Active Aug 24 2013 10:36 AM

Topics I've Started

c++ SFML issue. Help!

23 July 2013 - 03:22 PM



Okay, so I just installed SFML on Visual C++ and i'm working some tutorials and whatnot.  Anyways i'm having a big problem.  Here's my code.


// Libraries
#include <SFML/Window.hpp>
#include <iostream>
using namespace sf;
using namespace std;
// Global variable, functions, classes
int main()
//Create the window parameters
sf::RenderWindow window(VideoMode(800, 600), "Grole");
window.setFramerateLimit(60); //Game loop will repeat 60 times per second
bool running = true;
//Game loop (infinite loop that reapeats until user decides to close game.
while (running == true)
Event event;
//Check all events that are happening in between each frame
while (window.pollEvent(event))
//Clean up
return 0;




When I use sf::RenderWindow my compiler tells me "Error: namespace "sf" has no member "RenderWindow".  Anyone know how to solve this problem?  



Wanting to build a 2d RPG but kind of lost

21 July 2013 - 11:30 AM

Okay, so I have a pretty basic understanding of C++.  This is roughly the information I've covered so far:



Storing Data and getting user input

Performing calculations and displaying output

If Else Statements




And references.


This is all great and I enjoy programming but I REALLY want to start working with graphics and move towards 2d games.  I've started to look into libraries like SDL and some of it looks really weird and then other parts I can understand.  Usually after I get past the initial "setting up the SDL screen" tutorial it gets way advanced and I lose it.  I really want to start moving into something with graphics because it's starting to feel like the console just isn't doing it for me anymore.  With what I've learned, I have been able to program a decent text based RPG. 


The only things I haven't gotten to/don't completely understand when I try to do are pointers and classes. 


So I guess what i'm asking is... How do I progress towards making a 2d game of some sort?  Where can I start or am I going about it wrong?  I've tried looking at source code from other people's games or basic SDL game tutorials but it just seems very overwhelming.  Can anyone help me out?