Skip to content

Instantly share code, notes, and snippets.

View glowiak's full-sized avatar
🏠
Praca z domu

glowiak

🏠
Praca z domu
View GitHub Profile
@glowiak
glowiak / snake.c
Created February 11, 2024 20:26
Snake game in C/raylib in only 47 lines of code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <raylib.h>
#define TILE_SIZE 64
#define ROWS 15
#define COLS 10
static short foodPos[2], snakePos[2], snakeDirection = 0, lost = 0, gameRunCooldown = 0, snakePartTime[ROWS][COLS], creationPower = 2;
void main() {
@alksily
alksily / NoiseGenerator.java
Last active August 6, 2024 15:42
Perlin Noise (1D, 2D, 3D noise generator)
package main.ru.aengine.noise;
import java.util.Random;
public class NoiseGenerator {
private double seed;
private long default_size;
private int[] p;
private int[] permutation;