Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a smooth animation using C# Windows forms?

due my school project I must create a game using Windows forms only..

I have decided to create a 2D racing game. So now I need to move the car image. To move it I tried to animate the car with the KeyDown event, however the animation is really Faltering.. So is there any other way to create animation? or is it possible to soomth it somehow? (For the car I use a PictureBox that Docked to the form and in its paint event im redrawing the car in the right window positions.)

like image 318
HuMMeR-SI Avatar asked Jan 24 '13 11:01

HuMMeR-SI


People also ask

How do you make a smooth 2D animation?

Inbetweening is used to make a smooth animation by adding additional drawings between two frames. For example, if you want to create a bouncing ball scene, you should draw transitional frames between the first scene where the ball is on the top and the second frame where the ball is on the ground.

Can C# be used for animation?

Animation is a very important feature of games. In this article, Lance Talbert shows you how to add animations to your Unity project that take advantage of C# functions.

Does OpenGL support animation?

OpenGL is a cross-language, cross-platform API for rendering 2D and 3D Vector Graphics. Using this, we can make a lot of design as well as animations.


1 Answers

This post should solve your issues: simple-animation-using-c-windows-forms

He details how he went around coding animation in a windows form and covers some of your questions.

If that doesn't solve it, look up using some XNA libraries as Freeman said.

like image 80
Kobunite Avatar answered Sep 28 '22 09:09

Kobunite