The Entrepreneur Forum | Financial Freedom | Starting a Business | Motivation | Money | Success

Welcome to the only entrepreneur forum dedicated to building life-changing wealth.

Build a Fastlane business. Earn real financial freedom. Join free.

Join over 80,000 entrepreneurs who have rejected the paradigm of mediocrity and said "NO!" to underpaid jobs, ascetic frugality, and suffocating savings rituals— learn how to build a Fastlane business that pays both freedom and lifestyle affluence.

Free registration at the forum removes this block.

Learning C (Game Programming) Progress Thread

A detailed account of a Fastlane process...

lowtek

Legendary Contributor
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
332%
Oct 3, 2015
2,163
7,186
42
Phoenix, AZ
OK so you want to know how an engine works, I think that's awesome... but why would you choose Java?

This is not at all the right tool for the job. For game engines it's C++ or bust. You could even go straight C if you don't want to deal with all the garbage modern C++ introduces.
 

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Introduction:
Hello Fastlane Forum! I am a 19 year who is pursuing a CS degree in college with a particularly interest in game development. As I am a terrible procrastinator, and have read that accountability systems increase the odds of success by 95%, I thought I would start this progress thread. It will outline, in clear terms, what exactly I will be doing, how I will be held accountable for it, and what I plan to achieve from it.

Background:
I have been interested in game design since I was a young child. I created this thread because I have gained enough self-awareness to realize I am never going to get serious about it without radical commitment. This thread is my attempt to finally do what I've been too scared to do: actually program games instead of just dream and make pretend about it.

Requirements:

As all good challenges require rules, I will define what exactly I plan to do in this thread. In succinct terms, I must write a progress update every Wednesday describing exactly what I have learned and accomplished in game development over the last 168 hour period. In more specific language, I have a written list of requirements that must be followed:
  • I must write a weekly update on Wednesday describing what I have learned and accomplished. If I miss that window, it is evidence I am not serious about this goal and am falling behind on it. I hope if others notice this they will call me out on it.
  • I will focus primarily on game programming in low-level languages such as assembly, C, C++, and C#. As my primary objective is to become adept at programming, much of what I do will be focused around improving adeptness and proficiency in the language. I will also aim to release increasingly complex games and programs however. Look out for these as I will link them in the update thread!
  • The update must be reasonably polished. It should be grammatically correct and include images, links, and formatting so that is easy and entertaining to read. It should be personal enough so that I am honest about the struggle and how I can improve.
  • I will showcase my projects on r/gamedevexpo and itch.io when I deem them completed. The links to these updates will be linked in the appropriate update in the thread.
  • I want constructive criticism and honest feedback! How am I doing? What could I be doing different? Are the updates valuable and insightful? If I fall behind and don't post here, do me a favor and get after me on it. The whole reason this thread exists is to expose myself to rejection and actually act on my word. Not just talk more BS.

Goals:
In succinct terms, I want GROWTH. I have been stuck in a rut for a long time and by writing regular updates and gaining momentum I pray to transcend it. I know if I follow the requirements in this thread, I will improve dramatically at programming and will fill the void of uncertainty that has been a constant in my life for years now. This is the first step I am taking on a long journey. The road ahead with be treacherous and dangerous with many pitfalls along the way. But I am OK with that. The struggle is the reward. But that's enough grandiloquence, I will be back with my first update next week!
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
Last edited:

lowtek

Legendary Contributor
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
332%
Oct 3, 2015
2,163
7,186
42
Phoenix, AZ
I have decided to follow your advice here since I believe the reasoning is solid. I just watched a 45-minute video explaining why in most instances Object-Oriented Programming is bad and I came away pretty damn convinced. It is obvious to me now that programming in higher-level languages such as Java is not a long-term solution and if I ever want to fundamentally understand programming I need to learn a lower-level languages in the C family such as C, C++, or C#.

It is worth noting that I will struggle for a length of time as I am moving into entirely foreign territory with procedural programming. I have lived my entire life programming in OOP. I have read numerous books and programmed all my projects using roughly its orthodoxy of classes, objects, encapsulation, ect. so it will be the definition of a paradigm shift for me to transition to a lower-level where most of that mostly taken away and I have to deal with problems such as pointers and memory management. I am willing to risk it however because I can't stand the thought of not understanding it. I feel like otherwise I am remaining ignorant and in the dark about the intricacies of programming, and that is where the real magic happens after all.

If I may ask, do you have recommended tutorials for learning C? Any books you recommend, knowing that programming cannot be taught but only experienced? I have found a few solid resources such as w3schools and Tutorials Point (which I use for almost everything programming related). I would like to thank you for all the sage advice by the way I sincerely appreciate it.

A good introduction is "The C Programming Language" by K&R. It's a bit dated, but it's the seminal work on the topic. These are the guys that developed Unix. You can always go from that to the more modern standards and topics.

Alternatively, I've heard good things about 21st Century C. It conforms to the more modern standards and includes material on databases and web servers, etc.

Just so I'm clear, C isn't the end all be all of programming languages (every programmer should know several, anyway). It's the stepping stone to learn the fundamentals (data structures, pointers, memory management) of computer science and engineering, without worrying about all the complexity and overhead of C++.

Don't get too drawn in by books. Just learn the basics and then start trying to grok a real code base. You can check out the Quake or Doom source code on github to see what real games (cutting edge for their time) looked like.

Once you have a foundation, switch to something like C++, which is the language du jour for modern engines. You'll be able to pick and choose which features you need, because you'll understand why they were implemented.

As @Smuggo alluded to, always be sure to write high quality code. Publish it to a public form like github, and be sure to build a portfolio and a name for yourself within some programming community. Network with other great programmers, and seek out opportunities. Maybe game development works out, maybe it doesn't. But if you follow this approach, you'll be 22 with a really solid jump start on creating a business with other kick a$$ devs, or getting a solid job to spring board your entrepreneurial aspirations down the line.
 

