You have studied about SFML, but using SFML can be a bit tricky. Explore how you can use SFML features to open a new window.
- Previously, we learned starting to code the game.…In this video, we are going to take a look at…how to include SFML features, use namespace sf,…SFML VideoMode and RenderWindow.…You can see I've added some more code,…the code that follows will open a window that…Timber will eventually run in.…The window will be 1920 pixels wide,…by 1080 pixels high and will be full screen.…Enter the code that is highlighted…amongst the existing code, and then we will examine it.…
Pound including SFML features.…The first thing we notice in our updated code…is another, albeit, slightly different include directive.…#include <SFML/graphics.hpp> tells the pre-processor…to include the contents of the file graphics.hpp.…It is contained within SFML folder,…which we created while setting up the project.…So what this line achieves is that it adds code…from the aforementioned file, which give us access…to some of the features of SFML.…
Exactly how it achieves this will become clearer…when we start writing our own separate code files…and using include to use them.…
This course was created and produced by Packt Publishing. We are honored to host this training in our library.
- Creating the main game loop
- Drawing the game background
- Handling errors
- Manipulating C++ variables
- Randomizing numbers
- Making decisions with if, else, and switch
- Moving game objects
- Pausing and restarting games
- Adding scoring and messages
- Using class enumerations and arrays
- Adding sound effects
- Object-oriented programming in C++
- C++ references
- Texture management
- Collision detection
- Implementing the HUD
- Finishing the game
Skill Level Beginner
1. C++, SFML, Visual Studio, and Starting the First Game
2. Variables, Operators, and Decisions
3. C++ Strings, SFML Time, Player Input, and HUD
4. Loops, Arrays, Switch, Enumerations, and Functions
5. Collisions, Sound, and End Conditions
6. Object-Oriented Programming, Classes, and SFML Views
7. C ++ References, Sprite Sheets, and Vertex Arrays
8. Pointers, the Standard Template Library, and Texture Management
9. Collision Detection, Pickups, and Bullets
10. Layering Views and Implementing the HUD
Updating the HUD each frame3m 24s
11. Sound Effects, File I/O, and Finishing the Game
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.