• Announcements

    • Brentonator

      Forum Rules (Please Read)

      Hello everyone and welcome to the No More Room In Hell Forums! We greatly appreciate your interest and support. Please feel free to begin post and become a part of this community. But please make sure that you read and understand the following rules so things can stay as clean and as orderly as possible around here. These rules are expected to be follow by any and all members at all times. Disobeying these rules will result in disciplinary action by a moderator. #1. Off color remarks are acceptable but can be deemed inappropriate at the discretion of the moderators. #2. Flaming and disrespecting other members of this community or this mod is strictly prohibited. #3. Please do not post links relating to warez or illegal downloading. #4. No offensive content is to be posted (gore, dead babies, porn). #5. Please do not spam topics to increase your post count. #6. No excessively large signatures. Signatures that violate this will be modified. #7. Signatures are not to be used as a spamming tool. If your signature's sole purpose is to annoy or distract other members, it will be removed. #8. Please do your part to be as friendly, respectful, and helpful to anyone and everyone on this forum. #9. Your posts may be removed at any time at our sole discretion. #10. Remember the terms of your registration...a copy is posted below but may not represent the latest version of our terms of use. #11. No advertising other communities or products. Have fun.
Sign in to follow this  
Followers 0
Slippery-Q

Programmers

9 posts in this topic

Any tips for a guy teaching himself how to code?

edit: To be more specific, I'm teaching myself C++. Recently, I've become interested in game programming, so I've downloaded Visual Studio 2010 Ultimate SP1 as my API, and I'll be working through the Source SDK 2013 singleplayer v. All of this is for experimentation really, seeing as how I'm not entirely too sure as to what I am doing.

https://developer.valvesoftware.com/wiki/SDK_Docs

I'll be using that as a reference. But either way, anything you guys could tell me to give me a push in the right direction?

Edited by Slippery-Q

Share this post


Link to post
Share on other sites

yes this

85611ev.jpg

but in all seriousness im sure some of the programmers here have some tips

Share this post


Link to post
Share on other sites

well, i do have an extensive list of tutorials/websites at my disposal. i also had a friend of mine rent me a book from his college campus. learning C++ isn't going to be the issue, anyone can do it with time. i'm looking for personal insight, technique, applying what you learn to making a game (though, not sure if that just comes naturally after getting a good grasp of the language), etc.

Share this post


Link to post
Share on other sites

The most important thing I can recommend for programming is to learn the logic.

I don't mean the statements such as "if", "while", "switch" and all the other ones. I mean, how do you logically approach a problem and solve it. There can be (and most of the time are) different ways to solve a problem with a program. While coding games may not look like a problem, there are many sub problems in them. Efficiency and simplicity are the best ways to go, sometimes one has to be sacrificed for another.

For example, we want to make a NPC which acts like a zombie (fitting subject isn't it?). We could go ahead and make it, but what if we wanted to make different types of them later on? Can we just make a template and move on from there, or do have to start all over again? Now, the problems you will solve will vary from language to language, and engine to engine. Maybe you have to write some UI, which you should be able to change around quite a bit without too much pain.

This leads to the second most important thing, the standards you write your code at. Spaghetti code doesn't help anyone. If you can work your logic out, say call a central function to manage which entity to spawn, it will make things look cleaner. It will make your life a whole lot easier not just for you, but if you ask someone for help.

The best way is to learn from the ground up. Knowing how things generally work then moving on from there. Autoit is a great language to learn the flow of programing, as it is a mix of BASIC and C/C++. I wouldn't recommend diving right into C++, it will eat you up. Java influenced C++ (and the other way around), and if you don't give Autoit a shot, I would try a bit of Java. Once you know one language, things generally fall into place.

Edited by dark_st3alth

Share this post


Link to post
Share on other sites

What your trying to do will be hard because of the hl2 source code object orientation is complicated and poorly commented code everything is a black box. Even when you use the visual studio debug breaklines to break down the logic of whats happening you will be drilling down into blackboxes. Its gonna be impossible for you unless you have alot of time to burn to compile and see loading screens just to test whats going on.

I suggest learning about the basics like , binary, algorithms, syntax, pointers,data structures (i.e Linked lists ), algorithms, and programming paradigms functional vs object oriented then you'll be able to even begin to understand the hl2 source code.

Share this post


Link to post
Share on other sites

You won't find an experienced programmer here to talk to you. We have only 2 and even the artist on the team have a hard time talking to them. lol

Also what your trying to do will be hard because of the hl2 source code object orientation and poorly commented code everything is a black box. Even when you use the visual studio debug breaklines to break down the logic of whats happening you will be drilling down into a blackboxes. Its gonna be impossible for you unless you have alot of time to burn to compile and see loading screens just to test whats going on.

old sport...

sorry i had to

Share this post


Link to post
Share on other sites

Also what your trying to do will be hard because of the hl2 source code object orientation and poorly commented code everything is a black box. Even when you use the visual studio debug breaklines to break down the logic of whats happening you will be drilling down into blackboxes. Its gonna be impossible for you unless you have alot of time to burn to compile and see loading screens just to test whats going on.

This is what happens when you play with an SDK and not the full engine -- there's only so far you can drill down. "Object orientation" is a good thing though. Any code you see these days (besides C, etc) will be object-oriented. Source SDK is definitely poorly commented and documented though, so I can't say I'd exactly recommend it as a starting point for just learning C++.

I'd definitely recommend trying to get a solid understanding of C++ first before trying to do much in the way of game development with it. Especially if it's your first programming language. There's a lot to C++ that you have to deal with that you don't necessarily have to in other languages (manual memory management, pointers, pointers, pointers) so it may be a bit overwhelming to learn it all at once.

But, for getting into game programming (not necessarily modding, which , definitely start small. Think about the smallest project you think you can do, and go smaller than that. A lot of common suggested starting points are things like text-based adventure games, pong, tetris, breakout, etc. Granted, I started game programming with modding, and it really short cuts around a lot of the things you would normally have to learn how to do -- a lot of the base game functionality is there so it's a matter of learning how it's already structured and modifying it / expanding on it.

One thing that I think Source is a bit outdated on that you will find a major difference if you try learning Unity (which uses C#) or UDK (which uses UnrealScript) is that Source still uses the old inheritance model (e.g. a CNMRiHPlayer is a CSDKPlayer is a CInfectablePlayer is a CBaseCombatCharacter is a CBaseAnimating is a CBaseEntity etc etc etc), and most modern engines (and I wouldn't be surprised if this includes Source 2) use entity-component model (e.g. a "nmrih player" has a position/velocity component, a mesh component, an infection response component, a movement input component, etc). So I'd definitely recommend reading up on that if you want to get into non-modding game dev (I started playing with an entity-component version of Pong if you want to check it out: https://github.com/essbuh/pong)

I realize that my thoughts are pretty much all over the place so I apologize if none of this makes any sense as I'm currently running on exactly zero sleep and two coffees (so far).

Share this post


Link to post
Share on other sites

Think about the smallest project you think you can do, and go smaller than that. A lot of common suggested starting points are things like text-based adventure games, pong, tetris, breakout, etc.

Yes and learn the basics first.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0