-
Gross Pecululatarian
More complex? As if. I saved the usage of another variable, and its a simple line. How about we have a vote?
-
i didn't say "more complex"
i stand by my last post.
-
Gross Pecululatarian
Ok, "less understandable" hehe
I just don't see how it is less understandable? This way, you don't have to remember what 3 different variables are for.
-
additional variables, if well named, make code more understandable, not less. vy++ just says you are incrementing a variable vy. velocityY+=gravity says it all. short, compact code isn't necessarily better. it can sometimes be more efficient, but hell to maintain. i'm being a bit of a hypocrite here, since my personal source code is often pretty messy and breaks all kinds of rules for "proper programming style". but when i'm doing a tutorial or book, or code that someone else will need to use, i try to be a little more PC (programatically correct)
-
Gross Pecululatarian
But they clutter everything up whilst in the debug process and make life harder sometimes.
-
It seems to me that keeping a gravity variable can only make the code more flexible: While authoring it enables one to change the gravitational force for many parts of a system quickly and easily. Isn't this the point of not hard coding everything?
You may want to include a slider to control gravity at run time.
Overall I think it's simpler and more flexible.
-
damn variables! should just get rid of 'em once and for all!
-
Back to info about the book, please
Would the book be interesting for someone with a great knowledge of math as well? Or is it merely as an inspiration and "help" for those who have forgotten a lot of math since school?
-
Gross Pecululatarian
I suppose a proper math book would be more for sombody in that position, ie. one that's going over more advanced topics, but not flash.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|