1. Learn C++. Possible alternatives: C, C#. If you are a fag: Java, Haskell or Python.
2. Learn Calculus
3. Learn Linear Algebra
4. Learn classical physics
5. Learn a 3D API. OpenGL or Direct3D.
6. Learn how to play sound get input etc on your target system.
7. Read about game engines and how to make them.
8. Make Game
9. Profit
while (true) {
1. Learn C++. Possible alternatives: C, C#. If you are a fag: Java, Haskell or Python.
2. Learn Calculus
3. Learn Linear Algebra
4. Learn classical physics
5. Learn a 3D API. OpenGL or Direct3D.
6. Learn how to play sound get input etc on your target system.
7. Read about game engines and how to make them.
8. true = false
}
You people are arguing the meaning of ``strings.'' Truly pathetic anonymous.
Truly a discussion on Computer Science!
Name:
Anonymous2007-08-18 12:29 ID:AbPJ/560
>L"test"
>(int*)"test"
>
>No longer an array of chars IS IT?
The first one is an array of whatever wchar_t is for that platform. The second one is an array of chars, casted to an array of int. In this case, you're casting a 5-char array, of which I can pretty much guarantee that sizeof int is not an even multiple.
Name:
Anonymous2007-08-18 15:20 ID:YOXx/DrH
>>82
Faggot. I always wondered what kind of faggot would waste a line of code and make the code look ugly doing that (and obscuring loops since the line before indenting is not the loop declaration), and now I know. You would be that kind of faggot.
>>93
There's no such type as "array of chars", nor "array of int". There are pointers, though.
There's no such type as "array of chars", nor "array of int". There are pointers, though.
Ah true, my bad. Still not strings though.
Name:
Anonymous2007-08-18 18:39 ID:KS2Nq+I7
>>95
Of course they are not strings. I'm cgmoAS42.
Name:
Anonymous2007-08-18 20:46 ID:94SevuIy
>>94 There's no such type as "array of chars", nor "array of int". There are pointers, though.
You are an idiot for saying that. Apparently arrays and pointers being interchangable in many situations confuses some of the more feeble minds.
Name:
Anonymous2007-08-19 4:18 ID:phrHsXz6
Gawd, this is horrible.
Pointer => Variable that's value corresponds to a physical address in memory
Array => A set of contiguous elements
A function evaluating a Pointer to an Array has to know when to terminate. The reason '\0' is chosen is because the byte following the last character evaluates to false without any further manipulation of the expression. The manner in which the end of an Array is detected is entirely implementation dependent.
Game over. Insert coin. Insert coin again. Reset to zero credit.
A function evaluating a Pointer to an Array has to know when to terminate. The reason '\0' is chosen is because the byte following the last character evaluates to false without any further manipulation of the expression. The manner in which the end of an Array is detected is entirely implementation dependent.
How's that related to what the expression "asd" is in C?
>>99
"asd" has type array of char, although in most contexts it will be converted to an expression of type pointer to char that points to its first element.
"asd"
HAS NO FUCKING TYPE
IT IS A C STRING
GET IT THRU YOUR FUCKING SKULLS
Name:
Anonymous2007-08-19 19:14 ID:FiTiDkwb
>>104
Since when does C differentiate between pointers and arrays for string immediate values, and more importantly, since when does it have a separate array type for vectors? Arrays only matter for matrices.
Name:
Anonymous2007-08-19 19:20 ID:NjuhW38U
Holy fuck. Well over half this thread is over whether C strings are really strings or not. I can't decide whether this is EPIC or FAIL.
I can only hope that more game programmers never produce shit. Too much shit goes out the door nowadays.
Name:
Anonymous2007-08-20 16:35 ID:1mHx1Yvt
I <3 goto, because using it pisses so many people off
although in a professional setting i wouldn't use it unless needed also C# is king of faglands, i prefer it over all the other fag languages. c# is wonderful if you have to make your own tools for said game