[QUOTE=LasGunz;39265886]I don't have many questions on just.. where to start.. I understand I can go with Love2D and Lua and that's helpful to know which platform to start but.. I don't know how to even go about learning to use it. Their wiki has documentation on all of the things it [i]can[/i] do and even explanations of their use.. but that doesn't really teach me how to string it all together into something that is.. a thing :P[/QUOTE]
I'm terrible at helping people but I really think I was in the same situation as you. I'd love to try and guide you through it though because that's what someone did for me and the penny quickly dropped.
[QUOTE=Doritos_Man;39265966]Maybe you should start with something like:
[url]http://www.udacity.com[/url]
[url]http://www.codecademy.com[/url]
Those have some basic courses on computer programming. It isn't games but you need to understand the basics first.[/QUOTE]
I don't have any experience with udacity, but good god don't do Code Academy. The verification system is broken 99% of the time and the questions are so badly worded most of the time, you're not working out the problem, you're working out the question.
[QUOTE=Hentie;39264806]one day your advice will be useful
one day[/QUOTE]
Except it is useful.
[cpp]
int* a, b;
[/cpp]
This won't work as expected, but if you don't put the asterisk next to the type name, the error will be much more apparent.
[QUOTE=dajoh;39266110]Except it is useful.
[cpp]
int* a, b;
[/cpp]
This won't work as expected, but if you don't put the asterisk next to the type name, the error will be much more apparent.[/QUOTE]
Useful to someone brand new to programming, maybe. Anyone who has been programming for any decent length of time can instantly tell you that 'a' is a pointer to an int, while b is just an int, no matter how you write it.
For the record, I do use 'int *a, b' but that's only because of habit, not because it makes any sort of difference.
According to [URL=http://en.wikipedia.org/wiki/Gestalt_psychology#Gestalt_laws_of_grouping]Gestalt Psychology[/URL], the Law of Proximity dictates that grouping suggests relation. Therefore it would make more intuitive sense to put the asterisk next to the variable name, not the type, since that implies that the variable is modified, and not the type (as is actually the case). By placing the asterisk next to the type, you're suggesting that the type for both variables is modified, which is [I]not[/I] the case.
Therefore,
[CPP]char *a, b[/CPP]
makes more intuitive sense.
It makes more intuitive sense if you're declaring multiple variable, if you're declaring one variable then it doesn't make much difference.
And at the end of the day it's really not significant enough to warrant a big fuss.
[QUOTE=supersnail11;39256763]He hasn't fixed the app itself - logging in will crash the app.[/QUOTE]
I'm using the app just fine? :c
[QUOTE=danharibo;39266250]It makes more intuitive sense if you're declaring multiple variable, if you're declaring one variable then it doesn't make much difference.[/QUOTE]
It doesn't make much difference, but if you get used to writing "type*" instead of "*name", you may forget to declare multiple pointers correctly at some point. And mixing styles is bad.
[QUOTE=SiPlus;39264409]char *$$$, not char* $$$.[/QUOTE]
This is actually pretty good advice as put forth by the mighty K&R, [url=http://www.kernel.org/doc/Documentation/CodingStyle]fully endorsed by Linus[/url] and concurred with by RMS.
man and i just wish i could actually do stuff with pointers and shit
[QUOTE=Ezhik;39266365]man and i just wish i could actually do stuff with pointers and shit[/QUOTE]
What's stopping you?
ii always forget what * and & do, end up reading the guide again, try to use them, and never get them to work :v:
[QUOTE=LasGunz;39265886]I don't have many questions on just.. where to start.. I understand I can go with Love2D and Lua and that's helpful to know which platform to start but.. I don't know how to even go about learning to use it. Their wiki has documentation on all of the things it [i]can[/i] do and even explanations of their use.. but that doesn't really teach me how to string it all together into something that is.. a thing :P[/QUOTE]
If you add me on Steam I could help you if you want.
[QUOTE=Ezhik;39266393]ii always forget what * and & do, end up reading the guide again, try to use them, and never get them to work :v:[/QUOTE]
It's pretty simple.
& Gets the address of something
* Gets what the pointer is pointing at.
[cpp]
#include <stdio.h>
int main()
{
int a, *b;
a = 5;
printf("a: %d\n", a);
b = &a;
*b = 6;
printf("a: %d\n", a);
return 0;
}
[/cpp]
[code]
$ cc -o test test.c && ./test
a: 5
a: 6
[/code]
Easy
[QUOTE=Amiga OS;39266439]I'm just starting to play with webGL & three.js, its basic enough for me to focus on programming game mechanics and not wasting months writing a 3D renderer from scratch.[/QUOTE]
But writing the plumbing is the best bit :<
UV mapping:
[img]https://dl.dropbox.com/u/99717/UVMapping.jpg[/img]
Sort of...
[img]https://dl.dropbox.com/u/99717/WithErrors.jpg[/img]
Why would you do this to me!?
Well, I think I got the error:
When using GL_ARRAY_BUFFER and a vertex has more than one set of UV coordinates, then What to do?
[QUOTE=SiPlus;39264409]char *$$$, not char* $$$.[/QUOTE]
shh-shh-shh, your quake is showing, and it's embarrassing some other people in here who code very much the same
keep it down man, golly
[QUOTE=Dr Magnusson;39266236]According to [URL="http://en.wikipedia.org/wiki/Gestalt_psychology#Gestalt_laws_of_grouping"]Gestalt Psychology[/URL], the Law of Proximity dictates that grouping suggests relation. Therefore it would make more intuitive sense to put the asterisk next to the variable name, not the type, since that implies that the variable is modified, and not the type (as is actually the case). By placing the asterisk next to the type, you're suggesting that the type for both variables is modified, which is [I]not[/I] the case.
Therefore,
char *a, b
makes more intuitive sense.[/QUOTE]
It[I] is [/I]technically modifying the type though. char is 1 bytes and char* is 4 bytes, and both do different things. In my eyes, I see it makes sense to group the asterisk with the char because you basically are changing types.
Just like you would to this:
[CPP]char *b = (char*)a;[/CPP]
So in this case, it looks like char* is actually a separate type since you are casting something to (char*).
Or on templates:
[CPP]std::vector<char*> var;[/CPP]
[QUOTE=amcfaggot;39267203]shh-shh-shh, your quake is showing, and it's embarrassing some other people in here who code very much the same
keep it down man, golly[/QUOTE]
weelllll gooooooollllyyy geee willikers looks like we got one o' them thar 'pedants', as the french might say.
Send this joker to REI, he needs a new pair of cargo cult shorts.
[cpp]
int* x;
int* a,* b;
[/cpp]
is how I write grouped pointers.
[QUOTE=ief014;39267490]
int* x; int* a,* b;
is how I write grouped pointers.[/QUOTE]
No space after comma looks awful in my opinion.
[cpp]
int* x;
int* a, * b;
[/cpp]
too much whitespace for my tastes.
I always seem to write functions like this:
[cpp]void * foo(void);[/cpp]
But variables like this:
[cpp]char *string;[/cpp]
But recently I haven't been putting the space before the function name.
[QUOTE=danharibo;39266250]
And at the end of the day it's really not significant enough to warrant a big fuss.[/QUOTE]
It's like you've never been to the internet before.
[QUOTE=SiPlus;39266314]It doesn't make much difference, but if you get used to writing "type*" instead of "*name", you may forget to declare multiple pointers correctly at some point. And mixing styles is bad.[/QUOTE]
This is actually sound advice; why the boxes?
[QUOTE=Mozartkugeln;39268019]This is actually sound advice; why the boxes?[/QUOTE]
I use char* and never forget to declare multiple pointers. I don't see how doing it the other way helps you remember to put the other asterisks.
Next topic: which comes first, type specifier or other qualifiers/specifiers?
[cpp]const int[/cpp] or [cpp]int const[/cpp]
[cpp]inline void f();[/cpp] or [cpp]void inline f();[/cpp]
[QUOTE=ThePuska;39268119]Next topic: which comes first, type specifier or other qualifiers/specifiers?[/QUOTE]
[cpp]const int
inline void[/cpp]
[editline]18th January 2013[/editline]
imo
10000 AABB bodies colliding with each other: 110~FPS
<3 C++