juliocmfj

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 47 total)
  • Author
    Posts
  • in reply to: Draw image #10152

    juliocmfj
    Participant

    Roger, Mark. I will be more cautious when using unsigned values. I’ll make the necessary changes to the code right now. And again, thanks for the explanation.

    in reply to: Draw image #10150

    juliocmfj
    Participant

    I’m trying to understand by now why this happened. If I was drawing based on Int coordinates and not UInt. UInt is serving exclusively only to get the ID of the tiles, and nothing more. But… That’s it.

    in reply to: Draw image #10147

    juliocmfj
    Participant

    Why there is no tile with negative ID. So I found it unnecessary to use an Int.

    in reply to: Draw image #10145

    juliocmfj
    Participant

    I made several basic mistakes there. Lol

    That’s the problem coming from BlitzMax, which did not give you that many options. There it only had Int and not UInt. It was all more “simple”.

    I hope Ia do not make the same mistakes and thank you for the tips.

    in reply to: Draw image #10143

    juliocmfj
    Participant

    Got it. So I must have done something wrong, but I’ll try to explain my logic behind this rendering loop.

    In the first For Local y, I put it as UInt because it only traverses the array with the id’s of the images that represent the tiles, since there is none with id under 0. And so I did with For Local x.

    When drawing the tiles, I did this based on: x of the tile(float) + x of the loop For(UInt) * tileWidth and in the same way with the y coordinate.

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

    in reply to: Draw image #10141

    juliocmfj
    Participant

    Nerobot, this makes all sense, however, the only change I made was in the x and y of the TiledLayer class, I was Int and I moved to Float.

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

    in reply to: Draw image #10139

    juliocmfj
    Participant

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

    Anyway, I appreciate everyone’s help and it’s the tip for anyone who has the same problem.

    in reply to: Draw image #10136

    juliocmfj
    Participant

    Great tips. I still have not much knowledge about Monkey2. Only now have I realized the rean benefit of overloading an operator…

    I’ll folow some of your tips.

    On the cut in the images when moving to the left or top corner, if I use the canvas.Translate(x, y) method, the same “error” does not happen, however everything on the screen is moved, and I want to do just scroll of the map (in this case).

    in reply to: Draw image #10134

    juliocmfj
    Participant

    I forgot to send the whole project. Below is the link
    https://drive.google.com/open?id=0B2lZ_pN3kwOJVm9fTVBqT1hWWTQ

    in reply to: Draw image #10122

    juliocmfj
    Participant

    I can post codes here. I get an illegal operation error. The I send the two code via download.

    https://drive.google.com/open?id=0B2lZ_pN3kwOJLUJTYWUwUjA2dVk

    in reply to: Tiled #10111

    juliocmfj
    Participant

    I’m not able to post the codes here, so the download link is going.

    https://drive.google.com/open?id=0B2lZ_pN3kwOJZTFvbFVsTEtqa0U

    in reply to: Tiled #10110

    juliocmfj
    Participant

    I was able to interpret the basics of the Tiled system. Below is the code and below an example use.

    Remembering that I am developing these classes for my personal use, I only share those who like information and learn new things.

    The code still needs a lot of change and there are unnecessary things in it…

    Comments:

    • All files, including the images used on the map, must all be in the same folder.
    • Does not load any additional information, such as: custom properties, objects, animations… Only layers without any custom configuration.
    in reply to: Tiled #10105

    juliocmfj
    Participant

    <p id=”tw-target-text” class=”tw-data-text tw-ta tw-text-small crayon-selected” dir=”ltr” data-placeholder=”Tradução”><span lang=”en”>Another step completed.</span></p>
    You can now load a map composed of multiple images and any number of layers. In this map I use 4 layers and 4 different images in the same project.

    When it is “usable”, I will send the download link. Remembering that I am only doing this for study purposes. I indicate the version of Playniax.

    in reply to: Tiled #10052

    juliocmfj
    Participant

    First test completed successfully!!!!

    I was able to load and display a map with a layer and a tileset associated with it.

    In the image is the print with the map being executed and the main code.

    in reply to: Tiled #10018

    juliocmfj
    Participant
Viewing 15 posts - 16 through 30 (of 47 total)