Skip to content

Instantly share code, notes, and snippets.


Érico Vieira Porto ericoporto

Block or report user

Report or block ericoporto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8cacc3c7c8b118f7fd6db4f8d3d810b4
Line numbers Dialog Editor
Import/Export Views
Debug variables
Named loops
View notworking.cs
private void RoomSettingsEditor_MouseWheel(object sender, MouseEventArgs e)
int movement = e.Delta;
int previousZoomLevel = sldZoomLevel.Value;
if (movement > 0)
if (sldZoomLevel.Value < sldZoomLevel.Maximum)
ericoporto /
Last active Feb 7, 2020 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

Note: I use ssh keys with git instead of https.

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream
View gist:7a98652f086efa7e6ae5705674c5483c
AgsGet may create the following files in your game directory.
├── ags_packages_cache/
│ ├── package_index
│ ├── pkg1/
│ │ └── pkg1.scm
│ └── pkg2/
│ └── pkg2.scm
│ ...
View topological_sort.cs
public static IEnumerable<T> TSort<T>( this IEnumerable<T> source, Func<T, IEnumerable<T>> dependencies, bool throwOnCycle = false )
var sorted = new List<T>();
var visited = new HashSet<T>();
foreach( var item in source )
Visit( item, visited, sorted, dependencies, throwOnCycle );
return sorted;
View topological.cs
class TopologicalSorter
#region - Private Members -
private readonly int[] _vertices; // list of vertices
private readonly int[,] _matrix; // adjacency matrix
private int _numVerts; // current number of vertices
private readonly int[] _sortedArray;
ericoporto / Game.agf
Last active Jan 24, 2020
Original Game.agf file that was converted to JSON -> (here )
View Game.agf
<?xml version="1.0" encoding="Windows-1252"?>
<!--DO NOT EDIT THIS FILE. It is automatically generated by the AGS Editor, changing it manually could break your game-->
<AGSEditorDocument Version="" VersionIndex="27" EditorVersion="">
ericoporto / Game.json
Last active Jan 24, 2020
Game.agf from Adventure Game Studio as a JSON file (original in-> )
View Game.json
"AGSEditorDocument": {
"Version": "",
"VersionIndex": 27,
"EditorVersion": "",
"Game": {
"Settings": {
"GameFileName": "agsbox2d_demo",
"GameName": "agsbox2d_demo",
"UniqueID": 1110441390,
View gist:8fd1c01473ee2c4a08896cf4d85c1944
if a file on Windows has the words install, setup, patch or update; windows will require admin privileges to run the file.
You can’t perform that action at this time.