Good afternoon all!

As an exercise to help keep my coding up to date, and to try new things, I figured I'd make a 2D topdown RPG. A basic dungeoncrawler. Now, I've come across a great deal of tutorials for console RPG's that do the same thing, but none of them have an actual graphic side to it.
Since I'd really like to keep it in pure C# (without adding DirectX/OpenGL/XNA/whatever) I already figured I'd have to solve a lot of things that gaming plaforms and languages have built in.
For example, instead of a collision detection, I figured I'd use RectangleF which I'd set to the size and location of a PictureBox in combination with IntersecsWith(). This is all working really well, and as fast as I'd like it to be. But then I hit a bit of a bump in the road...

If I'd like to use a fairly large map, I'd have to create, design, and calculate, a great deal of Rectangles (so the player doesn't move into walls, or other things I'd like to add).
Is there a better way to do this? Am I overlooking something dreadfully obvious? Or would anybody know of a way better method of implementing this?

Any help would be much appreciated!


Oh, sidequestion:
Is it possible to add properties to predefined C# classes? In this case adding a bool to RectangleF so I can see if the player is allowed to move to that tile.

Thank you very much for the answer!

Using the exclude function I might be able to whip up something that doesn't require a ridiculous amount of bruteforce coding.

Level design is still hard coding at the moment. Still need to figure out how to make the computer design something at random, but making sure that all paths can be walked upon. ...You wouldn't happen to have any clues on that do you?

I'm not that much into gaming, but I guess you could desing a random path by using the Random class :)

Hmmmm... you would have to work with a Form. Seems impossible :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.