-1

I was wondering how to continuously generate random sized panels with C#, withut using a game engine. What I want to do is to make a Flappy Bird remake. So what I need the random sized panels is for the obstacles. How would I do that?

I haven't tried anything yet, because I don't know what to do. One of the things I really don't know how to do, is generating panels with code. I don't really wan't to use a game engine. So is there a way to do it without one?

Image Explanation

Ralf Bönning
  • 14,515
  • 5
  • 49
  • 67
  • Generate a random number between 0 and the height of your container (minus the height of the hole) using the random number generator (instantiate the Random class). Use that as the start position. – ProgrammingLlama Dec 26 '16 at 20:25
  • 2
    Questions that ask "where do I start" are typically too broad and are not a good fit for this site. People have their own method for approaching the problem and because of this there cannot be a _correct_ answer. Give a good read over [**Where to Start**](//meta.programmers.stackexchange.com/questions/6366/where-to-start/6367#6367), then address your post. – rene Dec 26 '16 at 20:33
  • Describe to yourself what you know about the obstacles: Same distance, minimum gap, gap position delta, same width. Basically you need two numbers that change for each pair of obstacles and two more that are fixed over the whole area.. – TaW Dec 26 '16 at 20:58

1 Answers1

0

If you want to start game programming I would recommend learning a simple api and yes you don't want to use an existing game engine because that would be overwhelming for a beginner. What you need to do is to learn how to create a window, receive user input, load images and render them. You can approach in 2 ways, since you know C# perhaps you want to program applications mainly for windows if that is so then consider learning the windows api to do these things before you even start thinking about what your game.

The simplest way to do this is to use a wrapper for system calls such as SDL, SFML or Allegro. There is many more but from what i know these are the simplest to use and they should also have keybindings for C#. The advantage of this approach is that it will be much simpler to get started and also your game will be cross platform.

Once you learn how to render images to screen and move them around the solution to your panel question will become obvious.