How does coding work?

Status
Not open for further replies.
Well I dont understand how to install it. I do NOT HAVE FUCKING SPACE. I NEED THE SMALLEST FUCKING EDITOR!!!!!!!! WHY CAN NOBODY FUCKEN JUST SAY WHAT THE SMALLEST coder. Sorry if I soud mean. I just want to do it and get it over with.
 
First off. Act maturely. Second... If you don't have enough HD space, then you shouldn't be coding since you needs lots of it for the source code, the compiler, the IDE, the libraries, any backups you make, etc.

Now, for SRB2, it shouldn't use more than around say 300MB at most which is nothing.
 
Well I dont understand how to install it. I do NOT HAVE FUCKING SPACE. I NEED THE SMALLEST FUCKING EDITOR!!!!!!!!
So you didn't even notice that what you are asked to install in this article isn't even an editor? Just forget about coding until you have a clue what you are doing.
 
You type random numbers and stuff. It looks like 04 3e jh d3 or something. It is hard.

Silly Zap. Hexadecimal only streches from 1-F, J & H are not valid.

Thankfully though in the modern world the basic machine language is given abstractions, going all the way from assembly language to FreeBASIC (FreeBASIC is the first compiled to binary implementation of a fairly high level programming language I can think of, Java and such compile to their own special bytecode, and so abstract the machine language of a fictional processor that exists only in software).
 
Last edited:
IIRC, SRB2 was written in C.
WEREHOG, if you've never programmed before, DON'T EVEN TRY. This isn't where you can just randomly jump in and modify code without knowing how, you HAVE to KNOW C (Or whatever language if I'm wrong)!
kthnxbai
 
I'll just say this: "knowing C", or in other words, becoming familiar with its syntax, is a very small part of what you need to accomplish before you can make any tangible modifications to SRB2. Much more important is learning the various programming paradigms (which are agnostic to the actual programming language) and becoming familiar with SRB2's inner workings.

A programming language is only a set of tools which a programmer uses in order to perform actions which lead to certain goals. A painter needs not only a brush and paint, but also to know how to use them, and what to use them for.
 
I'll just say this: "knowing C", or in other words, becoming familiar with its syntax, is a very small part of what you need to accomplish before you can make any tangible modifications to SRB2. Much more important is learning the various programming paradigms (which are agnostic to the actual programming language) and becoming familiar with SRB2's inner workings.

A programming language is only a set of tools which a programmer uses in order to perform actions which lead to certain goals. A painter needs not only a brush and paint, but also to know how to use them, and what to use them for.

Thank you for making quite possibly the best post in the topic. I can say that if you were to be dropped head first into the source code without C knowledge but with extensive knowledge of SRB2's file formats, DeHackEd, how to modify SRB2 outside of the source code, and even maths skills, will be far more helpful than going in with an extensive knowledge of C. In fact, dealing with compilers and IDEs and libraries is almost a skill in itself.
 
IIRC, SRB2 was written in C.
WEREHOG, if you've never programmed before, DON'T EVEN TRY. This isn't where you can just randomly jump in and modify code without knowing how, you HAVE to KNOW C (Or whatever language if I'm wrong)!
kthnxbai
How you do think SRB2 began as? Without Stealth's help with C programming, SSNTails moved to Doom Legacy. From the Halloween demo to v1.04, everything was coded by him alone. He said he didn't had any knowledge of C until he simply kept editing the code bit by bit.

What you need is patience. For example, if you want to change the HUD, then try to use Dev's Search feature to find it. Eventually you'll see it in st_stuff.c. Try to learn how it works, and try to edit it in some way.
 
...I don't even know what to say now. If you don't have any clue what coding even is, why did you think you could do it? Seriously, learn to code and you can answer that question for yourself. The way you're acting up here is, in all honesty, stupid.
 
What is the diffrence between socing and coding?
Morph ST: said:
Well, quoting the wiki S.O.C. stands for Sonic Object Configuration. It is a basic "language" for addons which can (among other things) call functions that were implemented by the developers into the source code to help users to create their own mods. If you are not familiar with programming imagine a function as a seperated work instruction for the program which will be executed by the program each time you call it.
The obvious benefit of this method: If you know what the functions are doing you can modify the game without knowing anything about coding or programming at all (even though it might help sometimes :-p).