srodrigo

Gold Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
130%
Sep 11, 2018
799
1,041
Hi @SputnicK , happy to hear that we've got another game dev on board. It's amazing that you are taking action at 19.

Learning how to make (and design) games is different to learning game programming. Make sure you are sure about what you want to learn. I would advice to use Unity or Game Maker for the former, and something lower level for the later, although if you are a relatively new programmer, I'm not sure I would go for C/C++ for now. There are also different areas of game programming, mainly engines and gameplay, and they require different skills.

OOP is not a great fit for video games, where you want to use Data Oriented Design for efficiency (look it up if you are curious, but don't worry for now), but you can still learn the basics of game programming in any language, so I wouldn't discard Java or C#.

May I suggest something simpler like Lua? There is a nice little framework called love2d, if you want to avoid the high level that an engine gives you but keep your sanity by not trying to learn both game programming and a low level language at the same time. A framework provides you with a game loop and some functions to draw, handle input, etc. You still need to code your game logic, and can even create an engine on top without getting overwhelmed by so much low-level stuff.

There are other things you your use, like Python, if you want to focus on gameplay, but I'd choose Lua, which is used in professional game programming as well. I would personally leave the lowest level stuff for later, unless you are 100% sure you want to become an engines programmer and don't really care about making actual games.

Definitely DO NOT START WITH RUST. While Rust is something to keep an eye on in the future, Rust is a very difficult language to learn. It mixes functional programming (which is a big milestone by itself) with good memory handling patterns, which sounds great in paper but once you pull your hair out by such a strict compiler that doesn't let you make (almost) any mistakes, you might get frustrated and demoralised. It will add too much friction to your game programming learning. Leave it for when you pick C++ and get tired of a messy language that also lets you shoot your own foot too much. Rust will teach you how to manage memory and safe concurrency, which is important for modern video games. But, by all means, don't start with Rust, you'll have too much on your plate.
 

Ravens_Shadow

THE TRUTH IS OUT THERE
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Read Unscripted!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
643%
Oct 2, 2012
1,244
7,994
Austin, TX
Do you want to make games or do you want to get better at Java?

If you want to make games, go download Unity or Unreal and build/release something this weekend.
Hopefully you aren't suggesting to release something to sell.

My suggestion, if you go UE4, learn C++. If you go Unity, learn C#. Forget the other languages for now. If you want to learn the future, look up Odin. It's what we are now using for our middleware that we sell to AAA game studios. Though it wont be mainstream for quite some time i'm guessing.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

masterneme

Silver Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
253%
Apr 13, 2015
333
842
I suggest you switch to C++ and start applying the new knowledge building stuff ASAP.

Take a look at this link:

The Definitive C++ Book Guide and List

If you're interested in videogames you'll have to learn even more stuff, like patterns and algorithms for game logic and the different ways game engines and other frameworks make use of the different C++ methods to build games, so it's another layer of stuff to learn.

And this takes time (a lot).

I thought about learning C too, "because it's cool", but at the end of the day finishing projects and prototypes is what will give you the learning experience you need and will teach you proper good coding practices.

Finishing and releasing titles is what you need and what will give you the competitive edge in the business, much more than reading and learning different languages.

Getting your hands dirty is what counts, solving the next problem at hand and then the next one.
 

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Update week 2/6/19-2/13/19 (WK3):
I took @404profound's advice this week and am now focusing more on "fundamentals" of C. I followed a 4.5 hour tutorial series covering the C language, some of which was review but it also covered a significant amount of material. It was a great beginner guide overall.

I also finished the essential segments (up to segment 9) of the C text adventure series I started last week. This series is extremely complex for such a seemingly simple topic and some of the implementation was outside my grasp. I think it was good practice regardless and I enjoyed following it.

Here is a link to my personal code from the C text adventure series I followed. It is a few hundred lines and demonstrates the basic proof of concept even though most of the locations and items are undefined. I used the online compiler OnlineGDB.

Links:
C Programming Tutorial | Learn C programming | C language
How to program a text adventure in C
Personal code from text adventure series

Plan for next week 2/13/19-2/20/19:
I want to focus this week on consistency more than anything. @Rabby made a very good point that programming requires daily practice, and this week (just like last week) I put it off until a couple days before my next update was due. I plan on spending at least 45 minutes every morning on programming next week so that it doesn't get put off and disregarded. In the long-term making this a habit will yield greater dividends than more intense but inconsistent methodology in the moment.

In terms of results, I will continue to learn and strive to master fundamentals of C. I will follow some more tutorial series but also attempt to practice more of what I have learned. I don't like going three weeks without displaying tenable projects of my own, so next week expect something of that nature, even if it is only as simple game simulator (such as Tic-Tac-Toe.) I saw a thread the other day on this forum stressing the importance of "showing" instead of just "telling" and I'm afraid I doing too little of the former and too much of the latter. Hope I can improve in this regard.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
Last edited:

AfterWind

Bronze Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
209%
Jul 23, 2017
76
159
26
Romania
That is incredible dude! I can't believe you created an entire 3D engine in C. I love that you did it just to improve at game programming. That is the legit method, actually mastering fundamentals and learning game engines properly. May I ask what library you recommend for 2D? I assume you recommend OpenGL for 3D. I am interested in your process: how did you get to your current level of proficiency? I think based off your results are a great role model.

I have PM'd you on the tutorial series.

I am barely passable as an intermediate in game programming but I do know a decent amount about how 3D game engines work. The 3D engine is a Minecraft clone that can't even load .obj models. It's just a prototype that never got finished.

After learning a few programming languages I quickly jumped to creating some simple 2D games (flappy bird, chess etc). I challenged myself in the final year of high school to create a Tetris (in C# with the now deprecated XNA framework) clone (whereas a simple tic-tac-toe would've been enough). That was quite a learning experience on how to build simple 2D games.

Entering university my interest shifted to 3D and low level programming. I thought they were an amazing pair. After lots of struggle with trying to create a 3D engine using C++, OpenGL and some tutorials on Youtube, before my last year of uni, I was fed up with how much I didn't understand about both C and C++. Since there was too much to learn about C++ and was the main cause of my stagnation, I challenged myself again, "develop a game engine in C".

And boy, was that a learning experience. Not only did that force me to learn concepts in C and OpenGL that I never knew I will ever fully comprehend but understand the usefulness of features in other languages (like exceptions, OOP and function overriding) that I was taking for granted.

Bottom line is, I didn't do anything special. As many of the forum members will tell you: challenge yourself (with achievable goals) and focus, focus, focus (learn 1-2 things at a time).

I hope this post didn't come out as me bragging. Many of my colleagues were asking "How did I learn all that?" and I feel like this story of mine answers it.
 

masterneme

Silver Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
253%
Apr 13, 2015
333
842
OK. I thank you for taking my post as I intended, just as a way to make you think about your decissions in a different way and more deeply.

Some people believe that when I make suggestions I'm too direct or even aggressive, I tend to forget that those people are not fastlaners but you never know how the other person will perceive what I say even here because text can't deliver the full tone of the communication.

If you still want to go the C route I suggest you invest most of your time playing with vector math and how to implement collisions between shapes. That's experience that will really transfer over when you start doing stuff with other engines.

Good luck, making games is amazing but it also is one of the most competitive industries around.
 

splok

Gold Contributor
FASTLANE INSIDER
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
174%
Jul 20, 2012
673
1,172
I am a 19 year who is pursuing a CS degree in college with a particularly interest in game development.
  • I will focus primarily on game programming in the Java language using its native Swing framework.
  • I know if I follow the requirements in this thread, I will improve dramatically at Java programming
Do you want to make games or do you want to get better at Java?

If you want to make games, go download Unity or Unreal and build/release something this weekend.
 

lowtek

Legendary Contributor
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
332%
Oct 3, 2015
2,163
7,186
42
Phoenix, AZ
I agree with you 100%. In no way is Java ideal for game engines, as prior experiences has confirmed this to me firsthand. The only reason I picked the language is because I am the most familiar with it and have a sort of emotional attachment to it. It helps that I have numerous projects I can use for inspiration so I already have a "proof of concept" when developing my engine framework.

Those are not great reasons to stick with the language however. I have known I need to branch at some point but I thought it would suffice during these early stages of development. Perhaps it is best for me to move directly to C, although I have almost no experience in it. It also intimidates me that it is not intrinsically OOP. I will think this over and might very well take your advice and transition directly to C or C++ instead of Java now. I am sure in the long-term it offers the superior advantage and that must certainly be factored.

It is worth noting that "Minecraft" was written completely in Java which gave me some hope, although it gave Microsoft such a headache that they wrote it entirely in C++ for Windows 10. I think that is perhaps a warning sign for what modern developers think of the language in 2019.

Every programmer should learn C. You will learn an enormous amount about how computers work, how to write efficient code, and how to think about algorithms clearly.

OOP most often leads to spaghetti code, and is little better than the goto messes you would see in the BASIC era. You're unfortunate to have grown up in the era where OOP is the paradigm du jour, so you can't really think outside of that box, yet.

If you want to be a badass programmer, you're gonna have to learn about procedural as well as functional programming. The different paradigms have their applications in different arenas, and there's no better place to start than procedural programming and C.

Please note that this advice only really applies because you're really young. You have plenty of time to develop this skillset, and it will pay massive dividends in the future. At least, until AI replaces programmers ;)

If you were mid thirties, and just getting started with programming, the advice would be totally different.
 

lowtek

Legendary Contributor
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
332%
Oct 3, 2015
2,163
7,186
42
Phoenix, AZ
I can't agree with that. It might be true that you can learn some basics how computer works, but you could also read some books. And how to write efficient code? Tons of people who started with C are making horrible code to read. And if they are trying to move to OOP it's getting even worse. I don't know. It might be just me but I think that "You have to learn C to code" is outdated.

Reading books doesn't mean you understand how computers work any more than it means you understand how businesses work. Some things can only be learned with experience... that includes (especially) programming.

Efficiency doesn't mean readable, efficiency means... efficiency. As in, does the job with the least amount of resources in the fastest time possible. Besides that, most programmers write really unreadable code. This is independent of language choice.

As far as the OOP comment, I don't know what you're trying to say. For most people, OOP inherently leads to spaghetti code, so arguing that going from C to OOP languages makes readability harder... well no kidding. It's a facet of how most people misinterpret OOP. Not everything needs to be a class, and sometimes it's OK to repeat yourself.

You don't "have to learn C", and nowhere did I say that.

If you want to be a code monkey, you can just stick with Javascript and call it a day. Nothing really wrong with that, and you can make a good career out of taking advantage of what other people create.

If you want to push the boundaries of software and create tools to build the next generation of stuff, you're gonna need low level languages. In that realm, C is king. There's a reason pretty much every other (modern) language, and operating system, is built on top of it.

The OP said he wanted to understand things at a deeper level, and actually program things himself. The entire point of high level languages is to keep that deeper understanding obscured from the programmer. He would be far far better off just using Unity and making a game, rather than trying to "learn how games work" by using a language that is found in a minute fraction of games.
 

Smuggo

Bronze Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
155%
Apr 13, 2018
113
175
Reading books doesn't mean you understand how computers work any more than it means you understand how businesses work. Some things can only be learned with experience... that includes (especially) programming.

Efficiency doesn't mean readable, efficiency means... efficiency. As in, does the job with the least amount of resources in the fastest time possible. Besides that, most programmers write really unreadable code. This is independent of language choice.

As far as the OOP comment, I don't know what you're trying to say. For most people, OOP inherently leads to spaghetti code, so arguing that going from C to OOP languages makes readability harder... well no kidding. It's a facet of how most people misinterpret OOP. Not everything needs to be a class, and sometimes it's OK to repeat yourself.

You don't "have to learn C", and nowhere did I say that.

If you want to be a code monkey, you can just stick with Javascript and call it a day. Nothing really wrong with that, and you can make a good career out of taking advantage of what other people create.

If you want to push the boundaries of software and create tools to build the next generation of stuff, you're gonna need low level languages. In that realm, C is king. There's a reason pretty much every other (modern) language, and operating system, is built on top of it.

The OP said he wanted to understand things at a deeper level, and actually program things himself. The entire point of high level languages is to keep that deeper understanding obscured from the programmer. He would be far far better off just using Unity and making a game, rather than trying to "learn how games work" by using a language that is found in a minute fraction of games.

Yup, I've misunderstood 'efficienty'. I guess I have to remind myself some of the english words, because I took it as granted. Sorry for that.

Also with "have to learn C". You said every programmer should learn C. I've heard a lot from old guys "You are no a real dev if you don't know C". It's just something that I don't agree with. To speak in some languages do I have to learn latin? No. Although it makes you easier to learn new. C language is showing all gut of programming and if you want to get deep into computer knowledge, maybe it's the right course, but if you want to make awesome websites, SaaS, microservices or w/e it's useless since you have to learn tons of stuff around that (frameworks ect.) and it's enough to make awesome things.

About GameDev, at least on PCs, I would go with C++ since it's still the most common used language to code games. Of course there are more things that need to be included but you can check some jobs offers and see what they require.
Anyway mastering one language doesn't make you code monkey :smile2:.

If you want to master coding, going with C is a good idea and I agree with Lowtek. I've understood it like you want to focus on creating games in Java that's why I said learing C is useless.
 

loop101

Platinum Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
161%
Mar 3, 2013
1,574
2,528
If you want to make games that you will market yourself, your greatest asset will be your *brand*, not technical wizardry. Technical wizardry is great if you have it, but a fun game does not have to have it. If you want to get a job making games, then technical wizardry will be a prerequisite.

I would suggest making a simple game with an interesting theme. Make it in HTML5, and you could be programing it within a week, and releasing it in 2 months. The technical wizardry route could take you *years* to release a game. The Game Dev Underground game makes a living making small HTML5 games, he has 0 wizardry. He did use to work in marketing, and understands it well.

I know some people in the game industry. They were always gamers first, computer people second. They are far more interested in a game's emotional beats than its frames-per-second. Constraining yourself to a simple tool will force you to focus on the game elements, rather than the technical elements. If you consider game design first, you may find whether you like programming games, or programming difficult problems.

Back in 2013, a TV show gave a pro filmmaker two Barbie Cam Girl dolls, to see how good a short he could make with them. Using one to film, and the other star in it, he made "Bad Day Barbie!". Candy Crush is a clone of the 2001 web game Bejeweled. Game engines like TWINE (text adventures) and Phaser (2D HTML5) are very simple, and allow you to start making games quickly. More creativity, less wizardry, is a viable path.

I mention this in case you primarily want to make games as soon as you can, and many of the suggestions here might require a lot of learning before you will be competent in them.

Game Dev Underground:
View: https://www.youtube.com/watch?v=RRT4XFtHbTU


Zenva Phaser 3 Course:
View: https://www.youtube.com/watch?v=eN4hr8Vum-4


Barbie Cam Short:
View: https://www.youtube.com/watch?v=HrOwLLAp6Wk


Barbie Cam Making Of:
View: https://www.youtube.com/watch?v=9VS3C183G8g
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Before I get into the update for this week I want to respond to the comments:
I am barely passable as an intermediate in game programming but I do know a decent amount about how 3D game engines work. The 3D engine is a Minecraft clone that can't even load .obj models. It's just a prototype that never got finished.

After learning a few programming languages I quickly jumped to creating some simple 2D games (flappy bird, chess etc). I challenged myself in the final year of high school to create a Tetris (in C# with the now deprecated XNA framework) clone (whereas a simple tic-tac-toe would've been enough). That was quite a learning experience on how to build simple 2D games.

Entering university my interest shifted to 3D and low level programming. I thought they were an amazing pair. After lots of struggle with trying to create a 3D engine using C++, OpenGL and some tutorials on Youtube, before my last year of uni, I was fed up with how much I didn't understand about both C and C++. Since there was too much to learn about C++ and was the main cause of my stagnation, I challenged myself again, "develop a game engine in C".

And boy, was that a learning experience. Not only did that force me to learn concepts in C and OpenGL that I never knew I will ever fully comprehend but understand the usefulness of features in other languages (like exceptions, OOP and function overriding) that I was taking for granted.

Bottom line is, I didn't do anything special. As many of the forum members will tell you: challenge yourself (with achievable goals) and focus, focus, focus (learn 1-2 things at a time).

I hope this post didn't come out as me bragging. Many of my colleagues were asking "How did I learn all that?" and I feel like this story of mine answers it.
That's quite an impressive journey! It absolutely does not sound like bragging by the way, just describing your path to where you are now. It seems to me that understanding how things work is a huge motivator for you and I really respect that kind of mindset.

When it comes to your advice to set achievable goals and focus on learning one or two things at a time, that is absolutely something I could improve on. It's really easy to get caught up in "shiny object syndrome" and never commit to one path. That's why I chose pure C, and why I want to stick with it.

I received your PM on the series, plan to go through as much as I can next week. Thanks for sharing man, you've been immensely helpful to me and I won't soon forget it.

I don't want to sound like a dick but if your objective is to work with Unity and 2D why don't you just start doing that? Your foundations come from the experience of making games AKA producing.

I thought you wanted to learn C/C++ because you wanted to use UE4, CryEngine or make your own stuff with C++ and OpenGL/Vulkan but if it's about games, learning a language that you won't be using is extra time you won't be spending learning game logic, the whole MonoBehaviour API and how the Unity Engine and its Editor works with its own strengths, weaknesses and quirks.

And not only that, Unity Technologies just started implementing ECS and is expected to see an increase in focus to Data Oriented Design instead of Object Oriented which means that if you get used to OOP you'll have to relearn the new paradigm and it will take you even more time than starting right now with their examples and documentation.

For 2D they're going big with ECS and Project Tiny because small sized 2D apps are a potential source for HUGE profits with interactive ads and social embbeded games.

So I insist that if you start producing right now you'll learn everything you need.

And if you really like 2D I suggest you take a look at the Godot Engine, they're about to release a new version and you can code with C#. It also is an OOP engine in which you organize your objects through Scenes containing Nodes with Tree based hierarchy.

You'll make a better use of your time by getting your hands dirty making a 2D platformer or a 2D ARPG, participating in game jams and sharing your work with people to get feedback.

I think you're glamourizing game design a bit too much and let me tell you what other successful professionals in the industry say all the time:

Game development is all smoke and mirrors, if a dirty looking hack gives you the functonality you want and it doesn't break the stability of the game use it, because at the end of the day the product and the experience a player gets from it (AKA providing value) is all that matters.

Edit: This thread might be relevant: NOTABLE! - What if you already know enough?
I understand exactly what you are saying here, you raise good points on why I should I transition directly to Unity 2D. I suppose one thing I should have clarified is that I do not know for certain what my long-term ambitions are in the moment. I created this thread because I'd rather start and stumble along then never start at all. Heck, my goals section in my introduction reads more like a rant then something I could aim for and achieve. So your objections are valid: I need to define why exactly I'm doing this and how I plan to achieve it. If I get caught up in the idiosyncrasies of C when I plan to transition to a game engine anyway, I can see how it appears I am romanticizing the process of game design. I do believe however that some of the other users here (namely @lowtek) have offered a solid line of reasoning on why learning low-level languages will pay dividends in the long-run, especially as I am uncertain where this journey will take me a few months to a year from now.

I wonder if I could not continue learning C (following tutorials and working on small to medium projects) and spend the rest of my time learning Unity 2D. Perhaps I will come to learn that game engines really are superior in every way, in which I would transition entirely into that domain. Again, I am chiefly interested in mastering fundamentals so that my foundations are strong enough to scale into larger and more ambitious projects. I will try to come back next week with an Unity project to show off as well. And of course look into ECS and the other technologies you mentioned. I respect your feedback and appreciate it. :)



And now to the progress update for WK4:
Update thread 2/13/19-2/20/19 (WK4):
I have less to show this time, unfortunately, in part because I been doing some reflection on what my ambitions are. There was a quote in another user's bio: "Be better by .0025% than you were yesterday and good things will happen." This is a great life philosophy.

I need to clarify something I have neglected to mention: I am living with my parents while I attend community college (I am doing a "2+2" college program where I do two years of community college and two years of university for my degree) and my father recently took a job opportunity in a different state. I learned this early enough in the year to refund classes for my Spring semester, and now I'm helping them move and thus am in a transition stage right now. The good news is that there will be more time to devote to my projects but the bad news is that in the short term there will be a week or two I will have less to contribute to this thread. Just a heads up! With that said, here is my what I accomplished:

I finally wrote a program in C, an ASCII Tic-Tac-Toe game using functions, arrays, decision trees, ect. It certainly could be developed further, with AI or perhaps an GUI interface. I tried to make the code as modular as possible, its 95 lines in all.

I also watched over half of this 2HR video on methodology of programming in C called "How I program in C." The dude has some fascinating practices like basically building his own debugger from scratch and I enjoyed watching him explain it even if much of this methodology is less implementable in my current stage.

I have been ghosting TFF for far too many hours this week. Not an accomplishment. Just a fact. :happy:

Plan 2/20/19-2/27/19:
The two things I am focusing on: learning and executing on C knowledge and beginning my journey into exploring Unity 2D. I firmly believe I can learn both at once. I have specific goals devoted to both of them below:
1. Go through as many videos as possible of @AfterWind's tutorial series on C.
2. Work on a second small project in C (most likely a File I/O program)
3. Spend a few hours fooling around with the Unity editor, follow a tutorial AND
4. Create my own small game in Unity and release it, (if things go as planned)
5. Spend all time not doing these things unplugged from electronics and my PC
 
Last edited:
D

Deleted50669

Guest
Looking forward to this thread! As a noob full stack dev I'm curious how your process will unfold.
 

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Do you want to make games or do you want to get better at Java?

If you want to make games, go download Unity or Unreal and build/release something this weekend.

Both? I know that is a cop-out answer. I actually took a college course on creating interactive levels in Unity 3D and it is definitely a powerful engine, I assume likewise for 2D.

I suppose the primary reason I favor a programming language over an engine is that I like to have complete control over the project. I enjoy the process of programming and really understanding how everything works at the fundamental level. Perhaps this is a mistake. I know that a result-oriented approach would favor using an engine that already does most of the legwork, such as Unity 2D.

In the end, however, my primary objective is to grow my ability to program at a higher level. I believe that in this light using a language is the superior method. I don't want to delude myself into thinking that struggling for the sake of it is a prosperous ideal however so I still might download and work on Unity 2D on the side to learn and experiment from it. If I find it to be superior in every way to programming in Java than I am more than willing to pivot and transition completely into it.

I hope this makes sense! I definitely have a conflict of interest on this matter and I am completely open to changing my mind.

404profound said:
Looking forward to this thread! As a noob full stack dev I'm curious how your process will unfold.

Thanks man! I don't have everything figured out now but I hope that these weekly updates will provide some insight into the process of learning programming and game development.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
Last edited:
D

Deleted50669

Guest
I agree with you 100%. In no way is Java ideal for game engines, as prior experiences has confirmed this to me firsthand. The only reason I picked the language is because I am the most familiar with it and have a sort of emotional attachment to it. It helps that I have numerous projects I can use for inspiration so I already have a "proof of concept" when developing my engine framework.

Those are not great reasons to stick with the language however. I have known I need to branch at some point but I thought it would suffice during these early stages of development. Perhaps it is best for me to move directly to C, although I have almost no experience in it. It also intimidates me that it is not intrinsically OOP. I will think this over and might very well take your advice and transition directly to C or C++ instead of Java now. I am sure in the long-term it offers the superior advantage and that must certainly be factored.

It is worth noting that "Minecraft" was written completely in Java which gave me some hope, although it gave Microsoft such a headache that they wrote it entirely in C++ for Windows 10. I think that is perhaps a warning sign for what modern developers think of the language in 2019.
Or you could go Rust, which I hear is a happy medium. Although Unreal runs C++ and Unity runs C#
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

Smuggo

Bronze Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
155%
Apr 13, 2018
113
175
Every programmer should learn C. You will learn an enormous amount about how computers work, how to write efficient code, and how to think about algorithms clearly.

I can't agree with that. It might be true that you can learn some basics how computer works, but you could also read some books. And how to write efficient code? Tons of people who started with C are making horrible code to read. And if they are trying to move to OOP it's getting even worse. I don't know. It might be just me but I think that "You have to learn C to code" is outdated.
 

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Every programmer should learn C. You will learn an enormous amount about how computers work, how to write efficient code, and how to think about algorithms clearly.

OOP most often leads to spaghetti code, and is little better than the goto messes you would see in the BASIC era. You're unfortunate to have grown up in the era where OOP is the paradigm du jour, so you can't really think outside of that box, yet.

If you want to be a badass programmer, you're gonna have to learn about procedural as well as functional programming. The different paradigms have their applications in different arenas, and there's no better place to start than procedural programming and C.
If you want to push the boundaries of software and create tools to build the next generation of stuff, you're gonna need low level languages. In that realm, C is king. There's a reason pretty much every other (modern) language, and operating system, is built on top of it.

The OP said he wanted to understand things at a deeper level, and actually program things himself. The entire point of high level languages is to keep that deeper understanding obscured from the programmer. He would be far far better off just using Unity and making a game, rather than trying to "learn how games work" by using a language that is found in a minute fraction of games.
I have decided to follow your advice here since I believe the reasoning is solid. I just watched a 45-minute video explaining why in most instances Object-Oriented Programming is bad and I came away pretty damn convinced. It is obvious to me now that programming in higher-level languages such as Java is not a long-term solution and if I ever want to fundamentally understand programming I need to learn a lower-level languages in the C family such as C, C++, or C#.

It is worth noting that I will struggle for a length of time as I am moving into entirely foreign territory with procedural programming. I have lived my entire life programming in OOP. I have read numerous books and programmed all my projects using roughly its orthodoxy of classes, objects, encapsulation, ect. so it will be the definition of a paradigm shift for me to transition to a lower-level where most of that mostly taken away and I have to deal with problems such as pointers and memory management. I am willing to risk it however because I can't stand the thought of not understanding it. I feel like otherwise I am remaining ignorant and in the dark about the intricacies of programming, and that is where the real magic happens after all.

If I may ask, do you have recommended tutorials for learning C? Any books you recommend, knowing that programming cannot be taught but only experienced? I have found a few solid resources such as w3schools and Tutorials Point (which I use for almost everything programming related). I would like to thank you for all the sage advice by the way I sincerely appreciate it.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
Last edited:

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Update Thread 1/23/19-1/30/19 (WK1):
Back with my first update! I am sorry I have not responded to everyone, I sincerely appreciate all the feedback. It has been very valuable to me, all of it. As I said in my earlier post, I have decided to focus on learning C as I believe that it teaches fundamentals of programming methodology in a way that will be foundational to utilizing higher-level languages later down the road. At that point I can upgrade to something better oriented for long-term development. With that said, I have my central efforts below listed:

1) I watched and took notes on lecture 1, 2, 3, and 4 of this Stanford lecture series on "Programming Paradigms" centered around the language C. This has been valuable to me as the professor explains how C operates from the smallest element of memory management. I would be lying if I said I understood all of it, but I understood enough to get the basic meaning behind most of what was covered. This has been a valuable asset and I plan on continuing it.

2) I began writing a text adventure (brilliant idea I know) in C using an online compiler called OnlineGBD. I wish I could say I finished it but I am still struggling with writing modular code and using pointers and proper memory management. I also just realized that I basically need to learn the proper algorithms around implementing decision trees as that is basically what a text adventure is as the player decisions scale exponentially and become more and more convoluted. Here is the code, look at it if you must, but I have yet to really get anywhere with it.

3) I have started to reference and read through the excellent C resource on Tutorials Point. It, along with Stack Overflow, has helped me numerous times in explaining basic concepts (such as copying char arrays and using pointers correctly, for example). There is an adage that "Google already has answered all your questions" and that holds true for me 98% of the time when debugging or problem-solving. I plan to hone in on actually applying knowledge by working on projects and using these resources when things don't go as planned (and things never go as planned).

Plan for next week 1/30/19-2/6/19:
I would like to watch four to six more lectures on the Stanford series, but focus less on understanding everything and more on getting an idea of the basic methodology being presented. I think I am trying too much to memorize how everything works, when really I should focus on learning the basic idea and refresh myself on the concept if and when I need to implement it in a project. I also aim to have my Text Adventure project roughly completed, implementing modular code, a scalable algorithm, with combat and a few addition interactive elements if possible. I think I will post it on r/reviewmycode to get feedback once it is completed. Last of all I plan to continue looking through code examples and guides on Tutorials Point. As I said it an insightful reference manual.

I hope I am making the right first steps here! I will back with another update next week on 2/6/19. As always, I am open and eager for honest feedback. : )
 
Last edited:

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
Update Thread 1/30/19-2/6/19:
I have been struggling to no end. The lecture series I have been following is starting to go over my head. And I am not doing so well on my first project in C. In more detail below:

1) I watched lecture 5, and 6 of the Stanford lecture series. The professor is going into detail on topics such as linear search and the stack, which are things I probably shouldn't attempt to tackle yet. I wasted a few days trying to understand these lectures, to little success. It's hard for me to take interest, my eyes just glaze over watching this series at this point. I take the L for this one.

2) I decided the best way to learn how to create a proper text adventure was to follow a tutorial, and I found this one which I've about halfway completed. I think text tutorials suit me more than formal lecture series, to be honest. You live and learn. I am going to use what I learn from this tutorial series to actually create a finished project. (hopefully) I am tired of just consuming content instead of creating it.

Plan for next week 2/6/19-2/13/19:
I did not make the progress I desired this week. Not going to sugarcoat it. I think I got too caught up in passive consumption instead of active creation. But I have a short attention span. I like to create things more than just learn about them. I tried this week to just follow tutorial series but quickly became bored. And instead of pivoting I just tried to persevere through it.

I think next week I need to focus 100% on programming. No lecture series. No BS. Just learning and fooling with code. And hopefully I can finish something, however small or insignificant. I am embarrassed how much time I wasted this week. I had some personal issues to resolve and that was part of the problem. Expecting next week to be different, for my sanity if nothing else.
 
D

Deleted50669

Guest
Update Thread 1/30/19-2/6/19:
I have been struggling to no end. The lecture series I have been following is starting to go over my head. And I am not doing so well on my first project in C. In more detail below:

1) I watched lecture 5, and 6 of the Stanford lecture series. The professor is going into detail on topics such as linear search and the stack, which are things I probably shouldn't attempt to tackle yet. I wasted a few days trying to understand these lectures, to little success. It's hard for me to take interest, my eyes just glaze over watching this series at this point. I take the L for this one.

2) I decided the best way to learn how to create a proper text adventure was to follow a tutorial, and I found this one which I've about halfway completed. I think text tutorials suit me more than formal lecture series, to be honest. You live and learn. I am going to use what I learn from this tutorial series to actually create a finished project. (hopefully) I am tired of just consuming content instead of creating it.

Plan for next week 2/6/19-2/13/19:
I did not make the progress I desired this week. Not going to sugarcoat it. I think I got too caught up in passive consumption instead of active creation. But I have a short attention span. I like to create things more than just learn about them. I tried this week to just follow tutorial series but quickly became bored. And instead of pivoting I just tried to persevere through it.

I think next week I need to focus 100% on programming. No lecture series. No BS. Just learning and fooling with code. And hopefully I can finish something, however small or insignificant. I am embarrassed how much time I wasted this week. I had some personal issues to resolve and that was part of the problem. Expecting next week to be different, for my sanity if nothing else.
It sounds like you may have taken C fundamentals for granted. Following a tutorial is one thing, but you won't retain an understanding of why the code is doing what it's doing that way - especially if you don't have a firm understanding of the fundamentals. I fell into the same trap when I first got into javascript, and JS is far easier than C. Once I focused on mastering the fundamentals the rest came pretty easy.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.
D

Deleted50669

Guest
I definitely am missing some of the fundamentals, at least when it comes to memory management. IDK what to do besides follow some very basic tutorials or purchase a book. Any ideas? I was thinking that messing with code might be a good idea to get a better idea of the language, but perhaps that learning should be supplemented with simple tutorials so that I really understand it.
I don't know anyone personally who works in C, but I have seen word floating around from C developers recommending these books:

Prata’s C Primer Plus 6th Edition (or whatever the latest edition is when you read this)

Kernighan & Ritchie’s The C Programming Language 2nd Edition (aka K&R2)

I think what really helped me was using new concepts to build simple things. Once I was able to apply a concept to my own idea it became clear how it worked.. or StackOverflow made it so.
 

Rabby

Legendary Contributor
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Read Unscripted!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
319%
Aug 26, 2018
1,924
6,130
Florida
For a text-based adventure I would use something simple and friendly, like Ruby or Python or Lua. I know you want to learn C, but it's worth noting that you don't need memory management and low level control for a text game.

What you may want to do, eventually, is write the things that need to be fast in C, and glue them together with one of the three above (or something quick and high level).

PS: Whatever language or project you do, try to do a little every day. If 2-3 days go by and you have to go back to it, the load on your brain is heavier. Even if it's only 15-20 minutes on a really busy day, play with code and do something. Once you've been writing code for a few years, you can walk away for a few months and your hands will still know how to code without you, but right now you need to keep it fresh in mind.
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

SputnicK

Contributor
Read Fastlane!
Read Unscripted!
User Power
Value/Post Ratio
133%
Dec 23, 2017
18
24
For a text-based adventure I would use something simple and friendly, like Ruby or Python or Lua. I know you want to learn C, but it's worth noting that you don't need memory management and low level control for a text game.

What you may want to do, eventually, is write the things that need to be fast in C, and glue them together with one of the three above (or something quick and high level).

PS: Whatever language or project you do, try to do a little every day. If 2-3 days go by and you have to go back to it, the load on your brain is heavier. Even if it's only 15-20 minutes on a really busy day, play with code and do something. Once you've been writing code for a few years, you can walk away for a few months and your hands will still know how to code without you, but right now you need to keep it fresh in mind.
You are so right, being inconsistent is absolutely a problem for me. I go a few days at a time where I don't program and then have to make up for it on the back-end. I suppose I should make it a daily ritual, perhaps first thing in the morning. I know programming is the kind of activity that really requires dedicated time to focus and get into the rhythm and I tend to get very distracted.

As for writing the game in the C language is absolutely an obstacle but it's one I'm willing to deal with in the short term. If I face more challenging obstacles I would think about using Java instead, which I am very familiar with compared to C.
 

lowtek

Legendary Contributor
FASTLANE INSIDER
EPIC CONTRIBUTOR
Read Fastlane!
Summit Attendee
Speedway Pass
User Power
Value/Post Ratio
332%
Oct 3, 2015
2,163
7,186
42
Phoenix, AZ
I suggest you switch to C++ and start applying the new knowledge building stuff ASAP.

Take a look at this link:

The Definitive C++ Book Guide and List

If you're interested in videogames you'll have to learn even more stuff, like patterns and algorithms for game logic and the different ways game engines and other frameworks make use of the different C++ methods to build games, so it's another layer of stuff to learn.

And this takes time (a lot).

I thought about learning C too, "because it's cool", but at the end of the day finishing projects and prototypes is what will give you the learning experience you need and will teach you proper good coding practices.

Finishing and releasing titles is what you need and what will give you the competitive edge in the business, much more than reading and learning different languages.

Getting your hands dirty is what counts, solving the next problem at hand and then the next one.

I generally agree with you, and switching to C++ isn't a stupid suggestion. My only complaint there is that it's easy to get lost in the complexity of the language. Which C++ are we talking about here? The various iterations are so disjointed that it's easy for a novice to get confused.

IMHO it's easier to learn the fundamentals of programming with a language that isn't so complex that even the people who wrote it don't comprehend it fully.
 
D

Deleted50669

Guest
Update week 2/6/19-2/13/19 (WK3):
I took @404profound's advice this week and am now focusing more on "fundamentals" of C. I followed a 4.5 hour tutorial series covering the C language, some of which was review but it also covered a significant amount of material. It was a great beginner guide overall.

I also finished the essential segments (up to segment 9) of the C text adventure series I started last week. This series is extremely complex for such a seemingly simple topic and some of the implementation was outside my grasp. I think it was good practice regardless and I enjoyed following it.

Here is a link to my personal code from the C text adventure series I followed. It is a few hundred lines and demonstrates the basic proof of concept even though most of the locations and items are undefined. I used the online compiler OnlineGDB.

Links:
C Programming Tutorial | Learn C programming | C language
How to program a text adventure in C
Personal code from text adventure series

Plan for next week 2/13/19-2/20/19:
I want to focus this week on consistency more than anything. @Rabby made a very good point that programming requires daily practice, and this week (just like last week) I put it off until a couple days before my next update was due. I plan on spending at least 45 minutes every morning on programming next week so that it doesn't get put off and disregarded. In the long-term making this a habit will yield greater dividends than more intense but inconsistent methodology in the moment.

In terms of results, I will continue to learn and strive to master fundamentals of C. I will follow some more tutorial series but also attempt to practice more of what I have learned. I don't like going three weeks without displaying tenable projects of my own, so next week expect something of that nature, even if it is only as simple game simulator (such as Tic-Tac-Toe.) I saw a thread the other day on this forum stressing the importance of "showing" instead of just "telling" and I'm afraid I doing too little of the former and too much of the latter. Hope I can improve in this regard.
Great job with the progress!

Now that you see the rigor involved to learn C, what are your thoughts? Do you see yourself going down this path, which requires patience and serious time investment, or is your priority making money in the short-term? This is a non-trivial question, because which one you commit to will likely determine if you should fully invest in C. You obviously realize how involved low-level programming is now, so I'm curious if you still have the same strategy.

- Cheers
 

daru

Bronze Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
172%
Feb 11, 2017
166
285
Earth
Hey, couldn't access your code. Put it on Github or Bitbucket perhaps?
 

AfterWind

Bronze Contributor
Read Fastlane!
Read Unscripted!
Speedway Pass
User Power
Value/Post Ratio
209%
Jul 23, 2017
76
159
26
Romania
Here is a 3D game engine I created in C using OpenGL and standard stuff that is used for a game engine with the goal to learn as much as possible regarding game programming. I also have a lot of C tutorial videos that explain how to do certain operations while helping you understand the why behind it. Feel free to PM if you're interested (don't want to spam here) or have any specific question.

It's a great idea to start with a basic text adventure game. Work on that, get it to a semi-finished product while also understanding C and continue challenging yourself. Step it up to a 2D game then a 3D game. Whether it's a 2D game or 3D game that you'll be working with you will have to understand the basics behind game engine if you want to focus and grow the community of a few games in the future.

There is great money (and success) to be made in the game development industry but it takes a ton of patience and hard work, as most things here. (some examples of great games that required exemplary : Factorio or Path of Exile in which the amount of thought that was put into them is insane, not just in the game itself but the community too and it shows).
 
Dislike ads? Remove them and support the forum: Subscribe to Fastlane Insiders.

Post New Topic

Please SEARCH before posting.
Please select the BEST category.

Post new topic

Guest post submissions offered HERE.

Latest Posts

New Topics

Fastlane Insiders

View the forum AD FREE.
Private, unindexed content
Detailed process/execution threads
Ideas needing execution, more!

Join Fastlane Insiders.

Top