3 ms·
Glad it has graphics! Always the best part of BASIC
by snorkel 4y ago
Glad it has graphics! Always the best part of BASIC
- jmmv 4y agoIndeed. The difficulty in manipulating graphics is what most puzzles me these days. We have these amazing graphics cards and screens, but all we can do is output text by default in most languages, and drawing anything requires large libraries or SDKs.
- 7thaccount 4y agoThat blows my mind as well. You'd think I'd be able to write some pretty cool games using just PowerShell on Windows calling out to native graphics functions.
- simonh 4y agoIt is possible to access windows API functions from Powershell, but it's not particularly simple. I think you can define a method that calls an API function? Alternatively you can go via C#. In theory you could access the DirectX primitives that way. DX is a pretty low level API though. Unreal and Unity exist for a reason.
- zozbot234 4y agoDrawing modern graphics is not done by blitting pixels onto a framebuffer, which is the model most BASICs use. In fact, doing pixel-perfect 2D rendering on GPU is still hard and an area of active research.
- abainbridge 4y ago> Drawing modern graphics is not done by blitting pixels onto a framebuffer That's a choice. The hardware still supports it. It is still possible (and fast-ish and simple) to do graphics by blitting pixels.
- dusted 4y agoPart of why we need huge libraries to put graphics on the screen is because those amazing graphics cards have comparatively large and complicated interfaces.
- abainbridge 4y agoHaving a bitmap in normal system memory that we can write to the window or screen is easy though and should be more widely supported. Once you've got that you can write pixels, lines, rectangles, mandlebrots etc very easily and building up to a GUI toolkit is also quite easy and fun. This mechanism is fast enough for pretty much everything other than games on modern hardware. I consider GPU acceleration a form of premature optimization - it adds complexity unnecessarily in many cases. Here's my library for doing that on Windows and X11. https://github.com/abainbridge/deadfrog-lib https://github.com/abainbridge/deadfrog-lib