Let's say the screen is 1024x768x24. That would take 1024*768*3==2359296 bytes, or 2.25 MiB. Hardly what I would call "massive". |
It's not massive in terms of size, but massive in terms of dealing with. As opposed to making the new programmer manage an ASCII based engine that refreshes the screen only when it recieves input from the user, and is only around 10000 "pixels" in size. The windows.h version for a screen 1024x768 would use 786,432 pixels every game loop (which in the case of video games is usually around 60 frames per second, translating into saying "This pixel is this color" 47,185,920 times every second, roughly 5000x that of the ASCII engine). It makes managing and actually seeing what their programming is doing on the screen a little easier.
DO NOT REINVENT THE WHEEL. |
This tutorial is designed to give those people who want to make the tools that people like you use to build your games and programs a place to get their footing, as well as teach people what most graphics libraries are doing for you. Some people start out programming to build programs and games, some people start out programming because they want to build engines like the Unreal Engine, and some people start out programming because they want to create or work on libraries like OpenGL. I'm in the small group of people who want to be in the latter 2 groups, thats why I use C++ and not java. I know I'm not alone in this, however when it comes to tutorials I have found that almost everyone writing tutorials assumes you want to be in the first group. I think you missunderstand my motives, it's not to reinvent and try to replace the wheel, its to teach people how the wheel works on a basic level so I'm not just telling them to wave their magic wands and saying "DO" and letting the little faires under the hood of the car take over (I think this metaphore is getting out of hand). Now if you want to argue that graphics engines deal directly with the video cards and drivers, however true it might be, I don't believe I will be writing a tutorial on that any time soon =P
DO NOT BUILD A CAR IF YOU DON'T UNDERSTAND THE ENGINE ;-)
Aren't you kinda new to this whole programming thing to be writing a tutorial?
|
What makes you think I'm new to programming? I've been programming hardcore in c++ for about 2 years now and playing around in it since I was around 12 years old (6 years ago). I've built matrix engines, collision engines, vector algebra engines, a ASCII graphics engine (which I'm now going to write the tutorial on) and more. I've also built 2 full video games handled using c++ and a graphics library:
1. A Pong game with 2 play modes, classic (self explanatory) and arena mode where you and your opponent are in a circular ring and you can move around the outside of the ring blocking your opponents movements.
2. Letter Bricks - A brick breaker game where, in liue of dropping powerups, broken bricks drop letters that you collect with the paddle. The game keeps track of what letters you've collected and displays them next to the playing area. After breaking all the bricks it brings you to a "Wheel of Fortune" like game where you have to spell as many words with the letters you collected as you can. It imports the entire unabridged english dictionary.
I'm new enough to remember what It was like starting out using tutorials and always wondering "how does this engine do this?", but seasoned enough to say "this is how".