Forum Replies Created
-
AuthorPosts
-
As long as it’s compiled and can have some inline assembly it works… You could write a new target for hardware drivers! But who would do that? ;P
Yes of course C and C++ are the main sys languages nowadays.IMHO a system language is a language that let you do everything possible with the hardware+os you have with absolutely no restrictions.
So for bootloaders and cpu initialization you must have assembler (or machine language), even C is not fully featured for that kind of programming.
For Oses you must have some cpu specific features like multi-thread. Those things would have to be implemented for monkey2 and it would be a lot of work. For this reason I don’t think mx2 is suitable for sys programming. Mx2 is a high level, “easy to manage” language, focused on productivity. Setting up all your externals all the time can be a waste of time, you’ll be better with the native stuff in the end.But well you can do a lot of things with mx2 externals, those externals are actually not mx2 language and they are your interface with the OS, using various available API’s. And all the stuff is finally compiled/linked like a native c++ code. mx2 should just make your life easier there.
I’m on a box2d module (WIP), including RUBE importer/exporter. (Unfortunately RUBE is not a free product, not expensive though)
It contains a b2Manager Class that does a lot of work and let you with a very readable code.
There’s already a small bunch of working bananas.
It’s not in the form a module for now, so you can just download open and run bananas. It is intended to become a module though.
https://github.com/abakobo/box2d-Most bananas are using Vsync signal, so it’s supposed to run at your screen refresh rate (which is usually 60FPS). But some use a timer, I don’t remember which one though. You can search for the word Timer in the files and you’ll find them.
-I don’t think anybody has solved the non-launchable icon problem.
-nice indeed!Looks like I’ll be able to use OnDiscard() Only (i’m storing native classes refs in an array).
But i’m a bit confused with the fact that OnDiscard() might not be called! In which situation can this happen?
If I understand, in normal situations the GC is supposed to call OnDiscard() when cleaning and seeing the Resource object is now out of scope. So OnFinalize() is called on abnormal situations only?
I have mx2 class containing several native classes (OS agnostic ones). So I just want each native one to be deleted when the GC takes care of my Class instance.
Is it OK to create a Resource that has no OnFinalize actions? Or should I use a native data structure to store my native classes refs (instead of an mx2 array)?My aim is that the module end-user won’t have to take care of that, in order to keep the monkeyish feeling of a memoryleaks-safe zone.
thx (sorry there is a lot of question marks in this post..)
I looks like I’ll have to check for Null result.
Thx
Yes, I was maintaining the docs uptodate at that adress. Seeing some negative feedback on the fact mx2 online docs were not updated, I proposed Mark to link his Doc page if he wanted..
The site is odd but… the docs are up to date!
Pretty cool that mx2 is getting a more ‘pro’ feeling though.
February 3, 2018 at 11:25 am in reply to: Is your Ted2Go crashing in Window 7 when debugging? #13440Yes, Mark has stated that the official dev platform was W10 and that he would not try to resolve that problem (due to lots of platforms to manage already). A Pull request could help!
It’s working here with almost latest dev branch (27-01-2017)!
I’ve made some test with C style function pointer/callbacks if you want to have a look. No struct here though. (code is attached)
Attachments:
@markb , you’re supposed to use some sign to show you’re not being serious. For example the ;P smiley.
I’ve finally used bbArray and it is way better than messing up with void casts.. (just had to #include “bbtypes” (in .h) and “bbarray” (in .cpp) in the native code, they were detected automatically)
Monkey1234567891011121314151617bbArray<b2Fixture*> GetFixturesByName(b2dJson* json , const char* name ){std::vector<b2Fixture*> fixturesVect;int count;count = json->getFixturesByName(name,fixturesVect);bbArray<b2Fixture*> retArr (count);if (count>0) {for( int i = 0; i < count ; i = i + 1 ) {retArr[i]=fixturesVect [i] ;}}return retArr;}In complex loops I’m even writing the var letter for the Next
For i
For jNext ‘j
Next ‘iand must say I miss the fact that the compiler refuses to compile without the comment token “‘”
Consistency over all the “rotation” angles would be cool if doable without breaking previous angles things!
Thanks, will check if the class is compatible with a resource extend!
-
AuthorPosts