impixi

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 100 total)
  • Author
    Posts
  • in reply to: DPI independent GUI system #6705

    impixi
    Participant

    I have a feeling the high dpi functionality is buggy at SDL2’s end (or within graphics drivers), at least on the MacOS platform. I run the following code on my 5k Retina iMac and receive incorrect results. It states that the DPIs are approx 108 and the desktop resolution is 2560×1440, all incorrect.

    EDIT: Just had a thought. The 27″ 5k iMac has a stated resolution of 5120×2880 at 218 PPI. The values I get from my code are half of those values. Might not be a “bug” after all, just “unexpected behaviour”.

    [/crayon]

    On the positive side, the undocumented WindowFlags.HighDPI creation flag works nicely, though I need to load my fonts at a larger size, obviously. Text is very sharp. (Ted2 makes use of that flag too).

    My next project is very text heavy, so I also would like bug-free DPI-related functionality, if possible…

    in reply to: Patreon $1000 Goal #6616

    impixi
    Participant

    @xaron

    Excellent! We can do this *together*! 😉

    in reply to: Patreon $1000 Goal #6614

    impixi
    Participant

    Assuming there are no *extremely* negative currency exchange rate variations / economic events, the Patreon pledge total will remain above $1,000 for the next 12 months – I have personally committed to keep it there (to Mark, via email exchanges) and set aside the necessary funds to do so. (I have a private, proven history of repeated “higher level” donations to BRL).

    That said, I’m hoping the burden won’t fall exclusively on my shoulders (but I’ll *happily* accept that responsibility if necessary). Every single dollar pledged is *important*, and not only because it’s a nice boost to the total – it’s also a nice boost for morale! Even if you can afford only one dollar per month it shows a genuine interest in the project.

    A software engineer of Mark’s caliber could earn considerably more than $1,000 per month if employed by a company, as I’m sure you’re all aware, so I think it’s a bargain price to employ his services through Patreon.

    Besides, I think we’re all keen for a nice little 3D engine from Mark. 🙂

    in reply to: Is there any way to do ternary expression? #6519

    impixi
    Participant

    I’m not sure what’s going on behind the scenes, but I’d call it a “ternary operation” because it takes three elements and behaves like an operator.

    Monkey 2’s
    ? Else
    is basically equivalent to C’s
    ? :

    https://en.wikipedia.org/wiki/Ternary_operation

    in reply to: Monkey 2 App Template #6513

    impixi
    Participant

    one interesting thing is the FPS in my Original template runs at 60 frames per second , on yours the frame rate is much higher, on Windows and OSX.

    SwapInterval = 0 disables vsync, I believe, so that’s the frame rate difference.

    in reply to: Patreon $1000 Goal #6511

    impixi
    Participant

    @degac:

    I suppose if we sum the Patreon+PayPal donate that amount was already reached.

    True. I have been donating regularly via PayPal myself but have rejoined Patreon now, hoping they have learned their security lessons from the 2015 hack.

    in reply to: Monkey 2 App Template #6494

    impixi
    Participant

    You could try something like this:?

    [/crayon]
    in reply to: Is there any way to do ternary expression? #6391

    impixi
    Participant
    [/crayon]
    in reply to: MARK: Please look and take note #6027

    impixi
    Participant

    Adam, I’m not sure the comparison is fair/valid.

    Yoyo Games probably have an employee dedicated full-time to writing documentation for their Gamemaker product. And they can afford it: Gamemaker is not open source and the Pro and Master editions are $149.99 and $799.99 respectively. Plus it is listed on Steam and so benefits from that exposure.

    BRL is basically a one man show, and Monkey 2 is an open source project. Therefore it survives purely on the generosity of contributors via Patreon and Paypal donations. And Mark’s time is limited.

    That said, I agree documentation is very important. So, aside from cash donations, maybe the best way people can contribute to Monkey 2 is via documentation, whether examples, tutorials, API references, etc. There are already docs available, though scattered in various places such as the official Monkey 2 docs, forums, youtube, github and other websites.

    Maybe we do need a centralized documentation aggregation point? (ie a Wiki, as scurty suggests)…

    in reply to: Normal map generator. #4965

    impixi
    Participant

    I’ve been coding some image filtering functions, one of which is a normal map generator. Still a WIP (no docs, etc), but take a look:

    [deleted embedded code, it’s in the attachment.]

    @Richard: That link is dead for me…

    EDIT: I should point out the normal map generation code uses MX2’s “hidden” Vec3 class, so may break in the future?

    EDIT2: Zipped up the code with a “test.jpg” image and attached it to this post (I hope)…

    Attachments:
    1. imgfiltertest.zip
    in reply to: OSX Cmd+Q/menu quit doesn't quit #4796

    impixi
    Participant

    TED2’s File->Quit works for me, but not the File->Quit from the MacOS “bar”. Latest MacOS version.

    in reply to: Import/Includes and globals? #4283

    impixi
    Participant

    Define a namespace at the top of ultim.monkey2 e.g:

    Namespace ultim

    In your main.monkey2 your import should be:

    #Import "ultim.monkey2"

    and then you need to put the following at the top:

    Using ultim..

    Alternatively, just delete the Namespace defined in main.monkey2 and fix the import statement, as above.

    in reply to: Memory Pool – Manual memory management #4256

    impixi
    Participant

    Here’s the other pooling technique I experimented with:

    [/crayon]

    Objects to be pooled must implement the iPoolable Interface. The pool also requires a “creator function” (basically a constructor replacement).

    This technique affords greater flexibility though at a cost of greater abstraction.

    I used an array instead of a stack for performance testing reasons – surprisingly there was no performance benefit. Maybe I should reimplement it with a Stack…

    in reply to: Memory Pool – Manual memory management #4255

    impixi
    Participant

    IIRC, there is no Monkey1-like Pool class in MX2’s collections library.

    I did some pooling experiments several MX2 releases back. I could not find a solution that performed quicker than run-time Newing of objects, regardless of the quantity (on PC hardware). Memory fragmentation issues, however, are theoretically solved by object pooling.

    Here’s a simple generic object pooling class:

    Note that any objects added to it require a default New() constructor.

    [/crayon]

    I do have another solution somewhere that makes use of objects that implement a “Pooleable” Interface. I’ll see if I can dig it up and post it as another example…

    in reply to: XML module #3985

    impixi
    Participant

    Another tinyxml2 example with element attributes and “embedded XML”:

    [/crayon]
Viewing 15 posts - 61 through 75 (of 100 total)