Simple Falling objects Game

Started by
1 comment, last by lithos 12 years ago
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.
Advertisement
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.
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.

This topic is closed to new replies.

Advertisement