Skip to content

Instantly share code, notes, and snippets.

View gnysek's full-sized avatar
💭
Kuwabara! Kuwabara!

gnysek gnysek

💭
Kuwabara! Kuwabara!
View GitHub Profile
///draw_text_colour_outline(x, y, string, textColor1, textColor2, textAlpha, outlineColor1, outlineColor2, outlineAlpha, outlineThickness, outlineQuality, xscale, yscale, angle);
//By Blokatt - @blokatt, blokatt.net
var i;
for (i = 0; i < 360; i += 360 / argument10){
draw_text_transformed_color(argument0 + lengthdir_x(argument9, i), argument1 + lengthdir_y(argument9, i), string(argument2), argument11, argument12, argument13, argument6, argument6, argument7, argument7, argument8);
}
draw_text_transformed_color(argument0, argument1, string(argument2), argument11, argument12, argument13, argument3, argument3, argument4, argument4, argument5);
@gnysek
gnysek / async_const.gml
Created July 2, 2020 14:58
Async constants
#macro async_audio_playback_queue_id "queue_id"
#macro async_audio_playback_buffer_id "buffer_id"
#macro async_audio_playback_queque "queue_shutdown"
#macro async_audio_recording_buffer_id "buffer_id"
#macro async_audio_recording_channel_index "channel_index"
#macro async_audio_recording_data_len "data_len"
#macro async_cloud_status "status"
#macro async_cloud_id "id"
@gnysek
gnysek / gms_consideration.txt
Created January 28, 2021 13:30
GMS2 Future Feature Considerations
Planned Features
This page is now outdated and does not accurately represent the planned future for GameMaker - please see our Official Road Map for up to date details.
The list below represents some features that have been considered for GameMaker, this is not necessarily the order they will be developed or released in and inclusion on this list does not guarantee they will be added. Other items may well be released directly without ever appearing on this list.
While we will try and keep this list updated, items listed are also subject to change or removal without notice.
9-Slices
Adaptive Icons (Android)
Additional IDE Translations
@gnysek
gnysek / gms-wanna.md
Created August 20, 2021 09:27
GMS wanna have
  • sprites: as flash is dead, instead of SWF support we should get SVG import instead (even if that still means vertex models); mesh morhping (among with Spine support for it); sprite attach points
  • tilesets: 47 tiles generator of big tilesets from 9-tiles/5-tiles images
  • paths: bezier splines
  • new resource: polygon shapes definition for room editor to detect if we're inside/outside of it on runtime (for AI, defining areas, collisions maybe)
  • new resource: particles + editor
  • fonts: singed distances fonts, so we can scale them up with nearly no pixels visible on edges
  • rooms: ability to add text on layers; universal layer (so every type of resource can be placed there - that's possible at runtime already); ability to put "markers" on room, to mark/name places which x/y we want to access later at runtime so something might happen on them (teleports, npc waypoints, ai etc.); polygonal areas mentioned earlier
  • new resource: data sources, for csv, json, text files, which can be accessed at runntime, but are
@gnysek
gnysek / GMLive_2022.2.patch
Created February 24, 2022 23:15
GMLive 2022.2 quick fix
Index: scripts/GMLiveAPI/GMLiveAPI.gml
<+>UTF-8
===================================================================
diff --git a/scripts/GMLiveAPI/GMLiveAPI.gml b/scripts/GMLiveAPI/GMLiveAPI.gml
--- a/scripts/GMLiveAPI/GMLiveAPI.gml (revision 0593234536ade7fcf1f6797498f38bbb2aef4196)
+++ b/scripts/GMLiveAPI/GMLiveAPI.gml (date 1645744329255)
@@ -20,7 +20,7 @@
}
var l_jsFuncs=(l_isJS?live_preinit_js_funcs():undefined);
var l_jsIndex=0;
@gnysek
gnysek / d3d_model_cylinder.gml
Created April 11, 2022 16:37
d3d_model_cylinder.gml
/// @description Draws a simple 3D cylinder.
/// @param x1 The initial x coordinate of the cylinder.
/// @param y1 The initial y coordinate of the cylinder.
/// @param z1 The initial z coordinate of the cylinder.
/// @param x2 The opposite x coordinate of the cylinder.
/// @param y2 The opposite y coordinate of the cylinder.
/// @param z2 The opposite z coordinate of the cylinder.
/// @param tex The id of the texture to use (-1 for no texture)
/// @param hrepeat Amount of horizontal repetitions for the texture.
/// @param vrepeat Amount of vertical repetitions for the texture.
// Simple particle system with blowing wind effect
// Note that this is *not* supposed to be an even vaguely accurate simulation
// There are also still a lot of optimisations possible
function _effect_windblown_particles() constructor
{
param_num_particles = 100;
param_particle_spawn_time = 100; // measured in milliseconds
param_particle_spawn_all_at_start = 0;
param_warmup_frames = 0;
param_sprite = _effect_windblown_particles_leaf_sprite;
@gnysek
gnysek / debug.gml
Created October 12, 2022 12:35
gml debug stuff
{
release: GM_version, //Game version
app_build: GM_build_date,
config: os_get_config(),
paused: bool(os_is_paused()),
network_connected: bool(os_is_network_connected(false)),
language: os_get_language(),
region: os_get_region(),
runtime_version: GM_runtime_version,
app_start_time: date_current_datetime(),
@gnysek
gnysek / new_array_func_test.gml
Last active October 25, 2022 10:04
tests of new GM 2022.11 functions
function timer(_name = "") constructor {
name = string(_name);
time = get_timer();
static total = function() {
var ddelta = get_timer() - time;
var ss = string_format( ddelta/repeats, 1, 10);
show_debug_message(string((ddelta)/1000) + "ms - " + ss + " per iteration " + name);
}
}
@gnysek
gnysek / scr_mp_potential_step.gml
Created November 15, 2022 16:40
mp_potential_step but in pure GML
//
// based on https://github.com/YoYoGames/GameMaker-HTML5/blob/develop/scripts/functions/Function_MotionPlanning.js#L232
//
global.__mp_settings = {
maxrot: 30,
rotstep: 10,
ahead: 3,
onspot: true,
}