Forum Replies Created
-
AuthorPosts
-
Also quite cool back in 256 x 192 but with colour clash turned off. (Separate link; again recommend full-screening it. Key L is still available to toggle low-res mode off.)
Well, 256 x 192 is rather a “challenging” candidate for turning a low-contrast, fairly washed-out, realtime rendered scene into 8 Spectrum colours (each with associated ‘dark’ version) with correct colour-clash, and without sampling every 8×8 block of pixels (a MASSIVE framerate hit since GLSL isn’t meant to read anything other than the ‘current’ pixel), it wasn’t feasible to select a suitable foreground and background colour that avoided constant flickering between the two as the scene changed, so I’ve amended the Spectrum’s display size.
Here’s how the scene would be rendered if the Spectrum’s display size was 1024 x 768 instead of 256 x 192, but still with correct colours and clash.
Full-screen it. (Only testing web version in Firefox, apologies.)

I’ll upload my code once I’m done messing about…
[EDIT: Oopsie, ha ha.]
Hmm, weird, just installed Chrome and it’s working fine here! What platform/gfx card you on?

Ah, only tried in FF, web not really being my main target, but had to do a few tweaks to get that to work. Get the impression cross-browser shaders are not a lot of fun!
Update to Speccy Island!
Hit L to go Low-res, Spectrum-style, with attribute clash.
Hit P in low-res mode to toggle real colours. Full-screen it!
L gets back to normal res/colours.
Still WIP, but finally got a decent-performing shader that at least outputs legit Spectrum-compatible imagery, needs much tweaking still.
In theory, you could save a bunch of frames and display them for real on the Spectrum, as-is… which I’ll eventually try.

Interesting, saved!
There’s a vaguely similar module in the Ted2Go Module Manager (under Build menu), png2polygon, might be of interest if you haven’t seen it — produces polygons from PNG images, worked really well as far as I recall.
Just had a quick go, works really well… nice work!
Updated Island demo with the ImageRenderTarget code from above, now offers simple greyscale for starters. (L to toggle low-res, P to toggle greyscale in low-res mode.)
Try this, from Ted2Go’s Help menu (sorry, not easy to link directly!)…
Help -> Browse Manuals -> Monkey2 Users Guide -> Language Reference -> Build System.
See System Imports and Local Imports, which list native file types.
I think to some degree plain C++ will work cross-platform, as the current wasm target uses emscripten to convert the code to Javascript… but I imagine that would also depend on the specific library and what it needs on the target platform. (Heading into realms of cluelessness now… )
Woo-hoo! No, I just assume I don’t really know what’s going on, as I’m not a pro… I’ve never used this stuff, but glad to hear that was it anyway!
I just tried this for accessing std.graphics.Color:
Monkey1234Alias Gfx:std.graphicsblah = Gfx.Color.RedGuessing that’s not what you’re after? (In conjunction with the Namespace keyword?)
If not, I shall STFU… I’m not a real programmer, just been faking it for 35+ years!
Just to check… are you aware of the Namespace feature??
In the docs, it’s under Language -> Namespaces.
I imagine I haven’t fully grasped the question, though…
Added ‘finished’ code, with minor tweaks, to GitHub.
-
AuthorPosts