nerobot

Forum Replies Created

Viewing 15 posts - 376 through 390 (of 805 total)
  • Author
    Posts

  • nerobot
    Participant

     

    in reply to: Draw image #10178

    nerobot
    Participant

    Pseudocode:

    Note:

    • inside of FOR I removed check for visibility because now we go through visible tiles onle
    • also I removed creating New TiledTile() – why to create instance if we can just draw ‘plain’ image
    • also I replaced xy.X & xy.Y with xy.x & xy.y – because of access to fields (small chars here) is faster that to properties (properties equals to method call)
    in reply to: Draw image #10176

    nerobot
    Participant

    Working with constant-sized tiles grid you can calculate starting and ending indexies for x and y outside of double for-for.

    Then your ‘for’ loops will go through visible tiles only.

    in reply to: Ted2Go IDE #10173

    nerobot
    Participant

    Now hiding errors list when building modules.


    nerobot
    Participant

    This post was blocked: https://pastebin.com/dGu4VM2S

    Post’s formatting presented on screenshot – there are two code blocks.

    in reply to: Draw image #10144

    nerobot
    Participant

    Does this seem to make sense or dir I really make a mistake?

    Using float for coords is OK.

    My posts above just answering for your

    and, like magic, the problem ended. I do not know if it’s a Monkey2 bug, but for me, that should not happen.

    Answer is – there is no magic, it’s just a type conversion rules. 🙂

    in reply to: Draw image #10142

    nerobot
    Participant

    Right, and you got Float+UInt=Float types conversion. The only (one) Float in expression make whole result as Float.

    And with float map get its negative coords.

    The x and y found in: map[x, y], are UInt, since there is no image with id less than zero in the array.

    yes, they are, but them “break” you expectation because of type conversion UInt+Int=UInt

    in reply to: Draw image #10140

    nerobot
    Participant

    The problem here is mixing UInt with Int.

    When you sum int with uint you got uint which have non-negative value only.

    If you replace all UInt with Int (including “for local x:uint = …”) your map will render normally.

    in reply to: Draw image #10135

    nerobot
    Participant

    Ok, will see.

    And there are my advices 🙂

    https://yadi.sk/i/F5Q1FaJ53MV4cb

    in reply to: Draw image #10133

    nerobot
    Participant

    There is no playable demo in archive – no images and map file. So I can’t test it.

    (My advices about your code were eaten by antispam, even splitted by parts)

    in reply to: Ted2Go IDE #10129

    nerobot
    Participant

    It totally depends on info given from mx2cc.

    Looks like it take a portion of errors and can take more after we fixed current ones.

    in reply to: Pyro 2 Questions #10103

    nerobot
    Participant

    You are passing a class to scene not an instance of a class???

    Just press F2 on ScreenManager and jump to declaration. You’ll see that

    yes! mx2 allow us naming variables the same as classes, so we can be surprised sometimes. 🙂

    (this lang feature prevents me to do code jumping properly – especially in such cases)

    in reply to: Ted2Go IDE #10102

    nerobot
    Participant

    Hm. Need to deep into canvas+image life. Quick look give me canvas’ constructor with argument type of Image. When we resize codemap – we must resize image, so our current canvas became invalid, and we need to create new one for our new image.

    in reply to: Ted2Go IDE #10100

    nerobot
    Participant

    Canvas is a local variable here – it should be GC collected when exit from render – render occur only when textview has changes.

    Image live until resize codemap – by moving / show / hide debug consoles.

    EDIT: I tried to store canvas as field method and recreate only when image, have no appreciable effect.

    in reply to: Ted2Go IDE #10097

    nerobot
    Participant

    Just read Hezkore’s bit – is the new codemap in ted2go master branch? If so I’ll pull it ASAP and include in the next release.

    Yes. Current master is v2.5 with new codemap.

Viewing 15 posts - 376 through 390 (of 805 total)