How do I generate random sized panels? C#

160 views Asked by At

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

1

There are 1 answers

1
Black White On

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.