Forum Replies Created
-
AuthorPosts
-
Sounds good to me, although I think the chances of there being another Mark Sibly language are about a million to one against!
PS can I include blitz3d and blitzMax in my package now they are on github ?
Of course!
DataBuffer has a ByteOrder property, which can even be set from the ctor, eg:
Monkey12Local buf:=New DataBuffer( 1024,ByteOrder.BigEndian ) 'create a big endian databuffer.buf.ByteOrder=ByteOrder.LittleEndian 'changed my mind!Kind of untested as I’ve never used them in real code yet. I will probably add some general purpose endian functions to byteorder.monkey2 one of these days too..
I can’t even find a function for displaying values as binary.
Try ULongToString and StringToULong. I will probably add Hex, Bin etc on day too as I find these hard to rember myself.
I suck as todo lists/roadmaps so there probably wont be another. I actually kind of consider the current set of github issues my ‘todo’ list…
I am happy with the language as it is for now and wont be making any major changes to it in the near future. There is a still a ton of cleaning up, speeding up, fixing etc to do though.
As for operator ‘?.’ (not ‘.?’!) I must admit I’ve kind of got mixed feelings about it. I’ve never used it in practice or felt the need for it (and sort of consider it a bit dangerous for various reasons) so I don’t really feel like I understand its true ‘worth’ – which makes me wary of just throwing it in there. So this is currently in the ‘still thinking about it’ category (along with a LOT of other stuff). I think the chances are pretty good that it will eventually happen though as it should be pretty easy to implement. No idea when – sorry I can’t be clearer than that.
Right now though, 3d is my top priority.
[edit]
Here are some of my concerns about operator ‘?.’ – also of course, it’s also slower than plain ‘.’.
[/edit]The duck here –
Yay, the duck’s back! That wasn’t in the gltf2.0 samples a few weeks back…
It would be kind of nice to add a gltf2 exporter to mx23d. In combination with assimp importers I’d then be able to easily add a convertor to Ted, but this will have to wait for a while.
What current (free) tools support exporting to Gltf2?
Currently very few as it’s a very new format. But there are several under dev, including one for blender (sponsored by Kronos) and an online one too.
I am using gltf2 as the built-in/native format as it’s ideal for games – lightweight, fast, open, free etc, with a feature set that matches modern game engines and PBR materials very nicely. I am hoping to be able to support the full gltf2 feature set eventually.
Here’s a bunch of gltf2 WIPS:
https://github.com/KhronosGroup/glTF/issues/867
develop branch may not always be ‘easy’ to build, depending on what in particular is being developed at the time.
Also the bin must be set as a PATH variable
You shouldn’t need to do this if mingw has been added to monkey2’s devtools dir.
Gltf2 will be the ‘standard’ built-in format and will always be available, but I also plan to add an external ‘assimp’ module which will handle quite a few formats, ie: http://assimp.sourceforge.net/main_features_formats.html
The shader compiler may be optimizing out normal, color etc if they’re not actually used by the shader which they don’t appear to be.
Another way to deal with attribs is to use glBindAttribLocation instead (after compiling but *before* linking) to ‘force’ attribs to go into fixed locations, position=0, normal=1, color=2 etc.
There’s currently no way to trap integer divide by 0 exceptions in monkey2 – you should alwys check for them in code if there’s a possiblity an int divide by 0 could happen.
Note this only applies to int divide by 0, for a floating point divide you’ll get +/- infinity. Ditto in floating point any expression with a ‘nan’ in it will produce nan, as will 0.0/0.0 (and probably some other meaningless expressions like infinity/infinity etc.). So if you change i and j to floats (they’re currently ints), Print i/j should print ‘infinity’ or something.
Note there’s really 2 kinds of exceptions being discussed here: cpu/hard exceptions, which are caused by the cpu when Something Bad Happens (eg: int div by 0, invalid mem access, privelage violation etc) and software exceptions which are a more general purpose flow control thing and supported by monkey2 via throw/catch, eg: the mx2cc compiler uses software exceptions to flag errors in the parse, semant etc phases. So while you can say the cpu ‘throws’ exceptions, the mechanism is different and it general happens at a lower OS/C++ level.
You cannot currently ‘catch’ cpu exceptions in monkey2, and may never be able to. Mechanisms to convert cpu exceptions to software exceptions differ all over the place, and I have never liked the idea of NOT aborting an app that has caused an illegal memory access or privelage violation or something.
Wasm only works on desktop chrome/firefox right now.
May 11, 2017 at 10:55 pm in reply to: How to determine if target has Touch/Mouse/Controller/Keyboard #8166Currently, you’ll need to use #If __TARGET__=”ios” etc. __TARGET__ is one of: “window”, “macos”, “linux”, “emscripten”, “android” or “ios”
There’s also __DESKTOP_TARGET__, __MOBILE_TARGET__ and __WEB_TARGET__ booleans, eg:
#If __DESKTOP_TARGET__ ‘windows, macos or linux
#Elseif __MOBILE_TARGET__ ‘android or ios
#Elseif __WEB_TARGET__ ’emscripten or wasm
#Else
#Print “IMPOSSIBLE!”
#Endif
This doesn’t allow for everything yet, eg: you can’t tell if a __WEB_TARGET__ has touch input (although you could set a flag if you detect any tough events) or if keyboard/mouse etc are unplugged.
Just fixing mx2cc right now, pretty sure it’ll ‘really’ fix it though.
Ok, found the 2 line fix above and it seems to have helped!
Looking very good, but acting a bit weird here…
In a vs computer game, sometimes when its the computer’s turn it just seems to go nuts! Balls appear to warp to random places on the table and it soon crashes. Not sure, but it may be running the game at ‘full speed’ without rendering for some reason.
Also, can’t seem to sink a ball either!
Try: GetFileType( AssetsDir()+”myfile.txt” )
There’s a bit of a mismatch between ‘stream paths’ and ‘filesystem paths’ at the moment, ie: ‘asset::’ only works when opening a stream, but things like GetFileType, GetFileTime etc work with filesystem paths. It should probably work everywhere (where possible – assets aren’t always stored in the filesystem) but there are other issues with filesystem paths and soft/hard links that also need to be dealt with. Feel free to add an issue referencing this post though.
-
AuthorPosts