WPF C# Tutorial - Move Rectangles with Keyboard Events and Timer events in visual studio

preview_player
Показать описание
In this tutorial we will learn how to make a object move in 4 directions using the keyboard with wpf and c# inside of visual studio. Most games have this movement and we will most certainly make use of this movement for games development in wpf and c#. for this tutorial we will focus more on the moment for the player and also animate another box that will move between the borders from left to right. The player character will move up, down, left and right also we will need to stop the character when it hits any of the 4 borders. We will be using our trusted canvas element inside of the wpf format and for the first time use dispatcher time which is kind of same as the timer as used in the windows form games development examples. Hopefully you find this tutorial insightful and inspires you to make something cool with it.

There are lot more tutorials on wpf coming soon so stay tuned and happy programming.
Рекомендации по теме
Комментарии
Автор

I have a question what's the best to make games with C# but without unity game engine

lordofkeyboards
Автор

Hi, instead of moving the objects, do you know how to rotate the objects with keyboard?

heyitsmi-_-mi
Автор

Why my square behaves like cursor when is mooved? It lags after pressing gey and after that it just starts to move continuously.

Davidcz
Автор

Thank you for another amazing video.
I had a question about WPF. How can I dynamically change the content of textblock in WPF.

DasturlashniOrganamiz
Автор

Thank you for the work. Is there source code somewhere?

shinkobayashi
Автор

hi, can you plz do a video showing how to do a board game on unity, where can the character choose to go or not to the other way? like a square with a line on de midle where they walk on it based on a dice movement..it would be really amazing ;v;

oystercam
Автор

What is the difference between keyup and keydown?

Cursein
Автор

why you write 'go... == true' if you can write 'go...' and all.
... - left, right and more.

pravo_volyn
visit shbcf.ru