Skip to content

Instantly share code, notes, and snippets.

View nezvers's full-sized avatar

Agnis Aldiņš "NeZvērs" nezvers

View GitHub Profile
@nezvers
nezvers / SDL3 + Dear ImGui CMake.txt
Last active August 20, 2025 06:46
SDL3 + Dear ImGui CMake
cmake_minimum_required(VERSION 3.12)
include(FetchContent)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)
# SDL3 ______________________________________________
FetchContent_Declare(
sdl3
cmake_minimum_required(VERSION 3.28)
include(FetchContent)
set(ProjectName RaylibTemplate)
project(${ProjectName} LANGUAGES C CXX)
# Raylib _______________________________________
FetchContent_Declare(
raylib
DOWNLOAD_EXTRACT_TIMESTAMP OFF
@nezvers
nezvers / SDL3 Cmake template.txt
Last active April 9, 2025 11:47
SDL3 Cmake template
cmake_minimum_required(VERSION 3.12)
include(FetchContent)
set(PROJECT_NAME Sdl3Template)
project(${PROJECT_NAME})
# ?
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)
cmake_minimum_required(VERSION 3.12)
include(FetchContent)
set(PROJECT_NAME SfmlTemplate)
project(${PROJECT_NAME} VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
cmake_minimum_required(VERSION 3.28)
include(FetchContent)
# NAME
set(PROJECT_NAME RaylibTemplate)
project(${PROJECT_NAME} LANGUAGES C)
set(CMAKE_C_STANDARD 99)
# set(CMAKE_CXX_STANDARD 17)
@nezvers
nezvers / spring.gd
Created May 21, 2024 22:27
Spring delta time equation [Godot]
## Translated from EgoMoose tutorial of deriving formula for Unity
## https://youtu.be/FZekwtIO0I4
## https://gist.github.com/EgoMoose/777ed827e89b69d479ea407e79261b97
class_name SpringMath
extends Node
## zeta = damping ratio
## omega = angular frequency
static func vec1(value:float, target:float, velocity:float, delta:float, zeta:float = 0.3, omega:float = 20.0)->Array[float]:
@nezvers
nezvers / better_jumping_character_example.gd
Last active July 22, 2021 09:46 — forked from sjvnnings/better_jumping_character_example.gd
An easy to work with jump in Godot
# https://youtu.be/IOe1aGY6hXA
extends KinematicBody2D
export var move_speed = 200.0
var velocity := Vector2.ZERO
export var jump_height : float
export var jump_time_to_peak : float
export var jump_time_to_descent : float
@nezvers
nezvers / Platformer obstacle types.txt
Last active January 7, 2023 23:44
Collection of obstacle ideas for platformer games.
Springs - can be used as trap to throw at spike.
Dissapearing block - block that dissapears after landing on it or oscilates over time.
Abyss/ lava - mario abyss or static "floor is lava".
Air fan - constant speed added to the player (horizontal, vertical).
Spikes - visible and trap like.
Saw blades - static and moving.
Falling stuff - falling rocks or thing when player is under it.
Moving floor - factory assembly line floor.
Air current - lifting player up to certain height.
Raising lava - climbing floor of lava.
//Collection of all possible enemies to make easier on designing enemies
//Open for suggestions for entries or categories
walker
critter - just walking
Proximity runner
X proximity - ex: NES Batman 1st stage
Y proximity
guardian - object or position
patrolling
chaser