Forum Replies Created
- 
		AuthorPosts
 - 
		
			
				
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.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.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.
ThanksHaven´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.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?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
Monkey1Canvas.Viewport:std.geom.RectiMaybe thats what i need.
Test it if i have timeBut curved of course
I wrote “i thought”. I understand it now.
Nice and always helpful to learn the basics of the language.
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.
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.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.
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)
with https://www.codeandweb.com/texturepacker
its possible to add a pixelborder to each tile on the spritesheet.
only a little tip
Thats only a few lines.Not to much work for us
Btw. anyway i have to change
Monkey1MX2_MSVC_DIR=${ProgramFiles(x86)}\Microsoft Visual Studio\2017\Community\VCto
Monkey1MX2_MSVC_DIR=${ProgramFiles(x86)}\Microsoft Visual Studio\2017\Enterprise\VC - 
		AuthorPosts