Skip to content

Instantly share code, notes, and snippets.

View ericoporto's full-sized avatar
🎮
making

Érico Porto ericoporto

🎮
making
View GitHub Profile
Line numbers Dialog Editor
https://www.adventuregamestudio.co.uk/forums/index.php?topic=57355.0
Import/Export Views
https://www.adventuregamestudio.co.uk/forums/index.php?topic=56882.0
Debug variables
https://www.adventuregamestudio.co.uk/forums/index.php?topic=54347.0
Named loops
private void RoomSettingsEditor_MouseWheel(object sender, MouseEventArgs e)
{
int movement = e.Delta;
int previousZoomLevel = sldZoomLevel.Value;
if (movement > 0)
{
if (sldZoomLevel.Value < sldZoomLevel.Maximum)
{
sldZoomLevel.Value++;
}
@ericoporto
ericoporto / keepingForkUpToDate.md
Last active February 7, 2020 21:06 — 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 [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

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

cd into/cloned/fork-repo

git remote add upstream [email protected]:ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git

AgsGet may create the following files in your game directory.
```
├── ags_packages_cache/
│ ├── package_index
│ ├── pkg1/
│ │ └── pkg1.scm
│ └── pkg2/
│ └── pkg2.scm
│ ...
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;
}
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;
#endregion
@ericoporto
ericoporto / Game.agf
Last active January 24, 2020 00:16
Original Game.agf file that was converted to JSON -> (here https://gist.github.com/ericoporto/f1eaa944fa9df343c46966a370d07885 )
<?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="3.0.3.2" VersionIndex="27" EditorVersion="3.5.0.23">
<Game>
<Settings>
<GameFileName>agsbox2d_demo</GameFileName>
<GameName>agsbox2d_demo</GameName>
<UniqueID>1110441390</UniqueID>
<GUIDAsString>{a96aba74-c031-4575-801b-2d00ea6ad95c}</GUIDAsString>
<ColorDepth>TrueColor</ColorDepth>
@ericoporto
ericoporto / Game.json
Last active January 24, 2020 00:15
Game.agf from Adventure Game Studio as a JSON file (original in-> https://gist.github.com/ericoporto/89b28b2d0b32dc6ed6d0a9210e66a88f )
{
"AGSEditorDocument": {
"Version": "3.0.3.2",
"VersionIndex": 27,
"EditorVersion": "3.5.0.23",
"Game": {
"Settings": {
"GameFileName": "agsbox2d_demo",
"GameName": "agsbox2d_demo",
"UniqueID": 1110441390,
@ericoporto
ericoporto / Links.md
Created January 22, 2020 23:23
A collection of mostly development related blog post links
if a file on Windows has the words install, setup, patch or update; windows will require admin privileges to run the file.