Skip to content

Instantly share code, notes, and snippets.

View WinterAlexander's full-sized avatar

Alexander Winter WinterAlexander

View GitHub Profile
@WinterAlexander
WinterAlexander / IncludeShaderProgramLoader.java
Created August 17, 2025 00:09
IncludeShaderProgram loader for libGDX
package com.greenfrisbee.makerking.render.loader;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.assets.loaders.ShaderProgramLoader;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.ObjectSet;
public class SSAOFrameBuffer extends FrameBuffer {
public SSAOFrameBuffer(int width, int height, int samples) {
super(makeBuilder(width, height, samples));
}
private void checkValidBuilder() {
if(getBuilder().getSamples() > 0 && !Gdx.graphics.isGL30Available())
throw new GdxRuntimeException("Framebuffer multisample requires GLES 3.0");
@WinterAlexander
WinterAlexander / NoBleedingFreeTypeFontGenerator.java
Last active April 24, 2024 02:45
NoBleedingFreeTypeFontGenerator
package com.greenfrisbee.makerking.render.font;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
import com.badlogic.gdx.graphics.g2d.freetype.FreeType;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
# Version 0.12.1
New features :
- Added the Instrument Block, a block that plays music you compose from several instruments
- Added mob armor, gear that can be added to a mob to make it survive multiple hits
- Every piece of the game's UI (except in the editor) can now be navigated using controllers
- You can now see the names of other players, or disable them if you don't want to (Thanks Manmellon!)
- Ability to register using Steam account instead of password, registration for non Steam users now require email
- Added a settings page to modify your account username, email or link your account to Steam
- Added Anisotropic Filtering graphic setting for mob parts, making stretched mob parts look much better (need good GPU)
@WinterAlexander
WinterAlexander / makerking_event_guide.md
Last active March 4, 2024 11:48
Welcome to the guide for MakerKing's event system.

MakerKing Event Guide

Welcome to the guide for MakerKing's event system.

Connecting to the WebSocket

To connect, simply open a WebSocket client at ws://localhost:1770 on the client machine. 1770 is the port and cannot be changed at the moment. If there is a use for this I can add a configuration file that would let you change the port.

@WinterAlexander
WinterAlexander / 0.9.md
Created August 3, 2021 01:32
MakerKing 0.9 changelog

Version 0.9

New features :

  • Added electric wires letting you connect electric components
  • Added logic gates for more advanced circuits with the wires
  • Added a pressure block, a source of electricity which activates when pressed
  • Added a toggle block which can be toggled on and off with current (T flip flop)
  • Added the metal gate, a dangerous retracting gate with a spike tip
  • Added extra mob eyes
  • Added the light bulb, a source of light powered by electricity
package net.jumpai.world.objects.background;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.glutils.FrameBuffer;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
@WinterAlexander
WinterAlexander / Constraint.m
Created May 1, 2020 21:56
PBD quick matlab simul
classdef (Abstract) Constraint
methods(Abstract)
particles = project(this, particles, iterations)
end
end
@WinterAlexander
WinterAlexander / c#_wall_of_hate
Last active December 3, 2021 03:58
C# Wall of Hate
- Tooltips on listview items are shown only for first column (details mode)
- Can't center text of first column in listview (but can set a 0-width column)
- Can only put checkboxes on first column of a details listview
- Any control with an integrated scrollbar don't let us control it manually without showing it (gotta user user32.dll to sync textboxes)
- StringBuilder is sealed for no reason not letting people creating SQLRequestBuilder or HTMLBuilder classes efficiently
- RichTextBox is slow and accepting RTF only, flickers even when rendering disabled
- Designer doesn't accept having an abstract direct super class (gotta make everything virtual OR make a stand-in class)
- Listview disables checkboxes automatically when multi selecting elements without any option to disable this
- You need user32.dll to change a progress bar state (green, yellow or red) yellow meaning paused and red meaning error
- A progress bar can't be filled without it's animation (need to change the value twice and