abakobo

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 455 total)
  • Author
    Posts
  • in reply to: Modifying the mojo Canvas Class #11332

    abakobo
    Participant

    Did you rebuild mojo after your change? When you modify a module you have to rebuild it or the change won’t be taken into account. Maybe you’ve messed up your monkey2 sources and should startup with a fresh install?

    One antother important thing to know is that private behaves a bit different than in C++/java more like in D. i.e. things within the same .monkey2 file are allowed to share private things anywhere across the file. So there’s not only private things within classes/structs but you can have a private function to the file (function that is not the member of any class so it looks global but technicaly it’s not. Or you can have a class that is private to the file!).

    About the error message, it looks like it’s a crash of mx2cc, the monkey2 compiler itself (not your executable)! Of course a compiler should not crash but return an error with the code line. You really don’t see that often so it is very interresting developpement wise. Very hard to debug if you are not writter of the compiler though. It be nice if you could post a little example code that generates it, ideally on github issues.
    “Memory acces violation” is not a compile error but a runtime error. Here it happens during the semanting part of the build process while mx2cc is running.

    A normal build process will:
    Parsing… (monkey2 job)
    Semanting… (monkey2 job)
    Translating… (monkey2 job)
    Compiling… (C++ compiler job) Here you can have c++ error that looks more verbose than mx2 errors. But it should not happen ideally. It usually happesn when you play around with extenal stuffs.
    Linking ~your_executable path~ (Linker job) I wish you to never have an error here while playing with externals because linking is a real PITA. One of the super strong sides of MX2 is it’s doing it for you.
    Application built:~your_executable path~ everything worked ok, so now if there’s a runtime error you probably messed up somewhere but the different build stages could not help you detecting it. You have to build in debug mode if you want to be able to track the problem.

    About the license, you’re free to modify stuffs, you may make a fork of the original code via github. If you like the language there is a patreon page or a donate link.

    in reply to: Apply shader to group or layer of objects #11316

    abakobo
    Participant

    I would be OK with adding some sort of ‘global’ shader override to Canvas.

    For me everything that allows us to play nicely with custom glsl shaders is good to take!

    in reply to: Continue Line #11303

    abakobo
    Participant

    “..” and “And” and “Or” !?
    All of them would be usefull..

    in reply to: Diddy2 #11215

    abakobo
    Participant

    Fields can be public, protected or private.. Properties have the same encspsulation levels.

    in reply to: Diddy2 #11200

    abakobo
    Participant

    Fields are also faster than properties. So IMO properties should only be used when they trigger something, not as an equvalent to field.


    abakobo
    Participant

    How many people is really using Monkey2 as it is today, and how many people plans on using it on the near future?

    I plan to start a new project (mobile game) on mid december using mx2. I think it’s already functionnal now but did not try IOS becase I have no device for now.

    The MX2 situation makes me sad a lot… The software is so great. I can’t imagine working with something else for now. Wether it’s Haxe, MX1, AGK or anything. The MX2 way to do things just feels right to me. Though a bit more complex than some competitors, you have the control over nearly everything and it’s very well featured so it has the right easy/”low level” factor for me. It’s also really cross platform.

    I’m sad the community has not helped writing docs,manuals, tutos, vids. There are some but trying to organize ourselves was not a real success though a lot of suggestions were there. When I tried to help making nice language reference, there was a lot of speech but nearly no actions.. For me this would make a huge difference, more than the considerations about the name and color of the site and other superficial stuff that actually irritates me a lot. We can work on MX2’s marketing too, when can even fork it and give it some fancy name if we want so there’s no problem there.

    I love MX2 and as long as it’s usable I will use it, and as long as there’s a patreon I will patreon, even if Mark has only half a day per week/month to give to MX2.

    And thanks to Mark Sibly for the great experiment it was for me to observe the creation of a new language. I learnt a lot this last year.

    in reply to: Who is using Pyro and why ( or why not ) ? #11055

    abakobo
    Participant

    I shall use it when I’ll start creating my next game. (Mid December)
    Too bad it’s not on Github though. I’m pretty sure I’ll want to fork it and customise some stuff.

    in reply to: Error message request #10944

    abakobo
    Participant

    I’ve already posted an issue about this…
    You can check if the file was loaded and send an error at runtime but I’d rather like it at compile time too.

    https://github.com/blitz-research/monkey2/issues/186

    in reply to: Load/save persistent data on mobile targets? #10865

    abakobo
    Participant

    For games, on andrid there’s “google play games”, on ios it’s on the “game center” I think, but I only have an android for now..
    (dunno for files cloud)

    in reply to: Tuple experiment and usages #10864

    abakobo
    Participant

    I’d personally suggest an unused character like {} for example. It’s the chars used for defining sets in math notation so it’s kind of relevant to me.

    in reply to: Declaring fixed-size strings. #10789

    abakobo
    Participant

    you have the databuffer, wich you can find in some of the mx2 source.

    Here’s some code I used in the past. It’s not fixed size but well you can just put a constant instead of ‘str.CStringLength’..
    Now I learn that Strings can be implicitly converted to Cstrings so I won’t use it anymore but if you need fixed size It may be what you need.. If you method looks to not work so well finaly.

    Local mydata:=New DataBuffer( str.CStringLength ) ‘the length is in Bytes!
    str.ToCString( mydata.Data,mydata.Length )

    in reply to: Using external libraries. #10705

    abakobo
    Participant

    Wow though I had to convert it myself!

    in reply to: Using external libraries. #10693

    abakobo
    Participant

    Mx2 strings are not Cstrings. Checkout the toCString method.

    in reply to: Float to String problem #10675

    abakobo
    Participant

    Floats are not exact type. For example you can’t have a true 0.1 in float. When you assign the value to the float it will slightly change (if there’s something at the right of the dot).
    You will have to round the number in some way if you want to print it with just 3 symbols at the right of the dot.
    Don’t know if there is some build in rounder function. BUT you’ll never be shure you get the exact value back because the computer has not stored 3.141 but the nearest float.
    For example floats are prohibited in banking applications.

    in reply to: Is there a way to add a time variable into a game. #10373

    abakobo
    Participant

    You have the Millisecs() function for that

    Here’s a little example, don’t know if it’s accurate enough for you. I assume OnKeyEvent should be more accurate than OnUpdate (I suppose putting it in OnRender with “If Keyboard.KeyDown(Key.Space)” is a bad idea as it is called more or less at 60 fps)

    [/crayon]
Viewing 15 posts - 226 through 240 (of 455 total)