And here some advice for you:
I am assuming (sorry if I am wrong) you are still going to school and are between 10 and 15 years old. School education makes most pupils think that knowledge can only be acquired if someone else is teaching you. However, not later than you are moving on to college you will realize that nobody else is responsible for your knowledge than you. In the working life people expect you to learn for yourself. It is ok to ask for help if you have trouble figuring something out just don't expect anyone to do the work you should be doing yourself.
Yes coding can be complicated and is counterintuitive for most people. Coding is basically a concept that is derived from propositional logic and the binary numeral system thus making it a mathematical concept. If this stuff would be easy people would not went to college to study informatics or mathematics.



Regarding your "how do I turn my code into an exe"-question:
This process is called compilation. To compile the changes you have made you will have to recompile the whole srb2-project. The exe that will be created will contain the complete data structure of srb2 AND your modifications.
To do this you will have to install a C-IDE and open the Srb2.dev file via this IDE. If you do not have enough disk space, time or motivation to get all relevant components and to learn about C-programming and SRB2's data structure, well your bad. There is no easy way to do it.
 
Hey Morph, you're not up to date! ;P


SRB2 Wiki said:
SOC stands for Sonic Object Configuration. It is a basic "language" for addons which can (among other things) call functions that were implemented into the source code by the developers to help users to create their own mods. If you are not familiar with programming, imagine a function as a work instruction for a program. Each time the function is called, it will be executed and do something. The obvious benefit of this method: If you know what the functions are doing, you can modify the game without knowing anything about coding or programming at all



In other words, we used your tutorial as the basis for the SOC tutorial on the Wiki, like I told you. Thanks again.
 
What you need to understand, A Cat, is that as complex as coding can get, the basics are extremely simple. You aren't going to become an expert overnight; I'm actually taking a programming course in college right now, and the pace is pretty slow.

Let me break this down as simply as I possibly can.

Programming is at its core an exercise in logic. You really don't need extremely special tools to do it other than patience and dedication. The trick is that each line of code is telling the computer to do something. Coding is essentially a method of telling the computer specifically what you want to do.

There are many different programming languages. Each one uses slightly different syntax, and has its own different advantages. Some languages are more efficient; others are easier to use. The language I'm studying is called C++. SRB2 was programmed in a language called C. There are literally thousands of others.

For most of them, although it can be beneficial to use a special editor, it isn't necessary. You can write a program using just about any text editor. In fact, I'll write a very simple program in C++ right on this screen.

Code:
#include <iostream>
using namespace std;

int main()
{
     cout << "I love SRB2!" << endl;
     return 0;
}

This is a real, fully-functional program. If I compiled the code above and ran it, the program would open up the Windows console and print "I love SRB2!" on the screen. Let me explain to you what each part of it means:

#include <iostream>
What this line did was tell the computer "I want to include the resource 'iostream'". iostream is basically a prefabricated piece of code that allows you to input and output data to the console.

using namespace std;
This tells the computer to use the namespace "std". Namespaces are important to complex programming, but in simple programs adding in "namespace std" is just something to routinely do. The semicolon, by the way, is used to tell the computer that a particular prompt is over.

int main()
{

This is what is called a "function". It is basically an individual block of code that can be called over and over. In this case, though it's just the main part of the program. This function is of type "int" which means that when it is done, it will return an integer to the program. The double parentheses "()" means that the function doesn't take any data from another function for its own use (if it did, then the parentheses would contain the data the function takes). Lastly, the curly brace "{" distinguishes where the contents of the function start. Everything inside the braces gets tabbed over so that it is easy to pick out that particular function at a glance.


cout << "I love SRB2!" << endl;
This is the part where the program actually does something. The "cout" means "put the following on the console". The "<<" means "output". "I love SRB2!" is what the program actually prints on the screen. The "endl" means that the line of text is done (it basically has the same effect as the Enter key).

return 0;
Remember when I said that functions of type "int" return an integer? This is what the function returns. This effectively tells the program that it is finished, and makes it exit.

}
As you might have guessed, this marks the end of the "main" function.

Now, lastly, you need a compiler program. This isn't tough at all...it's just a really tiny application that will read your code and actually build a program out of it.

In my opinion, C++ is a good place to start if you are serious about programming. Some other types of languages are simpler, but C++ is one of the most powerful and efficient codes there is. There are all kinds of websites that can teach you the basics. Seriously, just Google it and look for some tips to get you started.
 
Hey Morph, you're not up to date! ;P


In other words, we used your tutorial as the basis for the SOC tutorial on the Wiki, like I told you. Thanks again.
Since I am arrogant and since I still have incorporated these "awesome" pictures I'll stick to the original. ;p
(I read through the article and I must say what an improvement! Especially the structure is well done. Now I am jealous! ^^)
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top