Implement The Window class & main game class:

I am following step by step in my Book - SFML Game Development By Example By: Raimondas Pupius, I am a little confuse when I got to Chapter #2 page # 21(Implementing the window class)-Let begin actually building our window class. What is some steps to Designing a window class, along with a main game class?
Any HELP would help me to understand this chapter

Thanks,
Chester


1. make a project ---- is this right?
2.
3.
4.
5.
Example...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <SFML/Graphics.hpp>

int main() {

	sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
	sf::RenderWindow window(sf::VideoMode(300, 300, desktop.bitsPerPixel), "Main");

	sf::CircleShape shape(100.f);
	shape.setFillColor(sf::Color::Green);

	while (window.isOpen())
	{
		sf::Event event;
		while (window.pollEvent(event))
		{
			if (event.type == sf::Event::Closed)
				window.close();
		}

		window.clear();
		window.draw(shape);
		window.display();
	}

	return 0;
}
Topic archived. No new replies allowed.