Advertisement

Beginning with game development

Started by January 18, 2018 07:49 PM
10 comments, last by desiado 6 years, 10 months ago

Some good advice here.  So you are saying that you want to learn more visual/graphics programming.  To draw 2D sprites, text, lines and any type of graphics to the screen you have to use some kind of graphics library or engine.  This is because your c++ program won't have access (pointer) to screen memory as such because your program will be one of many running on a multitasking operating system.  Don't worry if you don't understand what I just said, the point is you HAVE to use a graphics library or engine of some description.

The lowest level graphics libraries you can use are OpenGL or DirectX.  This is what professionals/Old-school people like myself use.  If you are new to graphics programming or just want to do 2D sprite stuff then you will soon find these libraries and their API's totally confusing and overwhelming.  This is because they are more designed for creating complex 3D games like Call of duty etc.  Also if I was making a new game tomorrow, I would not be writing code with direct calls to the DirectX API.  This is because I've done this on previous projects and built up my own mini game engine or graphics library.  So you probably want to by-pass this creating your own graphics library (for now anyway).

So the logical step for beginners is to use a 'already done for you' game engine like Unity (it's probably been said a millions times in these forums). Alternative is just to use some C++ 2D graphics libraries like:- Allegro, SFML, SDL or oxygine.  I'm sure they are many more. 

Saying that another alternative for total beginners using C# is to use GDI+.  If you are using Visual studio then simply create a WPF or Windows Form App.  From here you can use the Microsoft GDI+ library which comes as standard with C#.  It's pretty simple to create a window with a graphics area to draw lines, rectangles, images (sprites) and even text.  This will get you use to programming games with graphics.  Now GDI+ is nothing like OpenGL or DirectX, but it's a good beginners option just to play around with some graphics.

Many tutorials online, I saw these tutorial video series where someone is creating a mole shooter game with C# and GDI+ (nothing to do with me btw)

https://www.youtube.com/watch?v=o8hPt8s_bwU&t=28s

This topic is closed to new replies.

Advertisement