Lordrach
Members-
Content Count
7 -
Joined
-
Last visited
Everything posted by Lordrach
-
hi, you can use code::blocks, free, open source, very popular and multi platform. download here.
-
hi, I suggest you to use the free and open source SDL library, i have used it for 2d game programming and i can say it's really a nice API (2D, images, networking, Audio, fonts). for time management you can use the SDL_GetTicks function witch returns the number of milliseconds since SDL library initialization. the SDL library offers another way to managing time witch is the timers. you can find more information about time management in SDL here
-
Hello All , New To All Of This What Should I Be Doing ?
Lordrach replied to GuardianAnGeL2009's topic in Programming
ambitious !you have to accomplish many steps to make your dream come true !1- learn how to program, algorithmic, mathematic, computer architecture, ...2- learn software engineering, modeling, analysis, ...3- make a good team of skilled people (designer, scenarists, artists, ...)4- work hard and be up to the challenge.5- (hope you will be lucky ) -
Hi,what do you exactly mean by text based mmo game ?do you mean something like ogame ?if it's the case well i don't think such software exist, however it won't be difficult for you to learn how to program it yourself (html + php).
-
a pointer to pointers is a multidimensional array . as you know we can use a pointer to declare an array like this : int * MyArray = (*int) malloc(20 * sizeof(int)); // this is an array of 20 rows if you want to use the same technique to declare a multidimensional array, you should use this code : int i; int NumberOfCols = 5; int NumberOfRows = 10; int ** MyArray = (**int) malloc(NumberOfRows * sizeof(int)); // 10 rows for(i = 0; i < NumberOfRows;i++) { MyArray[i] = (*int) malloc(NumberOfCols * sizeof(int)); // each line contains 5 fields } in the end you have 10 * 50 fields = 50; something like this : (don't laugh ) ######################### #* #* #* #* #* #* #* #* #* #* # ######################### #* #* #* #* #* #* #* #* #* #* # ######################### #* #* #* #* #* #* #* #* #* #* # ######################### #* #* #* #* #* #* #* #* #* #* # ######################### #* #* #* #* #* #* #* #* #* #* # ######################### ( * = field ) for 3, 4, ..., n multidimensional Arrays, you use the same technique. now i think you will not miss this kind of questions anymore . good luck.
-
hi, I can summarize the pointers role in one sentence : pointers are used to access data witch is declared in a different scope. i will explain more. when you declare a variable in a function, this function is only available within that function's scope, so when you get out of it, the variable is destroyed automatically. here is an example : void ChangeValues(int a, int b) { int temp = 0; temp = a; a = b; b = temp; } int main() { int x = 5, y = 1; ChangeValues(x,y); printf("x = %d and y = %d", x,y); return 1; }guess what ! this will print : x = 5 and y = 1 !!! why ? because when we call the ChangeValues function, the parameters passed are not the original ones, instead, it's just a copy of them. these parameters are created in the scope of the ChangeValues function, so obviously, when this function end, these variables are destroyed. how can we solve it ? simply by changing the ChangeValues function definition to accept parameters by their address so it work on the original copies here is the code : void ChangeValues(int * a, int * b) { int temp = 0; temp = *a; *a = *b; *b = temp; } int main() { int x = 5, y = 1; ChangeValues(&x,&y); printf("x = %d and y = %d", x,y); return 1; }now everything should be OK. another useful tip is that functions return only one value. we can solve this by giving it variables pointers so that it can store the results directly in them. i hope you understood the utility of pointers and that they are not optional in C as they are not difficult either. i hope this helped.
-
Hi,what do you mean exactly by on-line library ? is it an extension to the PHP language (like GD or OCI) or a PHP framework (like zend, pear, ...) ?