Sign in to follow this  
Boreli Kuleile

Simple Falling objects Game

Recommended Posts

Hi,

I'm new in c# but have a bit of knowledge in c++ and vb.net. I have a small assignment here of writing a simple game in c#. The game consists of a single player who can move left or right. It also has the raindrops which appear in random position in the top quarter of the screen vertically.

The objective of the game is to move the player so that he dodges the raindrops. If raindrop touches the player then the game is over.

I understand c# code but my problem is on making the graphics/animation. How can I create the falling raindrops and the player moving horizontally across the screen?

Your help is highly appreciated.

Share this post


Link to post
Share on other sites
You mean programmatically? or artistically? If you mean coding... try something like updating the position of the player setting the x, y coords. Same with the raindrops. If you mean artistically then I am at a loss do your best in paint I guess or you can find a sprite sheet online.

Share this post


Link to post
Share on other sites
From a RL perspective the raindrops would already be at terminal velocity so there is no acceleration on them.

From a VB perspective the easiest way to do gravity will tend to just have a position and a velocity variable. then subtract a set amount from velocity(downwards) every frame/step/tick of your game. Essentially normal physics equations you would expect to use are for finding something at a set point in time rather than anything else. This method is a little nieve, but will work after you analyze what your system already designs for.

The above is for acceleration. Terminal velocity will just be subtracting from position.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this