All Projects → eXpl0it3r → Examples

eXpl0it3r / Examples

Licence: Zlib license
Smaller or bigger examples that I've written or will write in the future in C++.

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to Examples

Obengine
2D Game Engine with Lua Scripting made on top of SFML !
Stars: ✭ 335 (+2292.86%)
Mutual labels:  sfml, zlib
lifish
A game inspired by Factor Software's "BOOM". Also the repo for BOOM Remake.
Stars: ✭ 38 (+171.43%)
Mutual labels:  sfml
denobyexample
Deno by example - short examples showcasing how to use Deno
Stars: ✭ 72 (+414.29%)
Mutual labels:  examples
wasm
fast wasm modules
Stars: ✭ 37 (+164.29%)
Mutual labels:  zlib
Examples Qt
Shows how to use Qt widgets only by programming code (c++17).
Stars: ✭ 38 (+171.43%)
Mutual labels:  examples
jsstore-examples
This repo contains examples of jsstore for different frameworks & tools
Stars: ✭ 31 (+121.43%)
Mutual labels:  examples
nav-docker-examples
Examples and use-cases for MS Dynamics NAV on Docker
Stars: ✭ 21 (+50%)
Mutual labels:  examples
Sandbox
KumbiaPHP sandbox with examples
Stars: ✭ 16 (+14.29%)
Mutual labels:  examples
algosketch
Visualizer for basic data structures and algorithms
Stars: ✭ 34 (+142.86%)
Mutual labels:  sfml
zlib-win-build
zlib Windows build with Visual Studio.
Stars: ✭ 100 (+614.29%)
Mutual labels:  zlib
ssGUI
◀️ Super Simple GUI Library for C++ ▶️
Stars: ✭ 21 (+50%)
Mutual labels:  sfml
nuxtjs-examples
Example apps of Nuxt.js framework
Stars: ✭ 51 (+264.29%)
Mutual labels:  examples
Glass
Gui Library written in Crystal
Stars: ✭ 24 (+71.43%)
Mutual labels:  sfml
example
【例子】微信开发SDK(Wechat SDK For Golang)
Stars: ✭ 27 (+92.86%)
Mutual labels:  examples
cloud-game-servers-examples
Collection of examples for using Google Cloud Game Servers.
Stars: ✭ 28 (+100%)
Mutual labels:  examples
Swoosh
SFML Activity and Segue Mini Library
Stars: ✭ 63 (+350%)
Mutual labels:  sfml
among-us-replayer
Replayer for Among Us
Stars: ✭ 32 (+128.57%)
Mutual labels:  sfml
zlib
Compression and decompression in the gzip and zlib formats
Stars: ✭ 32 (+128.57%)
Mutual labels:  zlib
90 Python Examples
The best way to learn Python is by practicing examples. The repository contains examples of basic concepts of Python. You are advised to take the references from these examples and try them on your own.
Stars: ✭ 190 (+1257.14%)
Mutual labels:  examples
optuna-examples
Examples for https://github.com/optuna/optuna
Stars: ✭ 238 (+1600%)
Mutual labels:  examples

Examples

Every now and then I sit down and try out some features of some library, C++ itself or with SFML. Instead of letting those code fragments go to waste somewhere on my disk or get lost in the depth of the SFML forum, I decided to put them openly and centralized here on GitHub for everyone to see, share and learn from them.

Keep in mind that the code is provided as-is and isn't necessarily suited for your final product, as not a lot of thought was put into performance or code design.

zlib

gzip Decompression

zlib is a small and useful library which allows the compression and decompression of data. By applying some settings it's possible to let zlib decompress a gzip file, which this examples demonstrates by loading a file into memory and output the decompressed data to standard output.

SFML

Center Text

One of the most common questions you'll run into on the SFML forum is how to center a sf::Text object inside a shape, or more commonly, a button. Because sf::Text aligns itself to the baseline instead of the visual top/bottom, it tends to be more confusing that working with shapes and sprites. In order to get it working properly, you have to take into account the LocalBounds as is shown in the given example.

Center Text

Fading Dots

This was originally created as a test for this thread (or was it this one?), but since I kind of liked the result I adjusted a few things and uploaded it.

Fading Dots

Flashlight

Out of nowhere came suddenly all those requests (starting with this one) for subjective blending and I think, I could help a few people with my example on how to achieve what they wanted.

Flashlight 1 Flashlight 2

Hue Shift

Although I can't find the original SFML thread about this, I found the StackOverflow question which was IIRC created before the forum thread. This effect can definitely give a nice ambiance, but it probably could need some retouching. Since the picture do not tell much: Starting off with one color the example automatically iterates through the whole RGB color spectrum in a smooth way.

Hue Shift

Lightning

I had once read a tutorial in connection with SFML on how to create some nice 'laser' effect. Unfortunately I don't remember which blog/site this was on, because he was using some texture moving which made everything look even better. While doing a search to possible find that tutorial again, I found another similar piece of code on the forum, adapted it for SFML 2 and made a nicer class out of it.

Lightning

Mixing SoundBuffers

The other day in #learnprogramming on freenode someone was trying to implement a way to mix two audio files without actually playing them back. I wondered how something like that would work with SFML and thus went ahead an wrote a small example. A quick Google search on audio sample mixing brought me to this site and lead me to the current implementation.

Road

I'm not sure if there ever existed a forum post or if the whole conversation happened on IRC, but someone wanted to make a 'scrolling' road and since I really liked that idea, I went ahead and implemented an example. The code here is particularly not that nice, so keep that in mind when adapting it.

Road

Rotating Triangle

One of the age old questions by game development beginners is along the lines of "How do I rotate my player to face X?". This short example answers that question, by rotating a triangle (sf::CircleShape with three points) to wherever the mouse pointer is on the window.

Rotating Triangle

Rotating Vertices

This example answers the same question as the 'Rotating Triangle' one, but it uses a sf::VertexArray in combination with a sf::Transformable. It's a good foundation to see how one could start to implement an entity class deriving from sf::Transformable and sf::Drawable.

Rotating Vertices

Simple AABB

Every month there's at least one question on simple collision detection testing the last 'bigger' one with in this forum thread, which lead to this example. I've even implemented some very simple physics, which will fail in most situations, but you can at least move around and jump.

AABB

Sound Recording

Even though SFML has a tutorial and an example on sound recording, I wanted to have my own small demonstration of said feature with recording device selection and mono/stereo options.

License

All examples are under the zlib/png license and thus free to use. See the LICENSE file for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].