cocon

Forum Replies Created

Viewing 15 posts - 76 through 90 (of 342 total)
  • Author
    Posts
  • in reply to: Monkey 3d dead #13360

    cocon
    Participant

    You can see already what is offered: monkey2\modules\mojo3d\tests.

    However keep in mind that making a game is not all about the graphics, you will have to think of the code design and game design generally and then use the graphics in order to create the “VIEW” layer which will define how the game looks.

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13337

    cocon
    Participant

    Hi, when I used C# for some applications I had to use this function: Application.EnableVisualStyles() in order to have visual styles. Here is something mentioned about this: https://stackoverflow.com/questions/4308503/how-to-enable-visual-styles-without-a-manifest. I think that libui wants to instruct the linker on using the manifest file:
    https://github.com/andlabs/libui/search?p=1&q=WIN32&type=&utf8=%E2%9C%93

    I see that the linux GUI depends on GTK and it needs the GTK source (#include <gtk/gtk.h>), perhaps this means GTK library will have to be included as well along with it’s dependencies (like cairo for graphics and others). If it brings too much weight to the module, perhaps for just this special occasion Linux can rely on shared libraries instead.

    in reply to: m2stp – Simple text processing module #13332

    cocon
    Participant

    I don’t know if it would be better roll with the formatting capabilities of the standard library, just to save effort. But any other than that, this code has lots of potential to be customized for further uses or be extended for more string processing capabilities, it acts also as an educational project. 🙂

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13288

    cocon
    Participant

    Good finding!

    Some information regarding on how Monkey2 builds stuff, there are two ways, one is to build-everything-from-source situation and the other is to include the native shared libraries which are distributed with the final application. Consider these example for more inspiration:
    Example of having sources: monkey2\modules\chipmunk
    Example of having shared libraries (which deals with the multiplatform libraries): monkey2\modules\openal

    I don’t know about specifically the pros and cons of building either from source or from libraries. By default you would consider that building everything from source is the way to go, unless you literally can’t mess with the source such as dealing with protected (OS libraries) or proprietry (where you can’t use the source).

    Regarding some of your notes from github…

     

    DLL must be in Root dir (possible to integrate instead?)

    For doing such integration, there are third party tools to help with that, however monkey has either one way or the other. Search for: “pack exe with dll together”, you should see tools like “ExeBundler” etc… But this choice would be more of a matter according to how people want to ship the application.

     

    (Class uiControl) Should be a struct I guess? Is in C source…
    But classes (like buttons etc.) can’t extend structs…

    I don’t have enough knowledge about this but there various example how is done in the modules. Use AstroGrep (the application) and search these regular expressions, to see how to match a native datatype to the monkey datatype.
    Class.+=
    Struct.+=

    Such an example can be this one: Class aiScene Extends Void=”const aiScene” (aiScene is a C struct in cexport.h)
    Where you have Monkey2 declare a class, but map it to a native struct, sweeeeet!

    in reply to: How do I get the size of an array in megabytes? #13281

    cocon
    Participant

    I updated the example to include struct and classes.

    Also testing the Monokai theme… 🙂

    in reply to: deleting forum threads #13268

    cocon
    Participant

    The pros and cons would have to be considered.

    in reply to: What you guys coding? #13267

    cocon
    Participant

    It looks good, runs smoothly too.

    in reply to: Simple Unit-Tests for Monkey2 #13256

    cocon
    Participant

    Good one.

    in reply to: Loops: For…End is Allowed? #13255

    cocon
    Participant

    Interesting, 🙂 I did not know about it, switching to it.

    in reply to: WebCam Module #13254

    cocon
    Participant

    Another choice would be OpenCV. From what I see for achieving such functionality, only a handful of commands would be required, which makes it a relatively feasible effort within a short period of time.

    https://docs.opencv.org/3.0-alpha/modules/videoio/doc/reading_and_writing_video.html
    https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html

    in reply to: How do I get the size of an array in megabytes? #13253

    cocon
    Participant
    in reply to: One way platform collision? #13230

    cocon
    Participant

    Thanks Pakz for posting it, this will worth the study.

     

    Nerobot, perhaps for full physics capabilities the chipmunk will be better. 🙂 Or perhaps a combination of custom arcade physics and real physics, would produce very interesting results. There is something weird in arcade physics that are very useful and efficient. I had tried many tests in Processing Box2D with hacks and tuning to achieve that arcade feeling, and not even close enough to the result needed.

     

    Also I have seen earlier that Diddy2 framework has a platform example in the works, check it out or ask TheRevils for more information.

    in reply to: canvas.Rotation vs Trig function rotation #13178

    cocon
    Participant

    I found a third way of inverting the Y axis. However visually it would not make sense because it will turn graphics upside down. But if you take this concept and perform the transformations using Matrix object the calculations will be applied only to values.


    cocon
    Participant

    I updated the previous post to include the code sample.


    cocon
    Participant

    This one seems to have a link to an object instance somewhere in memory, but the displayed value is Null.

     

    However trying overloading the To operator makes the program behave correctly.

     

    However I know that the point of the post is to stress test the compiler (I am not trying to patch the code example). But other than that you would consider that as a programming practice, super-casting is always ambiguous, because most of the times you can’t be sure how the derived type translates to their parent.

    As a point of reference in C# language this operation is not permitted. So perhaps Monkey would introduce the same restriction, to promote more formal and strict habits.

     

Viewing 15 posts - 76 through 90 (of 342 total)