Help with programming a 2D game engine

Started by
5 comments, last by Oluseyi 17 years, 4 months ago
Im currently programming a 2d game engine with C# and Managed DirectX. I have made the engine but it doesnt seem to be really helpfull for me when im writing a game... can someone please point me in the right direction as to how to make a successfull 2d game engine in c#? thanks
Advertisement
You'd probably be better off just using the XNA framework. (V 1.0 is supposed to come out mid December). I'm sure you've heard this before, but if you want to make a game rather than an engine, find a good engine and start working on your game. It takes far far too much time working on both (I can attest to this personally).
Ive heard about XNA but I would prefer at least for now to stick with Managed DirectX as I am familiar with it. Also I want to make a 2d game engine because I am planning to make a few games (one a sidescroller and one a turn-based RPG and possibly more in the future).
thanks
Write a game first, then derive an engine from that. Only by creating an actual game will you get a good grasp of what you need in the engine. If you don't know how to write a simple game yet, then there are many tutorials around.
You see i'm not a beginner in game programming. I have made a few games before just based on DirectX, no game engine. Now that i've started a project, I thought it would be good to make a game engine so that I can use in the project and in other projects in the future. I just need some help with developing the engine.
thanks
From my experience with FlatRedBall, my #1 piece of advice I can give when developing an engine is: Let necessity be your guide.

Lots of people try to make game engines, and to be honest, they turn out to be garbage because they didn't consider the purpose of the engine - GAMES! As Kylotan suggested, make a game. Any time you need something new like movement or collision or input, stop for a moment, and think how you could code it so it will not only be useful for you in this game, but also in the next game you make, and the game after that. It takes a bit of time and experience to be able to make these kinds of "predictions", but the exercise is well worth it regardless of how much engine work you've done before.
Quote:Original post by Roof Top Pew Wee
Any time you need something new like movement or collision or input, stop for a moment, and think how you could code it so it will not only be useful for you in this game, but also in the next game you make, and the game after that. It takes a bit of time and experience to be able to make these kinds of "predictions", but the exercise is well worth it regardless of how much engine work you've done before.

Take it a step further: write it to solve your current problem, then refactor it. At some point you'll want Subsystem A to interact with Subsystem F, or something like that; that's an excellent opportunity to refactor.

This topic is closed to new replies.

Advertisement