Random Programming Questions
Posted 25 November 2011 - 04:32 PM
So basically I have been modding for a while now but only at a basic level.
Ive used Img Tool, SAMI, TXD workshop, GGMM, Ped Editor and Obviously Cleo.
Ive designed vehicles, peds, buildings, etc. (3ds Max, Photoshop & Flash)
But I feel this is becoming small fry for me.
I've started looking into C++ and Direct x programming and finding it all a little overpowering.
The eventuality is that I want to be able to write my own codes and build my own games.
So this is kinda a request really, could anybody help me out with the basics of code writing?
and general advise?
I do realise there are plenty of resources out there to help me on my way but I would like the opportunity to
liaise with some one on the matter, say if I run into any problems or have questions I cant find answers to.
Cheers for now!
Posted 25 November 2011 - 05:07 PM
|QUOTE (Liamardo @ Friday, Nov 25 2011, 17:32)|
|I've started looking into C++ and Direct x programming and finding it all a little overpowering.|
I'm not surprised, you're jumping in the deep end!
If you're just starting out with C++, you're best off writing some small programs to teach yourself the basics of the language. I mean text-based console applications that perform very basic tasks like adding numbers. You'll probably find this a lot more rewarding than it sounds, and you'll inevitably end up creating more and more complex programs and indirectly learning good habits.
Once you've nailed the basics of programming, the big bad scary world of DirectX will seem a little less daunting and a little more accessible, but again, you'll need to start with the basics. Your first Direct3D application will probably be a tricoloured gouraud triangle - but you'll look at it thinking that you're GOD.
In summary, take it slow, start from the beginning, and have patience.
Posted 25 November 2011 - 05:37 PM Edited by Swoorup, 25 November 2011 - 05:40 PM.
I looked at making a window-based app from C++ and really its too complex process going on! What I meant to say is, how long will an average programmer be fluent in these languages?
EDIT:Liamardo, I would suggest you take a look at cprogramming.com site. They contain the basic stuffs of C/C++ and explain very well.
Also you have any problems then there is always the forum.
Posted 25 November 2011 - 05:54 PM
|QUOTE (Barguast @ Friday, Nov 25 2011, 17:07)|
| If you're just starting out with C++, you're best off writing some small programs to teach yourself the basics of the language. I mean text-based console applications that perform very basic tasks like adding numbers. You'll probably find this a lot more rewarding than it sounds, and you'll inevitably end up creating more and more complex programs and indirectly learning good habits. |
Cheers for the info dude!
I'm assuming your already adept at using c++.
so far Ive covered the basics but in the stuff I've read, it doesn't really explain too well how to create codes, if that makes sense. basically I understand how to make codes work and what processes have to happen before a basic application can work but what I don't get is, How do I know what codes to use... is there a list of data I should learn? for example Data works in binary witch is basically 1's & 0's witch is the computers native language (so to speak) but there is the other language witch is in text.... so does this mean for a specific number sequence there is a preset text equivalent? or is that over simplified? lol!
Posted 25 November 2011 - 07:30 PM
|QUOTE (Swoorup @ Friday, Nov 25 2011, 13:37)|
|I started out with C a month ago, should I go with C++ at the same time?|
You should keep learning C until you get hang of structures, linked lists, and trees. That's a good point to switch over to C++.
Posted 26 November 2011 - 04:16 PM
But how can I apply those linked lists and binary trees in practical. I mean for which problems.
Thank you though for all the information!
Posted 26 November 2011 - 11:16 PM
Lists can also save you a ton of time on memory allocation. Imagine that you have a bunch of objects that you keep creating and destroying. If you had to allocate memory every time and the delocate it, it can become rather slow, not to mention fragmentation issues. Instead, create a linked list of unused objects. Since they don't have to be ordered in memory, you can take and add objects to that list as you please. Just make sure you check its length every once in a while, and delocate unused objects if you ended up with too many. If the list is empty, and you need more, you allocate memory then.
And trees... It's a broad topic. There are search trees. Just about any AI will involve a search in a tree. Directory structure is a tree, so if you want to represent one in your program you'll have to have a tree of some sort. For rendering and graphics, there are partition trees. In particular, there is binary space partition (BSP - might sound familiar) and there are octrees. Octrees are used for everything from graphics, to physics, to AI for all kinds of neat optimization tricks. BSPs are absolutely brilliant for rendering. If you're going through NeHe tutorials, they do have one on BSPs later on. But basically, whenever you get to transparency, do realize that order in which you render things is important. BSP makes ordered transparency an absolute breeze, but there are some limitations.
So yeah, lists and trees are extremely important in programming. And you will cuss and want to throw things while learning them, because when writing pointer-chasers, the fact that your program compiled means absolutely nothing, and trying to find an error in a program that compiles and just crashes can be a pain.
Posted 05 December 2011 - 09:27 PM
Posted 07 December 2011 - 03:34 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users