-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plans to continue? #5
Comments
Would love to help grow this engine. @carlbirch has taught me a lot about C++ and coding from the ground up. I found a way to change the for loop in the map.cpp to accept more than 99 tiles. If you're creating a large landscape that has more than 99 unique tiles, the engine currently cannot process that. I can do a pull request later and share how I did it. Also, any idea on how to switch maps? Was thinking of doing this in the game.cpp's update function. Can we do this based on 'playerPos' which is the Vector2D we created? We're using it for collision, just don't know how to check it and switch the map based on the player's x,y. Something like: |
Yeah there is a simple yet efficient way of doing that in just 2 lines of code in the TextureManager:
That way we render only the Sprites or tiles that are visible. |
Ah, I do see how this works. It's useful if I have one very large map. that spans an area larger than the window size. I was thinking more along the lines of loading new maps from external files. Similar to how I said above, 'if player is at the edge of the screen, then load the second map'. |
Yes, you could do something like that but you could have unnecessary disk reads. You can surely load a huge map and just render the visible part easily. You could change the map using your method as well just remember if you load a new map you should deactivate the old tiles. |
Maybe forking this and merging patches would be a good idea? |
Hi @carlbirch do you have any plans to continue with the series? I learned a lot from your videos and the game is looking sharp.
If you are not planning to continue with the development, do you have any guidelines that you suggest on how to follow with the Game?
The text was updated successfully, but these errors were encountered: