Advertisement

Is using an existing library, actually cheating?

Started by December 24, 2013 10:44 PM
24 comments, last by 3Ddreamer 11 years, 1 month ago

It is not "cheating"(actually it really depends on your perception of cheating, so for you it may be cheating depending on your goals). I would advise learning C++ "in depth", http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list , pick a good book and finish it (most important pick a book that you like the style of writing and way of explaining). If you feel so bad about using SDL or whatever you can always try DX or OpenGL, while you would probably need a lot of time to learn it, I believe it is worth it, especially if you like the technical side of things. It's gonna be harder and take a lot more time and effort than using some engine to make a game though. However, if that doesn't seem that bad to you, and you like the journey as much as the goal, you can always opt to go for DX or OpenGL - it's pretty interesting and you learn a ton of things along the way. There are plenty of tutorials on the net (along with the DX SDK there are beginner tutorials in the documentation too):

http://rastertek.com/tutindex.html

http://www.braynzarsoft.net/index.php?p=DX11Lessons

http://www.opengl-tutorial.org/

http://www.arcsynthesis.org/gltut/

And plenty of good books:

http://www.opengl.org/documentation/books/

http://www.amazon.com/Practical-Rendering-Computation-Direct3D-11/dp/1568817207/ref=sr_1_1?ie=UTF8&qid=1387966970&sr=8-1&keywords=direct3d+11

http://www.amazon.com/Introduction-3D-Game-Programming-DirectX/dp/1936420228/ref=sr_1_2?ie=UTF8&qid=1387966970&sr=8-2&keywords=direct3d+11

A word of warning though - you should learn C++ well before doing that, otherwise I believe it will be too hard learning both DX/OpenGL while learning C++. You'll probably also need some basic knowledge of math (and hopefully working with DX/OpenGL you'll start liking math even more) - for example matrix transformations, vector operations etc., and if you decide to delve even deeper sooner or later you'll need some calculus, tensors, spherical harmonics etc.(basically you'll need some math that is needed in physics).

I never understood the reasoning. You'll always use something others made. If it's not libraries, it's the platform API or something else.

You're not allowed to be a programmer unless you program on a circuit board and CPU you carved out of bamboo and a bar of soap. laugh.png

Advertisement

I never understood the reasoning. You'll always use something others made. If it's not libraries, it's the platform API or something else.

You're not allowed to be a programmer unless you program on a circuit board and CPU you carved out of bamboo and a bar of soap. laugh.png

My thoughts exactly.

Is it cheating to use DirectX or OpenGL rather than attempting to program directly to every possible configuration of video card? That is what games in the 1980's and early 1990's needed to do, writing directly to hardware memory and switching memory banks, until standards like VESA drivers came around to unify the graphics models.

Is it cheating to use the Windows API rather than writing your own multithreading library? That is something the original DOOM engine needed to do, and several other games followed the example, to get improved performance and interactivity.

Is it cheating to use internet socket libraries rather than writing your own code that manages dialup or assorted network cards? It was common in the 1980's and 90's for individual games to require support for several common modem command sets, including Hayes and USR dialects, in addition to a wide range of network card dialects.

Is it cheating to use libraries for joystick or other controller input rather than polling the hardware yourself and sampling the hardware directly, as was common in the past? Each game needed to manage their own dead spots, calibration, and mapping of input streams to axis or button values.... And the values could change based on how much computing you did between polls, so you needed a solid interrupt frequency for it to work.

Is it cheating to use libraries for audio, rather than coding directly for each of the many types of sound cards out there? In the bad old days you had to choose from a long list of audio systems, including several SoundBlaster and TurtleBeach and assorted other brands of cards. Audio card autodetect was spotty at best, and sometimes picking the wrong card could crash your computer.

The answer to all of these, of course, is a resounding NO! It is not "cheating" to use other technologies that enable you to do greater work. Just as it is not "cheating" to use a backhoe to dig a trench, or a dump truck to haul gravel, or a vehicle to travel long distances, or the postal service to deliver mail rather than hand-delivering it yourself.

If your goal is to write a game, then do so; don't waste your time re-inventing level loaders, asset management, animation loops, audio systems, rendering systems, input systems, and all the rest. Failing to do that (for any reason other than education or genuine business need) is foolish if your goal is to create a game.

Exactly, be like water, assume the form of what will get things done.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Hi,

Cheating is in effect only if one acts in violation of license or has not permission to do so.

Using, with license, an already existing library or libraries is extremely common. Some game developers might be surprised how much of the game engine source code or game source code for a popular AAA game comes from libraries created previous by other parties or the same game development company.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

I understand the thought process behind feeling like you're maybe somehow cheating or not being as good a programmer by using a bunch of libraries, but you aren't, really. If anything as you learn more and more you'll begin to figure out where those libraries don't suit your needs and where starting from scratch may be better both for you and the productivity of your project.

I like to think of libraries as code that some other person or people put a bunch of work into, like you wouldn't make a car from scratch you'd at least buy the metal and some of the parts, the wheels from somewhere. If anything you should prefer to use library code where it would not be more work to implement it than roll your own.

With the exception of things like direct3d or opengl you might be a bit surprised how often you actually will just prefer to write your own stuff due to it being less restrictive and faster to implement, but of course that varies a lot depending on the thing.

Instead, reverse your thinking. If anything you should be considering all these other libraries to be tools, if you can't find the right tool, well that just means you make one, if you can, or if you find a tool that may fit the job, see if you can make use of it. After all, those people spent all that time writing that code, why let their work go to waste if it can suit your needs?

Advertisement

... like you wouldn't make a car from scratch you'd at least buy the metal and some of the parts, the wheels from somewhere.


You'll certainly not buy your metal (carbon fibre, aluminium) from 'somewhere' if you're a car company ... but i get what you're saying.

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32

--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy

I guess just choose libraries and technologies that you would be proud of using and would look better on your CV.

For example, I imagine a programmer would rather have a game written in OpenGL and C++ rather than RPGMaker2000.

Whereas an artist or game designer would have no problem with using the less "technical" option because their skill lies on the actual content of the game instead rather than the implementation.

Plus, after a while, a lot of libraries that you will use, you will start to understand how you could re-implement them. You will also realize that your time is better spent on other things ;)

I only suggest reimplementing something if you can either make it better, or if you cannot agree with the license it is originally under. For example, one of my side projects is to reimplement the core Unity 3D engine because although I like the API, I cannot accept the online-activation requirements of the original product and feel I can also make it better by providing a native C++ API instead of C#/UnityScript.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

Some great insight here. Everyone who answered here actually got what my concerns are. I want to be technically skilled in the point that I can tackle any problem and be self-sufficient. I don't intend to program the low-level stuff every time I make a game, I just want to have an idea about how it's done, and that's the point where I get frustrated with myself. I am going to use libraries, engines, and just focus on the game, but I would like to make my own mini-engine (not as powerful Unreal Engine) because i find joy in programming and would love to be recruited in a professional company. Reinventing the wheel might be counter-intuitive, but it might also be necessary learning progress, the same way a doctor will study anatomy hands-on instead of just using read material.

But as you said, I guess this is not cheating, it's just making my life easier! Thank you!

Reinventing the wheel might be counter-intuitive, but it might also be necessary learning progress, the same way a doctor will study anatomy hands-on instead of just using read material.

But the doctor needs to know anatomy to be able to practice his profession at all. That's not the same with programming. You don't have to know the internals of all the libraries you use, although it can be helpful.

This topic is closed to new replies.

Advertisement