c0d3r9

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • in reply to: Change the View Offset #15207

    c0d3r9
    Participant

    Okay i would use the “draw-only-the-visible-tiles” way that i have.
    It´s not bad and the speed is every time the same because its even the same tilescount wich are visible.

    in reply to: Change the View Offset #15204

    c0d3r9
    Participant

    Take a short look into it.
    You draw the visible area of the tilemap.Thats the way i know.
    I thought there is a way to draw all and then to scroll with the camera across the complete area.

    in reply to: Change the View Offset #15198

    c0d3r9
    Participant

    Your upload is 0kb.The file is empty 😉

    I take a look at the codebox later and delete the comments.
    To hot here to read this atm.
    Thanks

    in reply to: Change the View Offset #15190

    c0d3r9
    Participant

    Haven´t time to code the last days.and its to hot 😉

    In short, imagine you have a tilemap wich is drawn complete and then have a size much bigger like the screen resolution.
    With the “view offset” you can change the position of the rectangular view was shown on screen.
    I.e. a map width 5000px and height 2000px.
    The start view offset is 0, 0 then the view represents  from 0 to screenwidth, 0 to screenheight.
    If you now change this offset i.e. 100px on the x position now you see 100 to screenwidth+100.
    Its like a 2d camera.
    You have a big tilemap(or one big image) and you can move the “cameraview” across this map.

    I hope I could explain it well.
    My link from sfml explain it as best i think.

    in reply to: about monkey2 internals #15174

    c0d3r9
    Participant

    Thank you three.

    (to search across all files in an folder i use now notepad++)

    Can i deattach tabs from TED to a second screen? Haven´t try it.If yes i have to drill holes in the wall and build a bracket for my second screen.

    The reason why i ask for the sources was that i would know what methods are called automatic like OnMeasure, OnRender and so on.
    I have a new question.
    I see some classes in examples wich contains OnRender() methodes.
    Are they called automatic to?
    Or is OnRender only called automatic in the main class?

    in reply to: Change the View Offset #15157

    c0d3r9
    Participant

    Imagine i have a tilemap.
    Each tile 64x64px and the map is i.e. 500×500 tiles.

    The view offset change the area that shows the tiles depend from the resolution.
    Note: i would draw all tiles in this case.

    Like camera movent in 3d.u know?
    In 3d i can sprites positioning on screen coordinates and then there are worldcoordinates for the 3d world.

    Imagine a 3d plane for the tilemap and with the camera movement i can scroll around the tilemap.

    Or i have to calculate the tileposition for each tile every onrender.(and so i need to draw only the visible tiles)

    Here an explantation from sfml.better to understand: https://www.sfml-dev.org/tutorials/2.5/graphics-view.php

    Edit: i found

    Maybe thats what i need.
    Test it if i have time

    in reply to: Phoenix USC #15140

    c0d3r9
    Participant

    But curved of course 😉

    in reply to: Question to App.RequestRender() #15126

    c0d3r9
    Participant

    I wrote “i thought”. I understand it now.

    in reply to: 3D Starfield Example #15098

    c0d3r9
    Participant

    Nice and always helpful to learn the basics of the language.

    in reply to: OnMeasure() called auto? #15086

    c0d3r9
    Participant

    Thank you.
    Atm i only need a virtual size i.e. 800×600 in a bigger window with same aspect ratio of course.

    Bit by bit, I understand more of Monkey2.

    in reply to: Question to App.RequestRender() #15078

    c0d3r9
    Participant

    I thought in another direction.
    I thought all what is inside onrender object was send automatic to the rendertarget.

    Now i´m a little bit confused.
    I thought in onupdate i handle some things i.e. keyboard input and so on.
    And then in onrender all inside that object was send to the render target via RequestRender.

    onrender and onupdate are only a shell.

    Theoretical i can do that all in onupdate or onrender?
    Or are there differences between these both classes?

    edit: i see “override” so i have to look inside these both classes.

    edit2: after a few hours of reading the reference maze 😉 i understand the internal of M2 a little bit more.
    onrender is a view methode.onupdate was a user created class for better code reading and handling.

    in reply to: Question to App.RequestRender() #15072

    c0d3r9
    Participant

    I found timer 😉 i forget that the online help is not state of builds.
    And timer is going another way like i thought…but very useful.

     

    App.RequestRender: in short all code in the onupdate methode was rendered with the call of App.RequestRender.Right?

    Independend where RequestRender stays in the code.

    in reply to: Question to App.RequestRender() #15068

    c0d3r9
    Participant

    okay but all code that comes after App.RequestRender() would be render on the next App.RequestRender().
    Is SwapInterval = 1 set by default?

    Btw. what timer commands can i use? (sorry but the language reference freezes often my Firefox)

    in reply to: Getting rid of the cracks? Tile Images… #15051

    c0d3r9
    Participant

    with https://www.codeandweb.com/texturepacker

    its possible to add a pixelborder to each tile on the spritesheet.

    only a little tip

    in reply to: Can't build with MSVC2017 #15020

    c0d3r9
    Participant

    Thats only a few lines.Not to much work for us 😉

    Btw. anyway i have to change

    to

Viewing 15 posts - 1 through 15 (of 19 total)