abakobo

Forum Replies Created

Viewing 15 posts - 166 through 180 (of 455 total)
  • Author
    Posts
  • in reply to: long hex #12670

    abakobo
    Participant

    More convenient syntax for this will proabably happen, eg: $20000000L

    Is it due to parser limitations? or is it a kind of visual helper? I’d personnaly rather like to be able to use any kind of literals up to Max_Unsigned_64bit without special syntax for bigger ones.

    A 64bit enum type would be great too for bitmasking too!

    in reply to: 2018 January FFS JAM! Calling All MX2 Users! #12669

    abakobo
    Participant

    I’d be glad to participate but finishing the box2d module is my priority for this begging of 2018..

    Good Jam!

    in reply to: Mouse / Kbd disturbance? #12668

    abakobo
    Participant

    If you reach to computer limit, it’s normal that adding inputs, thus listeners calling their callback functions, will slow down the computer somehow. On my computer the code runs at 31 FPS so it’s crawling anyway!
    Again you are using a lot of canvases. this is bad practice…
    And you don’t need to Flush the main canvas at the end of OnRender, it’s done automatically. Canvas.Flush() is a greedy call, avoid it too..

    in reply to: Memory Access violation #12667

    abakobo
    Participant

    oh man! the generated image is very psychedelic! I had to jump on alt+F4!

    about your code:
    you are using two canvases, canvases slows down you computer, you’d probably will have better perfs with transform matrixes and a single canvas.

    And yes there’s a OnUpdate() event but also OnKeyEvent() and OnMouseEvent(). OnUpdate is not documented though!(will post issue). You can have a look at spacechimps banana to see an example of an app using both OnUpdate() and OnKeyEvent()

    in reply to: Compiling on Ubuntu 14.04 LTS (fresh install) #12564

    abakobo
    Participant

    let’s say you’ve unzipped your monkey-develop from github to the Desktop (which is in the home folder).

    on freshly installed Mint, I got build working typing the following, there may be some new libs to install now but it worked at the time :

    in reply to: Android will require 64bit too in 2019 #12522

    abakobo
    Participant

    It looks like the 64bit thing is for apps using some native code. Pure Java is not concerned. I think mx1 outputs Java only.

    in reply to: Box2D #12498

    abakobo
    Participant

    I’ve been working on the module a bit.

    Now wrapped (partially) the b2djson lib from iforce2d (The R.U.B.E. importer). Still have to implement images import.
    Unfortunately it uses another json lib than mx2’s but it’s not that large. And I did not want to dig into cpp to use the mx2 json module.
    The loader is compatible with the mx2 asset construct thus compatible with Android (tested).

    On the pure box2d side, I have to work on Callbacks, collisions and wrapping b2d’s generic functions to have the api fully wrapped. Buoyancy is on the list too.

    Should be continuing in January, Christmas events are taking more time that expected, as usual..

    in reply to: No way to change data prior to Main? #12424

    abakobo
    Participant

    Mmm testing it gives duplicate Main()… could be reserved to modules! will check and try to find the docs where a read this..

    EDIT: yep it’s for modules only so it can be a bit of work just for a simple init…

    But it’s great design!

    in reply to: No way to change data prior to Main? #12421

    abakobo
    Participant

    can not be indexed

    the []= operator can be user defined (it’s used in json, map,…)

    To initialize your classes you’ll have to do some of the work in a Function. But note that monkey can have several mains! You can import a .monkey2 file like init.monkey2 and in that file make all you initializations in “function main”. The main of init.monkey2 will run before the main.monkey2’s main. I think it’s the cleanest way to init you program. Or you could just have a InitGlobals() function called in main so you main remain clean..

    in reply to: Pyro 2 Open Source? #12394

    abakobo
    Participant

    I’ve asked several times Playniax to created a repo but it looks like he’s not really into Git…
    You can ask in the Pyro2 topic in the projects section. http://monkeycoder.co.nz/forums/topic/pyro-pyro-editor-for-monkey2-progress-report/

    I think the Pyro2 license allows you to create a repo but it’d be much better to fork the original of course.

    in reply to: Maximum number? #12390

    abakobo
    Participant

    here’s a sample code to test signed integers

    in reply to: Maximum number? #12388

    abakobo
    Participant

    I think the max is always the same wether it uses one or two complement or magnitude..

    You could import limit.h and get the values from there? But C++ Int is not always 32 bit?

    Unsigned is easy because they are represented the same on all machines:
    UByte(8bits) Max = (2^8)-1 = 255
    UShort(16bits) Max = (2^16)-1 = 65535
    UInt(32bits) Max = (2^32)-1 = 4294967295
    Ulong(64bits) Max = (2^64)-1 = 18446744073709551615

    For signed it is usually one bit less but can be sometimes padded.

    if not padded (if padded remove one more bit?)

    Byte(8bits) Max = (2^7)-1 = 127
    Short(16bits) Max = (2^15)-1 = 32767
    Int(32bits) Max = (2^31)-1 = 2147483647
    Long(64bits) Max = (2^63)-1 = 9223372036854775807

    some little tests would be enough to fix your different signed maxs

    in reply to: Faster way to read in pixels? #12371

    abakobo
    Participant

    Hmmm, I thought I read Mark had changed the GC…

    Oops my bad, was not aware of that! Might be unsafe to play with pointers then. Using a very local pointer should do the trick though.

    in reply to: PaperRacers Reloaded! #12362

    abakobo
    Participant

    I wrote a SVG parser, that makes everything into shapes, path segmets, lines etc. Then I triangulate that, and then DrawPrimitives()

    Sounds great! Do plan to share this at a time?

    in reply to: Faster way to read in pixels? #12358

    abakobo
    Participant

    Some small pimping..

    now debug:

    Release:

    For the “new” Tileset class I loaded a Padded png (545*18)

    Tileset2 is the original “NewVersion”
    Tileset3 is just moving color declaration outise of the loop. sometimes it has no/bad effect depending on how the loop is looped (100 times a list of each one or a list of 100 times each one)
    Tileset4 uses Pointer to read into memory (sometimes returns 0 microsec (or 500 or 501!?) not shure it work ok but looks like.

Viewing 15 posts - 166 through 180 (of 455 total)