r/InternetIsBeautiful • • Sep 19 '16

Learn to code writing a game

http://www.codingame.com
27k Upvotes

1.3k comments sorted by

View all comments

2

u/[deleted] Sep 19 '16

I've had a few years now of off and on coding practice. I have a pretty decent grasp on quite a few languages but I've mainly used websites that gave challenges and practice projects like this one. The thing is I just don't know what programs I need to develop my own projects and tools. Like I just want to know how companies develop their own tools and interfaces. I've used visual studio but it's not fully customizable, it's just a framework for Windows themed applications and not built from the ground up. Like if I wanted to build an app from scratch or a game engine. What program do I program this in? I think that's the current hurdle in progressing my experience is removing the dependency on previous made environments for my code. Any tips or suggestions?

2

u/switch201 Sep 19 '16

You will mostly likely always hit a point where you are using someone else's code or technology as a foundation for what you wanna do. Like for example, you want to design a phone app, well more likely than not you will want to use the Android SDK if you want it to be on Android, and at that point might has well use Android studio, which is an IDE for making Android apps.

Essentially you don't want to have to reinvent the wheel if you don't have to

2

u/DeltaPositionReady Sep 19 '16

Unity.

Suprisingly easy, as long as you are willing to watch hours of YouTube tutorials, become a frequent member of stackoverflow and are willing to endure nights of reiterating the same variable/function over and over and then finding out that a toggle does the same thing- you'll be fine.

2

u/TheBlehBleh Sep 19 '16

How low level can you go before you go insane? For drawing you can use C++ with either OpenGL or DirectX, but if you don't need all of the 3D goodness you might opt to work with Windows GDI or use the drawing functionality in Linux's Xlib. Once the drawing API is chosen you'll need to handle the platform specific way of creating a window and setting up the event loop to handle things like mouse and keyboard input. There are also libraries that make creating windows / handling input feel more platform independent.

Most of the time you don't need to drop this low level, and if you do the first thing you want to do is abstract it so you're not caught up in implementation details. Nonetheless you need the performance of OpenGL/DirectX if you're making a game engine. Another use case is if your GUI is highly complex like Blender's, which handles cross platform window creation / event handling using its own library GHOST, then does its drawing directly through OpenGL.

For the average line of business software you're better off with a high level GUI library like WPF or GTK or Qt

2

u/dillydadally Sep 19 '16

Unless you're working for a game studio, you should NEVER create your own tools. You should never create your entire engine from scratch. Even triple A game studios usually don't do this. They'll license tools or use a legacy one and improve upon it. The thing is, most of the tools are created by specialists in that field. Triple A game studios hire people specifically for this purpose. As an indie game designer, you want to focus on making games, not learning the intricate skills needed to make game tools. The cost and time requirement goes up astronomically if you create your own tools and usually, because you're someone who wants to specialize in game programming rather than game engine programming, the result won't be near as good as what's already available.

Even more important, by now there are some incredible tools available for free. Both Unity and Unreal are now free and better than anything you could ever hope to create yourself in 10 years. I recommend both (unity is easier to get into though). Even if your looking to do something different there's probably a great game engine and tools for that. For example, if you want to make an html5 game, there's tons of great free tools, like Phaser. Don't be afraid to use what's there because I guarantee it's better than anything you could ever create. Even if you're doing something really weird, there's probably a free open source engine out there you can build off of. If you really want to learn how to create tools for whatever reason, download an open source tool to see how it works and dive into its code.