Skip to content

Instantly share code, notes, and snippets.

View ericoporto's full-sized avatar
🎮
making

Érico Porto ericoporto

🎮
making
View GitHub Profile
@ericoporto
ericoporto / Preferences.cs
Created January 9, 2022 13:35
Preferences.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGS.Types
{
[Flags]
limit of 1000000 dynamic array elements (now supports over 2 billion) | 3.5.1
Removed fonts count limit | 3.5.0
imported sprites count limit to 90000 and removed total sprite count limit | 3.5.0
Removed length limit on the Button and TextBox text (was 50 and 200 respectively) | 3.5.0
Removed limit on ListBox item count (was 200). | 3.5.0
Removed limits on built-in text wrapping (was 50 lines of 200 chars max each). | 3.5.0
Removed 200 chars limit for DoOnceOnly token length. | 3.5.0
Removed limit on maximal number of asset files in a game package. | 3.4.1-p2
Removed limit on Dialog Topics (was 500 topics per game). | 3.4.1

AGS Engine Plugins

(Latest revision 4 Oct 2009)

AGS supports a plugin interface, whereby you can write your own add-ons if AGS doesn't support all the features you need.

AGS supports two different types of plugins - plain API plugins, for writing plugins that add extra functionality to games and need to be included with the games at runtime; and .NET plugins, for enhancing the editor. Editor .NET plugins are explained on this separate page; here we will continue talking about the plain API.

First, a few important notes about the plugin API. It's essential that you read these before even considering writing a plugin.

Quick source code introduction

This text should briefly introduce you to where are some things in the AGS codebase. It doesn't aim at being complete, but mainly informative to help get familiar with the location of some things. Please make sure you have read the README and used the Engine and Editor to get familiar with some concepts.

The AGS engine is written in C++ and uses C and C++ libraries. The AGS Editor is written in C#, with few parts in C++ in the Native library.

Directories quick look

main components

  • Common: has components that are shared between native parts of the Editor and the Engine, and are expected to be available to the command line Tools.
@ericoporto
ericoporto / html
Created June 9, 2021 01:17
how to change the address bar color on mobile dynamically
<meta name="theme-color" content="#000000" />
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff');
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#000000');
# base will already have Chocolatey installed
FROM cirrusci/windowsservercore:2019
# if no temp folder exists by default, create it
RUN IF exist %TEMP%\nul ( echo %TEMP% ) ELSE ( mkdir %TEMP% )
RUN pushd %TEMP% && \
mkdir buildtools && \
curl -fLO https://archive.org/download/visualbuildtools2015/visualbuildtools2015.zip && \
tar -f visualbuildtools2015.zip -xvzC buildtools\ --strip-components 1 && \
[0B74:093C][2021-05-07T20:33:53]i001: Burn v3.7.4906.0, Windows v10.0 (Build 17763: Service Pack 0), path: C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey\visualcpp-build-tools\14.0.25420.1\visualcppbuildtools_full.exe, cmdline: '-NoRestart -Quiet -Log "C:\Users\ContainerAdministrator\AppDa
ta\Local\Temp\chocolatey\visualcpp-build-tools.log" -burn.unelevated BurnPipe.{54A48F98-D38A-44A4-82AE-C06587ED8210} {6191B86F-FE76-40A8-96EC-28A6F49755DB} 2304'
[0B74:093C][2021-05-07T20:33:53]i000: Initializing string variable 'EditionDisplayName' to value 'Microsoft Visual C++ Build Tools'
[0B74:093C][2021-05-07T20:33:53]i000: Initializing string variable 'SkuSpecificHKLMHive' to value 'Software\Microsoft\VisualStudio\14.0'
[0B74:093C][2021-05-07T20:33:53]i000: Initializing numeric variable 'RebootRequested' to value '0'
[0B74:093C][2021-05-07T20:33:53]i000: Initializing numeric variable 'ExecuteSecondaryInstaller' to value '0'
[0B74:093C][2021-05-07T20:33:53]i000: Initializing string variable 'BundleProg
// I can't figure any good way that makes the sprite be properly positioned in place, so I am making a bad way.
// first thing, we are going to find the distance that the sprite is from the camera plane.
// this will give us a z distance
// Then we are going to use this z distance in the renderer algorithm we have for the voxel engine
// which should make it easier to find the point we are interested, in a way that moves just like the renderer we have
// this is wasteful, but we are probably not going to have many sprites anyway...
ScreenPoint* PositionBillboardX(Vec3* cam_pos, float cam_angle, float horizon, float scale_height, Vec3* obj_pos)
{
int y_on_screen, x_on_screen; // intermediary
local markov = {}
markov.__index = markov
markov.random = math.random
local final = {}
local function increment_item_count(t, item)
local val = t[item]
t[item] = val and val + 1 or 1
@ericoporto
ericoporto / Question.md
Created January 30, 2021 11:29
HTML Help Workshop is not available anymore, can I host it?

Apparently Microsoft just dropped the website that had HTML Help Workshop for download. But it is the only tool that fully properly generates .chm help files and I need it in one of my workflows in a CI system - right now things started to fail because the download vanished.

License wise, would I be violating anything if instead of downloading from Microsoft I downloaded from my own file host to run it? My file host would be exposed in the internet and I would not block people downloading it outside of my CI system if they wanted.


For reference, Microsoft's website download for HTML Help Workshop used to be here: https://www.microsoft.com/en-us/download/details.aspx?id=21138&ved=2ahUKEwi0_bGLxr_uAhWFB9QKHcUdCxIQFjAUegQIURAB&usg=AOvVaw1_oaw66rS-7sanf8ov-cbb

Other related websites, but the downloads are 404 now: