Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I know it's not the right choice, but I'm trying to make a game engine in wpf.
and naturally this game engine should have a 2d camera.
Does anyone know how to do this?
I will move it with the right and left arrow keys

What I have tried:

change canvas margin but very bad
Posted
Updated 25-Aug-21 9:48am
v2

You should investigate the use of Unity (game engine) - Wikipedia[^]. But if you want to do all the work yourself then you need to post a much more specific and detailed question.
 
Share this answer
 
I think you mean a panning / zooming "view port". Not much use for a (3D) camera in a 2D game.

I suggest a ScrollViewer for the main "map"; and ViewBoxes for scaling individual ui elements when necessary.

Use a DispatcherTimer for creating your "frames".
 
Share this answer
 
Comments
Muhammed Yeter 25-Aug-21 13:18pm    
thx :)
(True)but , i asked how to make zoom (sry, wrong writed, *how to make zoom* )
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900