Forum Replies Created
-
AuthorPosts
-
Yup, count me in as one of those!
That looks much more appropriate — you should never use floats for anything that requires accuracy, in any language!
They’re inaccurate by design as they have to work within a set number of bits.
Try this simple, obvious division:
Monkey1234567891011Namespace myapp#Import "<std>"Using std..Function Main()Print 1.0 / 10.0EndHere, it prints 0.10000000000000001, but the result may vary on different platforms/targets, and this is to be expected for floating point numbers — they simply can’t represent all decimal numbers accurately.
Anyway, you’ve figured out a solution that looks good for currency.
Nice one, nerobot, really useful!
Be such a shame if it goes to waste!
I’ve been looking at Godot more and more, just to have a backup option, and it’s getting more and more positive press, with many tipping it to take over the game industry. Might it be an idea to implement MX2 as one of its (compiled) scripting languages? It currently supports GDScript (interpreted) and I think C#, but I’m not that keen on either.
Having an MX2 option would be really cool, and take away the need to support all the different platforms, libraries, etc — pure language.
Of course, the ideal would be more of what we have, but it’s not looking like that’s particularly realistic, given real-world commitments!
March 6, 2019 at 3:26 am in reply to: Assets, paths… Need some help putting together examples #16112Just to be sure, it should be “asset::test.csv” to use the correct assets dir!
Welcome back! I would never have figured that out, so that’s handy to know… thanks!
I’ve just updated this with some cool palette-selection/dither code to loosely represent a few different ‘retro’ systems…
Try it out at:
http://www.hi-toro.com/monkey2/retro_island/retro_island.html
Code at:
https://github.com/DruggedBunny/Retro-Island
Notes:
Hit R for retro mode: expect MASSIVE pause here on web, maybe 20-30 seconds or more! Need to somehow get this done during startup…
Hit [ and ] to cycle through a few cool ‘retro’ modes.
Hit H to hide text in retro mode.
Tested in Firefox, Chrome and Vivaldi on Windows 7 64-bit only. Download code from GitHub and build natively if it fails for you!



February 2, 2019 at 8:37 am in reply to: Anyone know how to convert this C/C++ initialiser?! { {0,0}, 0.5 } #16036Oh, I see now! Thanks for that, Danilo, really appreciate it!
Hopefully I can get this converted today… thanks again.
February 2, 2019 at 3:27 am in reply to: Anyone know how to convert this C/C++ initialiser?! { {0,0}, 0.5 } #16034Ah, thanks for pointing that out… the article is a little confusing, though I think the intent is to offer different options… I’ll look into that a little more closely.
Any idea on the initialisation part? I just don’t get this, and it’s not something easily searched-for!
Monkey1MixingPlan result = { {0,0}, 0.5 };Nice work!
It’ll be the shaders needing tweaked, probably… I’m only testing on Firefox just for throwing up quick demos, but my own interest is desktop. As I mentioned, shaders and web browsers seem to be a minefield of misery.
I don’t think they do Safari for Windows these days, so…
Crude C64 resolution/palette shader. (No attribute clash implemented or planned!)

C64 Island [WebGL, Firefox-tested only!]
Will update GitHub probably tomorrow night (GMT) or over the weekend, once I’ve tweaked it more and implemented switching between Speccy and C64 modes…
Next up will have to be simple Amiga 32 and 256-colour modes, maybe 320 x 200 and/or 640 x 512, and SNES?
Nice!
Nice, like the way they hide!
-
AuthorPosts