moros1138 / pgetinker Goto Github PK
View Code? Open in Web Editor NEWInteractively create an olcPixelGameEngine application from inside your browser!
Home Page: https://www.pgetinker.com
Interactively create an olcPixelGameEngine application from inside your browser!
Home Page: https://www.pgetinker.com
Is your feature request related to a problem? Please describe.
not really a problem, more that it's ugly, currently
Describe the solution you'd like
some sorta spinning indicator on the player panel, indication compiling,
some sorta red x, circle, or something to indicate failed compiling
Describe alternatives you've considered
n/a
Additional context
n/a
Describe the bug
The Share URL and Copy button overflow the Share dialog view.
To Reproduce
Expected behavior
The Share URL and Copy button should display in a manner that doesn't break the share dialog view.
When trying to utilize a PGEX, the build just hangs with a 400 error in the browser console and the player shows a green screen. The Build & Run
button also no longer is useable, and the user is forced to refresh the page.
Sample code (trying to include the splash screen. Utilizing any PGEX results in a similar problem.)
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#include "olcPGEX_SplashScreen.h"
#if defined(__EMSCRIPTEN__)
#include <emscripten.h>
#define FILE_RESOLVE(url, file) emscripten_wget(url, file); emscripten_sleep(0)
#else
#define FILE_RESOLVE(url, file)
#endif
// Override base class with your custom functionality
class Example : public olc::PixelGameEngine
{
public:
Example()
{
// Name your application
sAppName = "Splash Screen Example";
}
olc::SplashScreen splash;
public:
bool OnUserCreate() override
{
// Called once at the start, so create things here
// built with emscripten, maps the url to the virtual filesystem and makes it
// available to the standard C/C++ file i/o functions without change!
//
// built with any other native toolchain, the macro does nothing and all file
// access is done just as it would in any other normal scenario.
FILE_RESOLVE("https://i.imgur.com/KdWjkwC.png", "assets/gfx/broken.png");
renBroken.Load("assets/gfx/broken.png");
color = RandomColor();
return true;
}
bool OnUserUpdate(float fElapsedTime) override
{
// Called once per frame, draws random coloured pixels
if(GetMouse(0).bPressed)
color = RandomColor();
Clear(color);
DrawRect(0,0,ScreenWidth()-1, ScreenHeight()-1, olc::YELLOW);
DrawString(6, 6, "Hello, PGE", olc::BLACK);
DrawString(5, 5, "Hello, PGE", olc::WHITE);
DrawString(6, 26, "Mouse position SHOULD match\nclosely to the circle.\n\nYellow borders should ALWAYS\nbe visible\n\nLEFT MOUSE to change color.", olc::BLACK);
DrawString(5, 25, "Mouse position SHOULD match\nclosely to the circle.\n\nYellow borders should ALWAYS\nbe visible\n\nLEFT MOUSE to change color.", olc::WHITE);
DrawSprite(5, 100, renBroken.Sprite());
DrawString(6, 221, GetMousePos().str(), olc::BLACK);
DrawString(5, 220, GetMousePos().str(), olc::WHITE);
FillCircle(GetMousePos(), 3, olc::RED);
Draw(GetMousePos(), olc::WHITE);
return true;
}
olc::Pixel RandomColor()
{
return olc::Pixel(rand() % 128, rand() % 128, rand() % 128);
}
olc::Pixel color;
olc::Renderable renBroken;
};
int main()
{
Example demo;
if (demo.Construct(256, 240, 2, 2))
demo.Start();
return 0;
}
Describe the bug
Adding non existent header include shows no error indication, and is stuck on "Compiling".
Example of non existent header:
#include "olcPixelGameEngine_.h"
To Reproduce
Steps to reproduce the behavior:
#include "olcPixelGameEngine_.h"
at the top of source codeExpected behavior
Some kind of error indication.
Desktop (please complete the following information):
Describe the bug
Shared screenshots generated using imgur links seem to have become broken. See the two PGEtinker instances I included below and the sample screenshots that were shown to me when clicking Share.
Note that other image hosting sites I tried such as imgbb appear to work fine (using a sample URL like https://i.ibb.co/9qnkzjD/tile.png
)
To Reproduce
Steps to reproduce the behavior:
FILE_RESOLVE("https://pit.pgetinker.com/MwpptUlwPhnc.png", "assets/gfx/broken.png");
with an imgur URL. Example:
FILE_RESOLVE("https://i.imgur.com/zewMrBN.png", "assets/gfx/broken.png");
Sharing
button on the toolbar and select the Share
option.Expected behavior
The screenshot is generated normally.
Additional context
Describe the bug
Trying to compile this code fails without indicating the reason for the failure.
Gist of the offending code snippet, here.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Compile successfully or indicate what went wrong.
Screenshots
n/a
With the new use for the Build Information window showing all the LSP's issues and warnings, it might be useful to show a little count of all the warnings and errors in the title of the window, so even when it's not open, you can still see the stats at a glance.
Inspired by JetBrains, except there, it's in the top right:
(Along with spelling and grammar errors, but PGETinker doesn't need to concern itself with those)
I felt like inserting them into the title of the window might be the best spot for them.
Although maybe you can think of a better spot, which is also perfectly fine, of course!
Describe the bug
Compiles this share: https://pgetinker.com/s/2VY9NEmOI2H, but fails to run without indicating it to the user.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should indicate runtime errors to the user, when the program compiles successfully.
Describe the bug
When attempting to use Draw functions with olcUTIL_Geometry2D.h
included, programs no longer compile.
To Reproduce
Steps to reproduce the behavior:
#include "olcUTIL_Geometry2D.h"
before #include "olcPixelGameEngine.h"
wasm-ld: error: pgetinker.o: undefined symbol: olc::PixelGameEngine::FillCircle(olc::v_2d const&, int, olc::Pixel) wasm-ld: error: pgetinker.o: undefined symbol: olc::PixelGameEngine::Draw(olc::v_2d const&, olc::Pixel)
Expected behavior
The program would run and compile as normal, showing the standard PGEtinker application.
While not a bug for a single instance deployment, PGEtinker currently relies on the local filesystem for both caching the compiler output, caching remotely include source files, and for workspace storage.
For a deployment, it must be possible to use remotely hosted storage for compiler cache, otherwise when a containerized version of PGEtinker is destroyed, the cache data will be lost as well. This is not ideal.
A possible solution might be to self-host an s3 bucket and utilize Laravel's built-in s3 storage support.
Is your feature request related to a problem? Please describe.
Given that PGEtinker only supports a single file, it would be nice to have more tools to organise it and bring order to it.
Describe the solution you'd like
As such, I propose proper support for #pragma region
s, and folding and unfolding for them.
I have a couple utility functions that I'd like to fold away here:
Describe alternatives you've considered
I've not considered anything else, yet.
Additional context
N/A
Is your feature request related to a problem? Please describe.
Right now there's no clear way for a user of PGEtinker to report a problem, or to request a new feature other than to visit the OLC discord and discuss it hoping the developers notice.
Describe the solution you'd like
Create a new navigation menu, which can include various links, including the links to the github repo+issues
Describe alternatives you've considered
n/a
Additional context
n/a
The hall idea of this webpage : developed programming skills.
###description
"Step Tabs". As easy as possible, but to be able to switch between them to compile and see the result.
If tutorial is developed, to be able to save separately stages, similar to GitHub, but in our case, just simple text : Step 1, Step 2, Step 3, etc
It is (copy, paste is slow and inconvenient :) )
Using opportunity to say Thank You, this is awesome :)
The discussion was about stripping whitespace from supplied source files for the caching system.
We can use this to find strings and ignore those for the hashing check.
Is your feature request related to a problem? Please describe.
n/a
Describe the solution you'd like
In traditional IDEs, when coding an application you're able to get hinting and completion from the files you have loaded, or files you reference. It'd be nice to have that functionality present for the PGE related functions, etc.
Describe alternatives you've considered
n/a
Additional context
n/a
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
everything above, but with a clear message informing the user that the service has gone offline
Screenshots
n/a
Desktop (please complete the following information):
n/a
Smartphone (please complete the following information):
n/a
Additional context
n/a
Replication steps are:
PGEtinker is no longer useable after these steps and the browser settings have to be cleared to reset everything.
Tested on Microsoft Edge/Windows 11 and Firefox/Debian
If you disagree to the terms then press back it doesn't present the terms again. Tinker just loads infinitely on the homepage.
I got this by going to the website, pressing disagree, I reached the you've disagreed page and then pressed back on my browser. Happens in both Firefox on desktop in Windows and Safari on iOS.
Is your feature request related to a problem? Please describe.
a keyboard shortcut for building, so one need not continue to click the mouse all over the place
Describe the solution you'd like
Control+Enter, it's good enough for compiler explorer
Describe alternatives you've considered
also F5 or Control + R
Additional context
n/a
Is your feature request related to a problem? Please describe.
It would be convenient to be able to use the #include
macro to bring in source that is public facing, an example might be other github repos, or just any public facing source repo.
Describe the solution you'd like
The idea I currently have involves adding on to the existing filter looking for URLs in the includes. Using something akin to the curl library to determine sniff the header of the response of trying to GET the provided URL, and if it matches certain critera (size and type) it can be downloaded to the isolated compiler environment and compiled along with the rest of the code, as it would normally.
Describe alternatives you've considered
n/a
Additional context
n/a
Currently when you edit code, the language server provides hinting and code completion to the editor. However, one must scroll through the source, and hover, in order to read the details of any given problem reported by the language server.
Describe the solution you'd like
A panel, or perhaps repurpose the "Build Information" panel to contain a clickable list of the problem reported by the language server that navigates you to where the problem is occurring, within the editor.
Describe alternatives you've considered
This is the only way! Trust me!
Describe the bug
session guarded api endpoints csrf token mismatch when sessions run longer than 2 hours
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Run the program as usual.
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
Right now, first time viewers of PGEtinker are prompted to acknowledge and agree to the terms of use. Currently, upon clicking "I Disagree" it strips the entire app from the page leaving it blank white.
Describe the solution you'd like
Create a new landing page, with more helpful information and perhaps some persuasive language to help alleviate the privacy concerns of those who disagree with the terms, therefore being unable to use PGEtinker.
Describe alternatives you've considered
A dedicated landing page that contains an embedded video of Rick Astley performing his hit 80s song "Never gonna give you up"
Additional context
n/a
Is your feature request related to a problem? Please describe.
As I work on applications in PGEtinker, occasionally I want to output data to the console repeatedly to monitor values. If I don't include a way to stop monitoring values, I have no way to scroll back up while my program continues to add info to the Console.
Describe the solution you'd like
When I start scrolling back up in the Console
window, the window won't immediately put the scrollbar focus back to the bottom of the panel (since it's still being updated and written to constantly)
Describe alternatives you've considered
As I mentioned before, it's currently on the user to implement a way to stop producing debugging outputs everytime they want to test per-frame debugging, but gets quite annoying after constant use of it.
Additional context
For an example, see: https://beta.pgetinker.com/s/TUGKC3iS9N1
As it outputs an incrementing counter number, I cannot scroll the Console window back up to look at previous values.
(As a side note, when the scrollbar is already at the bottom, the window can continue scrolling on its own. There are just some instances where interrogating a specific value while the console continues outputting would be handy.)
Title says it all, cache lasts forever, and it should not.
Describe the bug
Typing anything before or after #define OLC_PGE_APPLICATION
is considered legal, but does not appear to have any other consequences.
To Reproduce
Steps to reproduce the behavior:
#define OLC_PGE_APPLICATION
, write any text of your desires either before or after it.Expected behavior
Probably should error with an invalid name/type/symbol error of some sort from the compiler?
Additional context
Here is an example PGEtinker share demonstrating the "problem": https://beta.pgetinker.com/s/L-YwkrmuLLV
When typo'ing an include, PGEtinker fails to build, the player window stays on the green screen and the Build & Run
function no longer works.
Sample code to try in PGEtinker (Note: Typo intentional):
#include <iostream>
#include <fdjsaiovdj>
int main()
{
std::cout<<"Hello World!"<<std::endl;
return 0;
}
Result: Green screen and the following error messages in browser's console:
POST https://bixxy.pgetinker.com/api/compile 400 (Bad Request)
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startLineNumber')
Describe the bug
I'm trying to run the TEST_QuickGUI.cpp from OLC repo.
https://github.com/OneLoneCoder/olcPixelGameEngine/blob/master/examples/TEST_QuickGUI.cpp
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected to see the output. But I see an error
2 error seen in browser console
emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up. [srcdoc:4286:12](about:srcdoc)
_emscripten_set_main_loop_timing about:srcdoc:4286
_eglSwapInterval about:srcdoc:5618
x about:srcdoc:7040
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:0
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:659005
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:610473
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:296304
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:355676
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:15941
<anonymous> about:srcdoc line 893 > WebAssembly.instantiate:68961
x about:srcdoc:7072
createExportWrapper about:srcdoc:859
callMain about:srcdoc:7905
doRun about:srcdoc:7955
run about:srcdoc:7966
(Async: setTimeout handler)
run about:srcdoc:7962
runCaller about:srcdoc:7890
removeRunDependency about:srcdoc:793
receiveInstance about:srcdoc:939
receiveInstantiationResult about:srcdoc:957
(Async: promise callback)
instantiateArrayBuffer about:srcdoc:894
instantiateAsync about:srcdoc:906
createWasm about:srcdoc:976
<anonymous> about:srcdoc:7458
Uncaught TypeError: GLctx is undefined
_glCreateShader about:srcdoc:6446
x about:srcdoc:7040
x about:srcdoc:7072
createExportWrapper about:srcdoc:859
callMain about:srcdoc:7905
doRun about:srcdoc:7955
run about:srcdoc:7966
setTimeout handler*run about:srcdoc:7962
runCaller about:srcdoc:7890
removeRunDependency about:srcdoc:793
receiveInstance about:srcdoc:939
receiveInstantiationResult about:srcdoc:957
promise callback*instantiateArrayBuffer about:srcdoc:894
instantiateAsync about:srcdoc:906
createWasm about:srcdoc:976
<anonymous> about:srcdoc:7458
Desktop (please complete the following information):
Smartphone (please complete the following information):
NA
Additional context
NA
in the mobile layout you can't share, or see the links.
Describe the bug
The rename functionality of the code editor doesn't work.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
The symbol gets properly renamed
Video
Desktop:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.