Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sfml]

SFML (Simple Fast Media Library) is a portable and easy to use multimedia API written in C++. You can see it as a modern, object-oriented alternative to SDL. SFML is composed of several packages to perfectly suit your needs. You can use SFML as a minimal windowing system to interface with OpenGL, or as a fully-featured multimedia library for building games or interactive programs.

44
votes
7answers
15k views

Mandelbrot image generator and viewer

This is a C++ program which outputs a Mandelbrot fractal image in a graphics window and lets the user zoom and pan around the image, generating a new image each time the user does so. I'm using SFML ...
17
votes
2answers
5k views

Barnes-Hut N-body simulator

I've written an n-body simulator, implementing the Barnes-Hut algorithm. Please comment on anything you can see wrong with this. Wikipedia Barnes-Hut page This is a screen shot of the simulation 20 ...
12
votes
1answer
575 views

Sketch of Chutes and Ladders game

The classic Chutes and Ladders game has a grid of 100 squares with various "chutes" (which send a player backwards) and "ladders" (which promote a player forward). The goal here was to randomly ...
8
votes
3answers
144 views

SFML snake game in C++

I made a snake game in sfml and i'm kind of proud of the code's structure, but proud doesn't mean it's good, so i'm putting it here so that if there is something that could be bettered, you would know....
6
votes
2answers
65 views

GUI Button Element with Unit Tests

I would like a review on just a single class today. More important to me than a review on the class itself, however, is a review of the unit-tests I wrote for it. You see this is my first attempt at ...
5
votes
1answer
911 views

Fake 3D effect in SFML

I was reading about making fake 3D effects or so-called "mode 7" on 2D contexts. I have made a small program to demonstrate the fake 3D effect by using SFML. How can I improve it? ...
5
votes
1answer
1k views

Simple Snake Game

I was working on this game for while and I have made it for education purposes by using SFML. The game works fine but I would like to know how I can improve it. ...
5
votes
2answers
807 views

Simple implementation of Conway's game of life with SFML

This is a very simple version of Conway's game of life. It treats the edge of the grid as dead cells and uses a very basic algorithm. Despite this it works fine. As people might not have the SFML ...
4
votes
1answer
168 views

Fake 3D effect in SFML - follow up

Based on my previous question, I have implemented all the recommendations received. Here is a summary of the improvements: Use meaningful names as much as possible. Removed multiple declarations in ...
2
votes
1answer
476 views

Simple Snake Game - followup

Based on the previous question, I have implemented all suggestions. Also, I added new features to the game. Summary of improvements: Implemented smooth movements to snake instead of tile movements ...
7
votes
1answer
77 views

Improved snake game in SFML (C++)

This is the improved code of a question I asked some days ago. main.cpp ...
6
votes
1answer
2k views

Ping Pong game in SFML

I am learning C++ and SFML so I want to know if I am laying my code out neatly and if my code is efficient. I know this is not a full game yet but I want to know if I am on the right tracks. ...
3
votes
1answer
106 views

SMFL Dice class

I'm writing game in SFML and I got question about class design. For example, I have a dice class that looks like this: ...