Skip to content

Instantly share code, notes, and snippets.

🎮
making

Érico Vieira Porto ericoporto

🎮
making
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
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
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)
{
sldZoomLevel.Value++;
}
@ericoporto
ericoporto / keepingForkUpToDate.md
Last active Feb 7, 2020 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date
View keepingForkUpToDate.md

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

1. Clone your fork:

git clone git@github.com: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 git@github.com:ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
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;
#endregion
@ericoporto
ericoporto / Game.agf
Last active Jan 24, 2020
Original Game.agf file that was converted to JSON -> (here https://gist.github.com/ericoporto/f1eaa944fa9df343c46966a370d07885 )
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="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 Jan 24, 2020
Game.agf from Adventure Game Studio as a JSON file (original in-> https://gist.github.com/ericoporto/89b28b2d0b32dc6ed6d0a9210e66a88f )
View Game.json
{
"AGSEditorDocument": {
"Version": "3.0.3.2",
"VersionIndex": 27,
"EditorVersion": "3.5.0.23",
"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.