Skip to content

Instantly share code, notes, and snippets.

View RicoP's full-sized avatar
🎯
Focusing

Rico P RicoP

🎯
Focusing
View GitHub Profile
@trikko
trikko / raylib-video.c
Last active November 5, 2023 00:34
How to render a video with raylib and gstreamer
#include "raylib.h"
#include <gst/gst.h>
#include <gst/app/gstappsink.h>
GstElement* createPipeline(const char* filename)
{
GError *error;
gchar *pipelineString = g_strdup_printf ("filesrc location=%s ! tee name=t ! queue ! decodebin ! videoconvert ! appsink name=output caps=video/x-raw,format=RGBA,pixel-aspect-ratio=1/1 t. ! queue ! decodebin ! audioconvert ! audioresample ! autoaudiosink", filename);
GstElement *pipeline = gst_parse_launch (pipelineString, &error);
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 7, 2024 19:39
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@tonetheman
tonetheman / libraryfinder.cpp
Created September 1, 2018 12:40
Johnathan Blow's pastebin - a windows library finder
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@shadowmoose
shadowmoose / Gource.ps1
Last active March 13, 2021 05:58
Gource git history into MP4 format - Windows Powershell
# When run (in PowerShell), this script prompts for a directory containing a git project.
# It then jumps into that directory and uses Gource + FFmpeg to generate an mp4 animation of the history of the current branch.
# Additionally, it has support for embedding background music files. Click "Cancel" on the prompt to not add audio.
# If the video is shorter than the selected audio, the audio will fade out. If longer, the video will be sped up to fit the audio.
#
# Note: If the complementary script "handle_avatars.ps1" is present, this script will use it to download user avatars from GitHub.
# This may hit rate limiting, so ClientID and ClientSecret oAuth params are accepted, which will bypass GitHub's limits.
# You can cut down on the required queries by properly using a ".mailmap" file to combine user's emails.
# Pass "SkipGithubAvatars" to ignore this entirely, if your project is not hosted on GitHub.
#
@Jobarion
Jobarion / THX.java
Last active July 9, 2023 21:07
THX Deep Note Generator
/*
MIT License
Copyright (c) 2018 Jonas Balsfulland
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@bkaradzic
bkaradzic / why_i_think_immediate_mode_gui_is_way_to_go_for_gamedev_tools.md
Last active April 5, 2024 05:40
Why I think Immediate Mode GUI is way to go for GameDev tools

Why I think Immediate Mode GUI is way to go for GameDev tools

Prerequisites

Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
/*
* Coroutines.
*
* To make a (fake) coroutine we use these macros. A coroutine method must be static,
* return bool and needs a parameter (Generator & generator).
*
* Generator must follow this schema:
* struct Generator {
* int line;
* float time;
@SSARCandy
SSARCandy / opencv_with_cmake.md
Last active April 15, 2024 02:25
Setting up OpenCV(+extra modules) with Cmake step by step tutorial

Setting up OpenCV with Cmake GUI

  1. Download OpenCV and Cmake
  2. Build opencv with cmake image
  • Press configure, choose visual studio 2015, finish
  • Then press generate
  1. Open OpenCV.sln under build/
  2. Build it using Debug, Release
    image
@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 23, 2024 13:59
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@ocornut
ocornut / imgui_node_graph_test.cpp
Last active April 23, 2024 19:02
Node graph editor basic demo for ImGui
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code!
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff,
// which ended up feeding a thread full of better experiments.
// See https://github.com/ocornut/imgui/issues/306 for details
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors
// Changelog
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic().