Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
04ad753
main: add emscripten caching to unit test workflow
Moros1138 Jun 9, 2025
39592b5
main: update changelog
Moros1138 Jun 9, 2025
5ef3cba
main: add sudo to tar command that saves the emsdk cache
Moros1138 Jun 9, 2025
6063f4d
libraries: add entt.hpp
Moros1138 Jun 9, 2025
863f0d7
main: fix broken stop sign image on shares
Moros1138 Jun 9, 2025
b4ce6fb
main,libraries,language-server: add entt 3.15.0
Moros1138 Jun 10, 2025
bd9eeb7
main,libraries,language-server: add olcPGEX_DearImGui v4.0
Moros1138 Jun 10, 2025
46eeef2
libraries: fix makefile for olcPGEX_Gamepad, had wrong phony name.
Moros1138 Jun 10, 2025
1547e2b
main: update changelog
Moros1138 Jun 10, 2025
d9a24b9
libraries: remove imgui_impl_pge.a
Moros1138 Jun 10, 2025
8013911
libraries: update ignored files
Moros1138 Jun 10, 2025
8fbfdfd
libraries: dear imgui demo appears at 10,10
Moros1138 Jun 10, 2025
0dfffb3
main: update changelog
Moros1138 Jun 10, 2025
fd9deb3
examples: add dear imgui example
Moros1138 Jun 10, 2025
9b29436
main: update changelog
Moros1138 Jun 10, 2025
d3fbff3
Merge branch 'main' into develop
Moros1138 Jun 12, 2025
5102b20
libraries: make raylib ShowCursor/HideCursor work way way it does on …
Moros1138 Jun 13, 2025
c45c419
main: fix bug where javid mode errors still appear in the editor
Moros1138 Jun 16, 2025
480fe1b
main: fix vulnerabilities with npm audit fix
Moros1138 Jun 17, 2025
b6ce61f
main: add code max size with a new max size of 128k
Moros1138 Jul 3, 2025
5da4016
main: add __PGETINKER__ macro definition to buid command
Moros1138 Jul 3, 2025
866372d
language server: add __PGETINKER__ macro definition to compile_commands
Moros1138 Jul 3, 2025
6844d47
main: update changelog
Moros1138 Jul 3, 2025
909a3ee
github: remove emsdk cache
Moros1138 Jul 3, 2025
4b397fb
github: make use of new caching scripts
Moros1138 Jul 4, 2025
65f9039
github: fix typo, Load should be Save
Moros1138 Jul 4, 2025
93ce834
github: add caching of vender/node_modules to tests
Moros1138 Jul 5, 2025
bfa74f5
github: remove vendor caching of vender/node_modules, doesn't work as…
Moros1138 Jul 5, 2025
8dd3970
main: update changelog
Moros1138 Jul 5, 2025
42ec47e
examples: use __PGETINKER__ in SDL2 classic example
Moros1138 Jul 8, 2025
05f0c51
examples: use __PGETINKER__ in raylib classic example
Moros1138 Jul 8, 2025
be52e57
examples: use __PGETINKER__ in PGE classic example
Moros1138 Jul 8, 2025
c70087f
main: update changelog
Moros1138 Jul 8, 2025
e1831b6
main: update changelog
Moros1138 Jul 8, 2025
0e6e661
examples: add pge entt bouncing balls example
Moros1138 Aug 5, 2025
d958555
examples: add pge bare example
Moros1138 Aug 5, 2025
e580af8
examples: add raylib bare example, add raylib entt example
Moros1138 Aug 5, 2025
2eb8eaf
main: update changelog
Moros1138 Aug 5, 2025
eb74b82
pgetinker: clear language server workspaces on update
Moros1138 Aug 5, 2025
b90bbac
main: update changelog
Moros1138 Aug 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

CODE_MAX_SIZE=131071

COMPILER_CACHING=true
COMPILER_ENVIRONMENT=nsjail
COMPILER_TIMEOUT=10
Expand Down Expand Up @@ -56,6 +58,7 @@ REDIS_PORT=6379
REDIS_TTL=43200

VITE_APP_NAME="${APP_NAME}"
VITE_CODE_MAX_SIZE="${CODE_MAX_SIZE}"

# PATREON_ACCESS_TOKEN=
# PATREON_WEBHOOK_SECRET=
Expand Down
3 changes: 3 additions & 0 deletions .env.sail
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

CODE_MAX_SIZE=131071

COMPILER_CACHING=true
COMPILER_ENVIRONMENT=nsjail
COMPILER_TIMEOUT=10
Expand Down Expand Up @@ -73,6 +75,7 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"
VITE_CODE_MAX_SIZE="${CODE_MAX_SIZE}"

SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://meilisearch:7700
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Load Docker Cache
run: |
sudo systemctl stop docker.socket
sudo systemctl stop docker
sudo cache-load docker-cache /var/lib
sudo systemctl start docker

- name: Load Emscripten Cache
run: cache-load emsdk-cache ./shared

- name: Initialize PGEtinker
run: ./scripts/pgetinker initialize ci

Expand All @@ -34,3 +44,13 @@ jobs:

- name: Stop PGEtinker
run: ./scripts/pgetinker down

- name: Save Emscripten Cache
run: cache-save ./shared/emsdk emsdk-cache

- name: Save Docker Cache
run: |
sudo systemctl stop docker.socket
sudo systemctl stop docker
sudo cache-save /var/lib/docker docker-cache
sudo systemctl start docker
80 changes: 79 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,84 @@ Each release has notes that would be pertinent to the end user of the PGEtinker
website. For a comprehensive understanding of the evolution of the project,
please refer to the repository's commit history.

# <u>Release Notes - 2025-08-05</u>

## Notes

Add [entt v3.15.0](https://github.com/skypjack/entt).

Add [olcPGEDearImGui v4.0](https://github.com/dandistine/olcPGEDearImGui)

Add ``__PGETINKER__`` macro. A simple mechanism for determining if the code
is being compiled with PGEtinker. Useful for local developers seeking
to port their code to PGEtinker.

Change the maximum code size from 50k to 128k

## Commits

### 2025-08-05

- pgetinker: clear language server workspaces on update
- examples: add raylib bare example, add raylib entt example
- examples: add pge bare example
- examples: add pge entt bouncing balls example

### 2025-07-08

- examples: use ``__PGETINKER__`` in PGE classic example
- examples: use ``__PGETINKER__`` in raylib classic example
- examples: use ``__PGETINKER__`` in SDL2 classic example

### 2025-07-05

- github: remove vendor caching of vender/node_modules, doesn't work as expected.
- github: add caching of vender/node_modules to tests

### 2025-07-04

- github: fix typo, Load should be Save
- github: make use of new caching scripts

### 2025-07-03

- github: remove emsdk cache

### 2025-07-02

- language server: add ``__PGETINKER__`` macro definition to compile_commands
- main: add ``__PGETINKER__`` macro definition to buid command
- main: add code max size with a new max size of 128k

### 2025-06-17

- main: fix vulnerabilities with npm audit fix

### 2025-06-16

- main: fix bug where javid mode errors still appear in the editor

### 2025-06-13

- libraries: make raylib ShowCursor/HideCursor work way way it does on windows

### 2025-06-10

- examples: add dear imgui example
- libraries: dear imgui demo appears at 10,10
- libraries: update ignored files
- libraries: remove imgui_impl_pge.a
- libraries: fix makefile for olcPGEX_Gamepad, had wrong phony name.
- main,libraries,language-server: add olcPGEX_DearImGui v4.0
- main,libraries,language-server: add entt 3.15.0

### 2025-06-09

- main: fix broken stop sign image on shares
- libraries: add entt.hpp
- main: add sudo to tar command that saves the emsdk cache
- main: add emscripten caching to unit test workflow

# <u>Release Notes - 2025-06-09</u>

## Notes
Expand Down Expand Up @@ -159,7 +237,7 @@ Hide interactive UI while loading to fixed [issue #158](https://github.com/PGEti

- main: add skeleton for the examples dialog
- main: add skeleton for the examples dialog
- main: use __EMSCRIPTEN__ instead of PLATFORM_WEB
- main: use ``__EMSCRIPTEN__`` instead of PLATFORM_WEB
- main: add allow-pointer-lock to support DisableCursor() in raylib
- main: flesh out the raylib classic example
- main: emscripten shell uses blank background color instead of black for canvas
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/CodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ function compileCode($code, $libraries)
"message" => "missing required parameters",
];
}

if(strlen($code) > 50000)
if(strlen($code) > config('app.code_max_size'))
{
Log::debug("Compile: code exceeds maximum limit");
return [
Expand Down
3 changes: 2 additions & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],


'code_max_size' => env('CODE_MAX_SIZE', 131071),
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('codes', function (Blueprint $table) {
//
$table->mediumText('code')->change();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('codes', function (Blueprint $table) {
$table->text('code')->change();
});
}
};
41 changes: 38 additions & 3 deletions examples/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,55 @@
"library": "pge",
"codeFile": "/examples/files/pgetinker-pge-classic-example.cpp",
"screenshot": "/examples/files/pgetinker-pge-classic-example.png",
"keywords": "BLACK Clear Construct Draw DrawRect DrawSprite DrawString DrawStringDropShadow FillCircle GetMouse GetMousePos Load OnUserCreate OnUserUpdate PGEtinkerClassicExample Pixel PixelGameEngine RED RandomColor Renderable ScreenHeight ScreenWidth Sprite Start WHITE YELLOW bPressed backgroundColor bool color cout example fElapsedTime foregroundColor image main olc override pgetinker_file_resolve rand sAppName std str string text x y"
"keywords": "BLACK Clear Construct Draw DrawRect DrawSprite DrawString DrawStringDropShadow FillCircle GetMouse GetMousePos Load OnUserCreate OnUserUpdate PGEtinkerClassicExample Pixel PixelGameEngine RED RandomColor Renderable ScreenHeight ScreenWidth Sprite Start WHITE YELLOW bPressed backgroundColor bool color cout example fElapsedTime foregroundColor image main mountPath olc override pgetinker_file_resolve rand sAppName std str string text url x y"
},
{
"name": "PGEtinker Bare Example",
"library": "pge",
"codeFile": "/examples/files/pgetinker-pge-bare-example.cpp",
"screenshot": "/examples/files/pgetinker-pge-bare-example.png",
"keywords": "BLACK Clear Construct DrawString GetScreenSize GetTextSize OnUserCreate OnUserUpdate PGEtinkerBareExample PixelGameEngine Start WHITE bool demo fElapsedTime main mountPath olc override pgetinker_file_resolve sAppName url vi2d"
},
{
"name": "Dear Imgui Example",
"library": "pge",
"codeFile": "/examples/files/pgetinker-pge-dear-imgui-example.cpp",
"screenshot": "/examples/files/pgetinker-pge-dear-imgui-example.png",
"keywords": "Clear Construct CreateLayer DrawRect EnableLayer ImGui OnUserCreate OnUserUpdate PGE_ImGUI PGEtinkerDearImguiExample Pixel PixelGameEngine ScreenHeight ScreenWidth SetDrawTarget ShowDemoWindow Start YELLOW bool demo fElapsedTime gameLayer imgui main olc override pge_imgui sAppName"
},
{
"name": "EnTT Bouncing Balls Example",
"library": "pge",
"codeFile": "/examples/files/pgetinker-pge-entt-bouncing-balls-example.cpp",
"screenshot": "/examples/files/pgetinker-pge-entt-bouncing-balls-example.png",
"keywords": "BLACK Ball BouncingBalls Clear Color Construct FillCircle InitializeBalls OnUserCreate OnUserUpdate Pixel PixelGameEngine Position RenderBalls ScreenHeight ScreenWidth Start UpdatePhysics Velocity b1 b2 ball bool clamp collisions color constexpr create dist distance dot dvx dvy dx dy e1 e2 each emplace emplace_back entity entt fElapsedTime game get i impulse int32_t main mass maxRadius maxSpeed minRadius mt19937 numBalls nx ny olc overlap override p1 p2 pair pos posX posY r radius random_device registry rng sAppName sqrt std uniform_int_distribution uniform_real_distribution v1 v2 vector vel view x y"
},
{
"name": "EnTT Bouncing Balls Example",
"library": "raylib",
"codeFile": "/examples/files/pgetinker-raylib-entt-bouncing-balls-example.cpp",
"screenshot": "/examples/files/pgetinker-raylib-entt-bouncing-balls-example.png",
"keywords": "BLACK Ball BeginDrawing ClearBackground CloseWindow Color DrawCircle EndDrawing EntityColor GetFrameTime InitWindow InitializeBalls Position RenderBalls SetTargetFPS UpdatePhysics Velocity WindowShouldClose a b b1 b2 ball clamp collisions color colorChannel constexpr create dist distance dot dvx dvy dx dy e1 e2 each emplace emplace_back emscripten_set_main_loop entity entt fElapsedTime g get i impulse int32_t main mass maxRadius maxSpeed minRadius mountPath mt19937 numBalls nx ny overlap p1 p2 pair pgetinker_file_resolve pos posX posY r radius random_device registry rng screenHeight screenWidth sqrt std uniform_int_distribution uniform_real_distribution update url v1 v2 vector vel view x y"
},
{
"name": "PGEtinker Classic Example",
"library": "raylib",
"codeFile": "/examples/files/pgetinker-raylib-classic-example.cpp",
"screenshot": "/examples/files/pgetinker-raylib-classic-example.png",
"keywords": "BLACK BeginDrawing ClearBackground CloseWindow Color DrawCircle DrawPixel DrawRectangle DrawRectangleLinesEx DrawText DrawTextDropShadow DrawTexture EndDrawing GetMousePosition GetRandomColor InitWindow IsMouseButtonPressed LoadTexture RED SetTargetFPS TextFormat Texture2D UnloadTexture Vector2 WHITE WindowShouldClose YELLOW background cout emscripten_set_main_loop fontSize foreground imageFromURL main mousePosition pgetinker_file_resolve rand screenHeight screenWidth static_cast std text update x y"
"keywords": "BLACK BeginDrawing ClearBackground CloseWindow Color DrawCircle DrawPixel DrawRectangle DrawRectangleLinesEx DrawText DrawTextDropShadow DrawTexture EndDrawing GetMousePosition GetRandomColor InitWindow IsMouseButtonPressed LoadTexture RED SetTargetFPS TextFormat Texture2D UnloadTexture Vector2 WHITE WindowShouldClose YELLOW background cout emscripten_set_main_loop fontSize foreground imageFromURL main mountPath mousePosition pgetinker_file_resolve rand screenHeight screenWidth static_cast std text update url x y"
},
{
"name": "PGEtinker Bare Example",
"library": "raylib",
"codeFile": "/examples/files/pgetinker-raylib-bare-example.cpp",
"screenshot": "/examples/files/pgetinker-raylib-bare-example.png",
"keywords": "BLACK BeginDrawing ClearBackground CloseWindow DrawText EndDrawing InitWindow MeasureText SetTargetFPS WHITE WindowShouldClose emscripten_set_main_loop fontSize main mountPath pgetinker_file_resolve screenHeight screenWidth update url"
},
{
"name": "PGEtinker Classic Example",
"library": "sdl2",
"codeFile": "/examples/files/pgetinker-sdl2-classic-example.cpp",
"screenshot": "/examples/files/pgetinker-sdl2-classic-example.png",
"keywords": "ApplicationState Color DrawStringDropShadow FillCircle GetRandomColor IMG_GetError IMG_INIT_PNG IMG_Init IMG_Load IMG_Quit LoadFromFile NOT_READY READY SDL_BUTTON SDL_BUTTON_LEFT SDL_Color SDL_CreateRenderer SDL_CreateTextureFromSurface SDL_CreateWindow SDL_DestroyRenderer SDL_DestroyTexture SDL_DestroyWindow SDL_Event SDL_FreeSurface SDL_GetError SDL_GetMouseState SDL_INIT_VIDEO SDL_Init SDL_PollEvent SDL_QUIT SDL_Quit SDL_RENDERER_ACCELERATED SDL_Rect SDL_RenderClear SDL_RenderCopy SDL_RenderDrawPoint SDL_RenderDrawRect SDL_RenderFillRect SDL_RenderPresent SDL_Renderer SDL_SetRenderDrawColor SDL_Surface SDL_Texture SDL_WINDOWPOS_CENTERED SDL_Window SURFACE_FAIL Sprite Status TEXTURE_FAIL TTF_CloseFont TTF_Font TTF_GetError TTF_Init TTF_OpenFont TTF_Quit TTF_RenderText_Blended_Wrapped TTF_RenderText_Solid_Wrapped Uint32 Uint8 a a_ app b b_ backgroundColor bg bg_rect bg_surface bg_texture bool border c_str cerr color cout currentLeftMouse cx cy emscripten_set_main_loop endl event fg fg_rect fg_surface fg_texture font g g_ getError h height image_rect main mouse_state mouse_x mouse_y operator path pgetinker_file_resolve prevLeftMouse r r_ radius rand renderer retval running screenHeight screenScale screenWidth sdl_bg sdl_fg sprite status std string surface text texture to_string type update w width window x y"
"keywords": "ApplicationState Color DrawStringDropShadow FillCircle GetRandomColor IMG_GetError IMG_INIT_PNG IMG_Init IMG_Load IMG_Quit LoadFromFile NOT_READY READY SDL_BUTTON SDL_BUTTON_LEFT SDL_Color SDL_CreateRenderer SDL_CreateTextureFromSurface SDL_CreateWindow SDL_DestroyRenderer SDL_DestroyTexture SDL_DestroyWindow SDL_Event SDL_FreeSurface SDL_GetError SDL_GetMouseState SDL_INIT_VIDEO SDL_Init SDL_PollEvent SDL_QUIT SDL_Quit SDL_RENDERER_ACCELERATED SDL_Rect SDL_RenderClear SDL_RenderCopy SDL_RenderDrawPoint SDL_RenderDrawRect SDL_RenderFillRect SDL_RenderPresent SDL_Renderer SDL_SetRenderDrawColor SDL_Surface SDL_Texture SDL_WINDOWPOS_CENTERED SDL_Window SURFACE_FAIL Sprite Status TEXTURE_FAIL TTF_CloseFont TTF_Font TTF_GetError TTF_Init TTF_OpenFont TTF_Quit TTF_RenderText_Blended_Wrapped TTF_RenderText_Solid_Wrapped Uint32 Uint8 a a_ app b b_ backgroundColor bg bg_rect bg_surface bg_texture bool border c_str cerr color cout currentLeftMouse cx cy emscripten_set_main_loop endl event fg fg_rect fg_surface fg_texture font g g_ getError h height image_rect main mountPath mouse_state mouse_x mouse_y operator path pgetinker_file_resolve prevLeftMouse r r_ radius rand renderer retval running screenHeight screenScale screenWidth sdl_bg sdl_fg sprite status std string surface text texture to_string type update url w width window x y"
}
]
79 changes: 79 additions & 0 deletions examples/files/pgetinker-pge-bare-example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*******************************************************************************************
*
* olcPixelGameEngine example - PGEtinker Bare Example
*
********************************************************************************************
*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
* software to the public domain. We make this dedication for the benefit
* of the public at large and to the detriment of our heirs and
* successors. We intend this dedication to be an overt act of
* relinquishment in perpetuity of all present and future rights to this
* software under copyright law.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* For more information, please refer to <https://unlicense.org>
*
********************************************************************************************/
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"

#if defined(__PGETINKER__)
#include "pgetinker.h"
#else
static inline void pgetinker_file_resolve(const char* url, const char* mountPath) {}
#endif

// Override base class with your custom functionality
class PGEtinkerBareExample : public olc::PixelGameEngine
{
public:
PGEtinkerBareExample()
{
// Name your application
sAppName = "PGEtinker Bare PGE Example";
}

public:
bool OnUserCreate() override
{
// Called once at the start, so create things here
return true;
}

bool OnUserUpdate(float fElapsedTime) override
{
// Called once per frame, handle input and draw things here
Clear(olc::BLACK);
DrawString(
olc::vi2d{GetScreenSize() / 2} - olc::vi2d{GetTextSize("Bare Example") / 2},
"Bare Example",
olc::WHITE
);

return true;
}
};

int main()
{
PGEtinkerBareExample demo;
if (demo.Construct(256, 240, 2, 2))
demo.Start();
return 0;
}
Binary file added examples/files/pgetinker-pge-bare-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions examples/files/pgetinker-pge-classic-example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
********************************************************************************************/
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"

#if defined(__PGETINKER__)
#include "pgetinker.h"
#else
static inline void pgetinker_file_resolve(const char* url, const char* mountPath) {}
#endif

class PGEtinkerClassicExample : public olc::PixelGameEngine
{
Expand Down
Loading