Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
making

Érico Vieira Porto ericoporto

🎮
making
View GitHub Profile
View rellax.asc
// Rellax
// 0.1.5~
// A module to provide smooth scrolling and parallax!
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Before starting, you must create the following Custom Properties
// in AGS Editor, for usage with Objects.
// Just click on Properties [...] and on the Edit Custom Properties screen,
// click on Edit Schema ... button, and add the two properties below:
//
// PxPos:
@ericoporto
ericoporto / theoricalproblem.md
Last active Jul 18, 2020
Theoretical problem
View theoricalproblem.md

When resolving script imports, the code doesn't deals with empty string imports, and relies on nullptr :

https://github.com/adventuregamestudio/ags/blob/c52217180969576717173777d8ac195dd4347047/Engine/script/cc_instance.cpp#L1591

This works because when reading script objects, empty strings (a single \0 character) are replaced by a nullptr :

https://github.com/adventuregamestudio/ags/blob/c52217180969576717173777d8ac195dd4347047/Common/script/cc_script.cpp#L39

But when writing a script object, we don't treat the nullptr case, so if you read a script object, and want to write it back to a file, this will break here :

@ericoporto
ericoporto / remember.txt
Created Jul 15, 2020
need to add a install target to ags executable cmakelists.txt
View remember.txt
add_executable(ags)
if(NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
install(TARGETS ags
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
)
endif()
@ericoporto
ericoporto / extract-subtitles.sh
Last active Jul 27, 2020
bash script to extract all subtitles from mp4 files and remove html tags
View extract-subtitles.sh
#!/bin/bash
for file in *.mp4;
do
filename=$(basename -s .mp4 "$file")
ffmpeg -i "${filename}.mp4" "${filename}.srt"
done
sed -i 's/<[^>]*>//g' *.srt
@ericoporto
ericoporto / README.md
Last active Jul 3, 2020
Building an AGS game
View README.md

Building an AGS game

Ideally, while the project files holds the game information in the form that is the most convenient by the Editor used by the game developer, the game data represents this information in the most convenient form for the Engine.

Building a game is to transform information that describes the game to the form convenient for the Engine. This document describes how a platform agnostic AGS game is built.

@ericoporto
ericoporto / 3.5.0.24.yaml
Last active Jul 1, 2020
Adventure Game Studio WinGet Template, more information here: https://docs.microsoft.com/en-us/windows/package-manager/
View 3.5.0.24.yaml
Id: ags.ags
Publisher: Adventure Game Studio
Name: Adventure Game Studio
Version: 3.5.0.24
AppMoniker: ags
MinOSVersion: 10.0.0.0
Description: The Adventure Game Studio IDE
Homepage: https://www.adventuregamestudio.co.uk
License: Copyright (c) Chris Jones et al. Artistic License 2.0.
LicenseUrl: https://raw.githubusercontent.com/adventuregamestudio/ags/master/License.txt
@ericoporto
ericoporto / making_language_grammar.md
Created Jun 26, 2020 — forked from Aerijo/making_language_grammar.md
Guide to writing an Atom language grammar
View making_language_grammar.md

A guide to writing a language grammar (TextMate) in Atom

Tree sitter

  • Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help:

@ericoporto
ericoporto / README.BBCode
Last active Jun 24, 2020
eri0o's Adventure Game Studio Repositories (BBCode Edition)!
View README.BBCode
[size=16pt][b] eri0o's Adventure Game Studio Repositories! [/b][/size]
Using AGS for some time now, here's a list of things I made!
[size=12pt][b] Script Modules [/b][/size]
[list][li][b][url=https://github.com/ericoporto/math3d]math3d[/url][/b] | [u][url=https://github.com/ericoporto/math3d/releases][tt]Downloads ⇩[/tt][/url][/u][/li][list]
[li]A script module for 3D math on Adventure Game Studio.[/li]
[/list][/list]
[list][li][b][url=https://github.com/ericoporto/rellax]rellax[/url][/b] | [u][url=https://github.com/ericoporto/rellax/releases][tt]Downloads ⇩[/tt][/url][/u][/li][list]
@ericoporto
ericoporto / README.md
Last active Jun 24, 2020
eri0o's Adventure Game Studio Repositories!
View README.md

eri0o's Adventure Game Studio Repositories!

Using AGS for some time now, here's a list of things I made!

Script Modules

@ericoporto
ericoporto / FetchAllegro.cmake
Created Jun 22, 2020
rewritten FetchAllegro.cmake for testing, place in CMake/FetchAllegro.cmake
View FetchAllegro.cmake
FetchContent_Declare(
allegro_content
GIT_REPOSITORY https://github.com/ericoporto/lib-allegro.git
GIT_TAG bce34ee5222e14e8ab199f693163195ed9800c71
GIT_SHALLOW yes
)
FetchContent_GetProperties(allegro_content)
if(NOT allegro_content_POPULATED)
FetchContent_Populate(allegro_content)
You can’t perform that action at this time.